|
@@ -75,6 +75,8 @@ public class OrderServiceImpl extends ServiceImpl<IOrderMapper, Order> implement
|
|
|
@Autowired
|
|
|
IIncrementTypeService incrementTypeService;
|
|
|
@Autowired
|
|
|
+ IUserIncrementService userIncrementService;
|
|
|
+ @Autowired
|
|
|
IOrderService orderService;
|
|
|
|
|
|
@Override
|
|
@@ -288,6 +290,18 @@ public class OrderServiceImpl extends ServiceImpl<IOrderMapper, Order> implement
|
|
|
if(user == null){
|
|
|
throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|
|
|
}
|
|
|
+ if(param.getIncrementId() != null){
|
|
|
+ UserIncrement userIncrement = userIncrementService.getById(param.getIncrementId());
|
|
|
+ if(userIncrement == null){
|
|
|
+ throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|
|
|
+
|
|
|
+ }
|
|
|
+ IncrementType incrementType = incrementTypeService.getById(param.getIncrementType());
|
|
|
+ if(incrementType == null){
|
|
|
+ throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|
|
|
+ }
|
|
|
+ return incrementOrderService.insertIncrementOrder(user, param,incrementType);
|
|
|
+ }
|
|
|
IncrementType incrementType = incrementTypeService.getById(param.getIncrementType());
|
|
|
if(incrementType == null){
|
|
|
throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|