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

refactor(pet): 重构宠物服务方法命名和优化数据库操作

- 统一PetService中方法命名规范,将驼峰命名改为标准驼峰格式
- 修复拼写错误:UPdate -> Update, UPdateFree -> UpdateFree等
- 重命名查询方法:PetInfo_One -> PetInfoOneByCatchTime,
  PetInfo_One_ID -> PetInfoOneByID, PetInfo_One_ohter -> PetInfoOneOther
- 优化BuyPet方法中的事务处理逻辑,使用
This commit is contained in:
昔念
2026-03-26 04:51:36 +08:00
parent 5b655c8287
commit 619e4b50ca
7 changed files with 136 additions and 185 deletions

View File

@@ -62,7 +62,7 @@ func (c *PetBagController) GetSession(ctx context.Context, req *PetGetReq) (res
func (c *PetBagController) Level(ctx context.Context, req *PetLevelReq) (res *cool.BaseRes, err error) {
// m := gmap.New()
r := service.NewUserService(0).Pet.Pet_LEVEL_all()
r := service.NewUserService(0).Pet.PetLevelAll()
res = &cool.BaseRes{}
ress := make([]PetLevelRes, 0)
@@ -112,7 +112,7 @@ func (c *PetBagController) ModPrise(ctx context.Context, req *PriseReq) (res *co
}
}
err = service.NewPetService(uint32(admin.UserId)).UPdatePrice(req.Ctime, req.Price, req.Free)
err = service.NewPetService(uint32(admin.UserId)).UpdatePrice(req.Ctime, req.Price, req.Free)
return