This commit is contained in:
zengtao01
2024-10-10 15:16:49 +08:00
parent 71143c2c77
commit 704010bad6
2 changed files with 7 additions and 6 deletions

View File

@ -85,7 +85,8 @@ public class BalanceDeductionJob implements JobHandler {
reductionAmount = userService.getReductionAmount(userId, total, dishOrderDO.getCreateTime());
}
if(dishOrderDO.getReductionAmount().compareTo(BigDecimal.ZERO) > 0){
dishOrderDO.setReductionAmount(reductionAmount.add(dishOrderDO.getReductionAmount()));
reductionAmount = reductionAmount.add(dishOrderDO.getReductionAmount());
dishOrderDO.setReductionAmount(reductionAmount);
}else {
dishOrderDO.setReductionAmount(reductionAmount);
}

View File

@ -84,11 +84,11 @@ public class OrderDetailServiceImpl implements OrderDetailService {
throw exception(ORDER_ALREADY_COMPLETE);
}
//判定餐盘是否绑定并刷新绑定时间
Boolean b = diningPlatesService.checkBind(createReqVO.getDiningPlatesNum(), createReqVO.getStoreId());
if (!b) {
throw exception(DINING_PLATES_NOT_BIND);
}
////判定餐盘是否绑定并刷新绑定时间
//Boolean b = diningPlatesService.checkBind(createReqVO.getDiningPlatesNum(), createReqVO.getStoreId());
//if (!b) {
// throw exception(DINING_PLATES_NOT_BIND);
//}
DishesRespDto dish = dishesApi.getDish(createReqVO.getDishesId());
DishesNutritionRespDTO dishEnergy = dishesNutritionApi.getDishEnergy(createReqVO.getDishesId());