refactor(pet): 重构宠物服务方法命名和优化数据库操作 - 统一PetService中方法命名规范,将驼峰命名改为标准驼峰格式 - 修复拼写错误:UPdate -> Update, UPdateFree -> UpdateFree等 - 重命名查询方法:PetInfo_One -> PetInfoOneByCatchTime, PetInfo_One_ID -> PetInfoOneByID, PetInfo_One_ohter -> PetInfoOneOther - 优化BuyPet方法中的事务处理逻辑,使用
This commit is contained in:
@@ -34,7 +34,7 @@ func (h Controller) SetPet(data *room.C2S_PET_ROOM_SHOW, c *player.Player) (resu
|
||||
result = &room.S2C_PET_ROOM_SHOW{}
|
||||
result.PetShowList = make([]pet.PetShortInfo, len(showPetCatchTimes))
|
||||
for _, catchTime := range showPetCatchTimes {
|
||||
petInfo := c.Service.Pet.PetInfo_One(catchTime)
|
||||
petInfo := c.Service.Pet.PetInfoOneByCatchTime(catchTime)
|
||||
if petInfo == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user