1. 取消会员接口修改

This commit is contained in:
SongZhang 2024-10-31 14:17:24 +08:00
parent f7ca147e49
commit 80d990de17
1 changed files with 9 additions and 4 deletions

View File

@ -1439,6 +1439,10 @@ public class TbShopTableServiceImpl implements TbShopTableService {
shouldPayAmount = shouldPayAmount.subtract(discountAmount);
memberPointsService.deductPoints(memberId, pointsNum, "霸王餐充值抵扣", Long.valueOf(orderInfo.getId()));
}
if (!userCouponList.isEmpty()) {
}
}
@ -1762,15 +1766,16 @@ public class TbShopTableServiceImpl implements TbShopTableService {
.in(TbCashierCart::getPlatformType, OrderPlatformTypeEnum.PC.getValue(), OrderPlatformTypeEnum.CASH.getValue());
}
TbShopUser shopUser = tbShopUserMapper.selectById(updateVipDTO.getVipUserId());
if (shopUser == null) {
throw new BadRequestException("用户信息不存在");
}
List<TbCashierCart> tbCashierCarts = cashierCartMapper.selectList(queryWrapper.isNotNull(TbCashierCart::getOrderId));
if (!tbCashierCarts.isEmpty()) {
Integer orderId = tbCashierCarts.get(0).getOrderId();
if (updateVipDTO.getType() == 0) {
TbShopUser shopUser = tbShopUserMapper.selectById(updateVipDTO.getVipUserId());
if (shopUser == null) {
throw new BadRequestException("用户信息不存在");
}
return orderInfoMapper.update(null, new LambdaUpdateWrapper<TbOrderInfo>()
.eq(TbOrderInfo::getId, orderId)
.set(TbOrderInfo::getUserId, shopUser.getUserId())