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

@@ -41,7 +41,7 @@ func (s *MapPitService) GetDataALL(mapid uint32) []model.MapPit {
func (s *MapPitService) GetPet(petid uint32) []model.MapPit {
var pet []model.MapPit //一个特性应该是唯一的,但是我们要获取默认随机特性
dbm_enable(s.Model).Wheref(`refresh_id @> ARRAY[?]::integer[]`, petid).Scan(&pet)
dbm_enable(s.Model).Wheref(`? = ANY(refresh_id)`, petid).Scan(&pet)
return pet