|
|
@@ -298,6 +298,7 @@ public class KxsMachineApplyServiceImpl extends ServiceImpl<KxsMachineApplyMappe
|
|
|
.getData()
|
|
|
.orElseThrow(() -> new GlobalCustomerException(StoreErrorTypeEnum.DATA_ERROR.getDescription()));
|
|
|
order.setBrandName(brand.getName());
|
|
|
+ log.info("消耗时间1");
|
|
|
//添加订单
|
|
|
baseMapper.insert(order);
|
|
|
for (int i = 0; i < param.getSnList().size(); i++) {
|
|
|
@@ -309,6 +310,7 @@ public class KxsMachineApplyServiceImpl extends ServiceImpl<KxsMachineApplyMappe
|
|
|
KxsMachine machine = RetOps.of(machineResult)
|
|
|
.getData()
|
|
|
.orElseThrow(() -> new GlobalCustomerException(StoreErrorTypeEnum.MACHINE_IS_NULL.getDescription()));
|
|
|
+ log.info("消耗时间2");
|
|
|
//新增订单详情
|
|
|
KxsMachineApplyDetail orderDetail = new KxsMachineApplyDetail();
|
|
|
orderDetail.setOrderId(order.getId());
|
|
|
@@ -318,6 +320,7 @@ public class KxsMachineApplyServiceImpl extends ServiceImpl<KxsMachineApplyMappe
|
|
|
KxsTicket ticket = RetOps.of(ticketResult)
|
|
|
.getData()
|
|
|
.orElseThrow(() -> new GlobalCustomerException(StoreErrorTypeEnum.TICKET_NOT_FIND.getDescription()));
|
|
|
+ log.info("消耗时间3");
|
|
|
//券码被使用返回错误
|
|
|
if (!ticket.getStatus().equals(TicketStatusEnum.TICKET_UNUSED.getType())) {
|
|
|
throw new GlobalCustomerException(StoreErrorTypeEnum.TICKET_CODE_UN.getDescription());
|