|
@@ -180,6 +180,9 @@ public class OrderServiceImpl implements OrderService {
|
|
|
@Autowired
|
|
|
private OrderExceptionRecordService orderExceptionRecordService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private AddressInfoService addressInfoService;
|
|
|
+
|
|
|
|
|
|
@Autowired
|
|
|
private KtoEccsService ktoEccsService;
|
|
@@ -482,8 +485,20 @@ public class OrderServiceImpl implements OrderService {
|
|
|
}
|
|
|
TicketMailInfo mailInfo = new TicketMailInfo();
|
|
|
String exprNo = orderProcessRecordEntity.getLogisticsNo();
|
|
|
+ if (StringUtils.isNullOrEmpty(exprNo)) {
|
|
|
+ throw new RRException("快递面单为空,请联系客服");
|
|
|
+ }
|
|
|
mailInfo.setExprNo(exprNo);
|
|
|
- mailInfo.setExprLogoUrl("/statics/img/bestex_logo3.png");
|
|
|
+ String logoUrl = "/statics/img/yto_logo.jpg";
|
|
|
+
|
|
|
+ Map<String, String> logoMap = new HashMap<>();
|
|
|
+ logoMap.put("best", "/statics/img/yto_logo.jpg");
|
|
|
+ logoMap.put("yto", "/statics/img/bestex_logo3.png");
|
|
|
+ if (logoMap.containsKey(orderEntity.getShippingCode())) {
|
|
|
+ logoUrl = logoMap.get(orderEntity.getShippingCode());
|
|
|
+ }
|
|
|
+
|
|
|
+ mailInfo.setExprLogoUrl(logoUrl);
|
|
|
byte[] barCode128 = BarcodeUtil.generateBarCode128(exprNo, null, null, true, false);
|
|
|
String exprNoBase64Img = new String(Base64.getEncoder().encode(barCode128));
|
|
|
mailInfo.setShopTel("0752-2688660");
|
|
@@ -3451,6 +3466,20 @@ public class OrderServiceImpl implements OrderService {
|
|
|
orderInfo.setIsOnfflineOrder(Dict.isOnfflineOrder.item_1.getItem());
|
|
|
orderInfo.setOrderBizType(Dict.orderBizType.item_10.getItem());
|
|
|
|
|
|
+ // 添加快递信息
|
|
|
+
|
|
|
+ try {
|
|
|
+ StoreExprActiveDto activeExpr = addressInfoService.queryByStoreId(storeId);
|
|
|
+ if (activeExpr == null) {
|
|
|
+ throw new RRException("门店未配置快递信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ orderInfo.setShipping_id(activeExpr.getExprId());
|
|
|
+ orderInfo.setShipping_code(activeExpr.getExprCode());
|
|
|
+ orderInfo.setShipping_name(activeExpr.getExprName());
|
|
|
+ } catch (Exception e) {
|
|
|
+ LOGGER.error("订单写入门店快递配置信息有误:", e);
|
|
|
+ }
|
|
|
return orderInfo;
|
|
|
}
|
|
|
|