分账
This commit is contained in:
@@ -102,7 +102,7 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
||||
if (shopInfo.getExpireTime() != null && (DateUtil.date().toLocalDateTime().isAfter(shopInfo.getExpireTime()))) {
|
||||
throw new CzgException("店铺已过期,请联系商家");
|
||||
}
|
||||
if (SystemConstants.OneZero.ZERO == shopInfo.getOnSale() || shopInfo.getStatus() !=SystemConstants.OneZero.ONE) {
|
||||
if (SystemConstants.OneZero.ZERO == shopInfo.getOnSale() || shopInfo.getStatus() != SystemConstants.OneZero.ONE) {
|
||||
throw new CzgException("店铺已停业,请联系商家");
|
||||
}
|
||||
|
||||
@@ -460,8 +460,8 @@ public class ShopInfoServiceImpl extends ServiceImpl<ShopInfoMapper, ShopInfo> i
|
||||
@Override
|
||||
public BigDecimal updateAmount(Long id, BigDecimal amount) {
|
||||
ShopInfo shopInfo = getShopInfo(id);
|
||||
if (shopInfo.getAmount() == null) {
|
||||
shopInfo.setAmount(BigDecimal.ZERO);
|
||||
if (shopInfo.getAmount() == null || shopInfo.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
|
||||
throw new CzgException("更新失败");
|
||||
}
|
||||
boolean flag = mapper.updateAmount(id, amount);
|
||||
if (!flag) {
|
||||
|
||||
Reference in New Issue
Block a user