提交 776bb1fe 作者: chaining

feat: 同一订单不允许多个墙盒申请

父级 7c42d91d
...@@ -119,15 +119,9 @@ public class WallboxApplyService { ...@@ -119,15 +119,9 @@ public class WallboxApplyService {
WallboxApply condition = new WallboxApply(); WallboxApply condition = new WallboxApply();
condition.setOrderId(req.getOrderId()); condition.setOrderId(req.getOrderId());
condition.setCheckStatus(2L);
List<WallboxApply> retList = wallboxApplyMapper.selectWallboxApplyList(condition);
if (CollectionUtils.isNotEmpty(retList)){
throw new ServiceException("存在已审核通过的安装单,无法重复申请");
}
condition.setSupplierId(req.getSupplierId());
List<WallboxApply> retList2 = wallboxApplyMapper.selectWallboxApplyList(condition); List<WallboxApply> retList2 = wallboxApplyMapper.selectWallboxApplyList(condition);
if (CollectionUtils.isNotEmpty(retList2)){ if (CollectionUtils.isNotEmpty(retList2)){
throw new ServiceException("该订单已申请"); throw new ServiceException("该订单已申请,无法重复申请");
} }
//补全相关信息 //补全相关信息
Order order = orderDao.selectById(req.getOrderId()); Order order = orderDao.selectById(req.getOrderId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论