feat(pet): 修改宠物价格字段类型为uint32 统一宠物价格相关字段的数据类型,将sale_price从float32改为uint32, 以保持数据类型一致性并避免浮点数精度问题。 - 更新controller中PriseReq结构体的Price字段类型 - 修改model中Pet结构体的SalePrice字段类型 - 调整service中UPdatePrice方法的参数类型 ```
This commit is contained in:
@@ -46,7 +46,7 @@ func (s *PetService) UPdateFree(ctime uint32, free uint32) {
|
||||
).Update()
|
||||
|
||||
}
|
||||
func (s *PetService) UPdatePrice(ctime uint32, Price float32, is_sale uint32) {
|
||||
func (s *PetService) UPdatePrice(ctime uint32, Price uint32, is_sale uint32) {
|
||||
s.dbm(s.Model).Where("catch_time", ctime).Data("sale_price", Price, "is_sale", is_sale).Update()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user