fix: 修复改价条件判断错误
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -59,7 +59,7 @@ func (s *PetService) UPdatePrice(ctime uint32, Price uint32, is_sale uint32) err
|
||||
}
|
||||
var p model.Pet
|
||||
s.dbm(s.Model).Where("catch_time", ctime).Scan(&p)
|
||||
if p.SalePrice != Price && utils.IsToday(p.UpdateTime) { //说明要修改价格
|
||||
if p.SalePrice!=0&&p.SalePrice != Price && utils.IsToday(p.UpdateTime) { //说明要修改价格
|
||||
return fmt.Errorf("一天只允许改价一次")
|
||||
}
|
||||
res0, err := s.dbm(s.Model).
|
||||
|
||||
Reference in New Issue
Block a user