```
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

feat(fight): 使用专用函数构建战斗结束数据包

为战斗结束消息创建专用的构建函数,
统一处理战斗结束信息的数据包构建逻辑,
提高代码的一致性和可维护性。

fix(config): 优化数据库查询语句以提高性能

将数组包含操作(@>)替换为 ANY 操作符,
在 Egg、MapPit、PetFusion 等服务中使用更高效
的查询方式
This commit is contained in:
昔念
2026-04-12 13:27:39 +08:00
parent 174830731c
commit f9543a5156
9 changed files with 65 additions and 14 deletions

View File

@@ -47,7 +47,7 @@ func (s *ShinyService) listByPetID(id uint32) []model.ColorfulSkin {
var ret []model.ColorfulSkin
dbm_enable(s.Model).
Wheref(`bind_elf_ids @> ?::jsonb`, id).
Wheref(`CAST(? AS text) = ANY(ARRAY(SELECT jsonb_array_elements_text(bind_elf_ids)))`, id).
Wheref(`jsonb_typeof(bind_elf_ids) = ?`, "array").
Scan(&ret)