|
@@ -52,6 +52,10 @@ public class InvoiceServiceImpl extends ServiceImpl<IInvoiceMapper, Invoice> imp
|
|
|
@Autowired
|
|
|
private IOrderService orderService;
|
|
|
@Autowired
|
|
|
+ private IIncrementOrderService incrementOrderService;
|
|
|
+ @Autowired
|
|
|
+ private IDownloadOrderService downloadOrderService;
|
|
|
+ @Autowired
|
|
|
private IUserService userService;
|
|
|
|
|
|
@Autowired
|
|
@@ -103,8 +107,20 @@ public class InvoiceServiceImpl extends ServiceImpl<IInvoiceMapper, Invoice> imp
|
|
|
mangeUploadToOssUtil.upload(localFile.getPath(),ossFilePath);
|
|
|
invoiceRegister.setInvoiceUrl(ossPrefixUrl + ossFilePath);
|
|
|
|
|
|
- Order order = orderService.getById(invoice.getOrderId());
|
|
|
- String orderNum = order == null ? null : order.getOrderSn();
|
|
|
+ String orderNum = null;
|
|
|
+ if(invoice.getOrderId()!= null){
|
|
|
+ Order order = orderService.getById(invoice.getOrderId());
|
|
|
+ orderNum = order == null ? null : order.getOrderSn();
|
|
|
+ }
|
|
|
+ if(invoice.getIncrementOrderId()!= null){
|
|
|
+ IncrementOrder order = incrementOrderService.getById(invoice.getIncrementOrderId());
|
|
|
+ orderNum = order == null ? null : order.getOrderSn();
|
|
|
+ }
|
|
|
+ if(invoice.getDownloadOrderId()!= null){
|
|
|
+ DownloadOrder order = downloadOrderService.getById(invoice.getDownloadOrderId());
|
|
|
+ orderNum = order == null ? null : order.getOrderSn();
|
|
|
+ }
|
|
|
+
|
|
|
User user = userService.getById(invoice.getUserId());
|
|
|
String userName = user == null ? null : user.getNickName();
|
|
|
|