修改增加减少用户资金接口

This commit is contained in:
牛叉闪闪 2024-08-20 15:30:21 +08:00
parent aa7c5d3744
commit 972ab851c8
1 changed files with 7 additions and 3 deletions

View File

@ -214,13 +214,17 @@ public class TbShopUserServiceImpl implements TbShopUserService {
if(ObjectUtil.isNull(tbShopUser)){
throw new BadRequestException("不存在的会员信息");
}
String operationType=map.get("operationType").toString();
BigDecimal amount=new BigDecimal(map.get("amount").toString());
if(amount.compareTo(tbShopUser.getAmount())>0){
throw new BadRequestException("账户余额不足,请输入正确的金额");
if("out".equals(operationType)){
if(amount.compareTo(tbShopUser.getAmount())>0){
throw new BadRequestException("账户余额不足,请输入正确的金额");
}
}
String operationType=map.get("operationType").toString();
String type=map.get("type").toString();
TbShopUserFlow flow=new TbShopUserFlow();