```
feat(pet): 新增精灵可学习技能查询功能 新增 GetPetLearnableSkills 接口用于查询当前精灵可学习技能(包含等级技能和额外技能ExtSKill), 优化 SetPetSkill 和 SortPetSkills 方法中的技能处理逻辑,提升技能管理和排序的准确性。 同时修复了宠物存储信息查询时缺少参数验证的问题,在管理后台接口中增加 free 参数支持。 BREAKING CHANGE: 管理后台
This commit is contained in:
@@ -58,9 +58,9 @@ func (s *PetService) PetInfo(flag int) []model.Pet {
|
||||
return tt
|
||||
}
|
||||
|
||||
func (s *PetService) StorageInfo(isVip int) []model.Pet {
|
||||
func (s *PetService) StorageInfo(isVip int, free int) []model.Pet {
|
||||
var tt []model.Pet
|
||||
if err := s.dbm_fix(s.Model).Where("free", 0).Where("is_vip", isVip).Scan(&tt); err != nil {
|
||||
if err := s.dbm_fix(s.Model).Where("free", free).Where("is_vip", isVip).Scan(&tt); err != nil {
|
||||
return nil
|
||||
}
|
||||
for i := range tt {
|
||||
|
||||
Reference in New Issue
Block a user