feat(pet): 添加宠物是否可售状态字段 新增is_sale字段用于控制宠物是否可售, 同时修改价格更新接口以支持设置销售状态 ```
This commit is contained in:
@@ -46,9 +46,8 @@ func (s *PetService) UPdateFree(ctime uint32, free uint32) {
|
||||
).Update()
|
||||
|
||||
}
|
||||
func (s *PetService) UPdatePrice(ctime uint32, Price float32) {
|
||||
|
||||
s.dbm(s.Model).Where("catch_time", ctime).Data("sale_price", Price).Update()
|
||||
func (s *PetService) UPdatePrice(ctime uint32, Price float32, is_sale uint32) {
|
||||
s.dbm(s.Model).Where("catch_time", ctime).Data("sale_price", Price, "is_sale", is_sale).Update()
|
||||
|
||||
}
|
||||
func (s *PetService) BuyPet(pid uint32) error {
|
||||
|
||||
Reference in New Issue
Block a user