```
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

@@ -28,7 +28,7 @@ func (s *TitleService) Get() []uint32 {
func (s *TitleService) Can(id uint32) bool {
m1 := s.dbm(s.Model)
ok, _ := m1.Wheref(`available_title @> ?::jsonb`, id).Exist()
ok, _ := m1.Wheref(`CAST(? AS text) = ANY(ARRAY(SELECT jsonb_array_elements_text(available_title)))`, id).Exist()
return ok
}