|
@@ -216,6 +216,51 @@ public class InBoxFacade { |
|
@@ -216,6 +216,51 @@ public class InBoxFacade { |
216
|
}
|
216
|
}
|
217
|
|
217
|
|
218
|
/**
|
218
|
/**
|
|
|
219
|
+ * 平台发货给买家
|
|
|
220
|
+ *
|
|
|
221
|
+ * @return
|
|
|
222
|
+ */
|
|
|
223
|
+ public void noticeBuyerWhenDeliveryDepositGoodsToBuyer(int buyerUid, String wayBillCode, SellerOrderGoods psog,Product product) {
|
|
|
224
|
+
|
|
|
225
|
+ executorService.execute(()->{
|
|
|
226
|
+
|
|
|
227
|
+ try {
|
|
|
228
|
+ logger.info("record noticeBuyerWhenDeliveryGoodsToBuyer inbox msg, buyerUid {}, wayBillCode {}, psog {},SellerOrderGoods {} product {}",
|
|
|
229
|
+ buyerUid, wayBillCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
|
|
230
|
+ String skupTypeText=SkupType.getSkupType(psog.getAttributes()).attrName();
|
|
|
231
|
+ String prdName = psog.getProductName();
|
|
|
232
|
+ String sizeName = psog.getSizeName();
|
|
|
233
|
+ String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
|
|
234
|
+
|
|
|
235
|
+ InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_DEPOSIT_GOODS_PURCHASE_SENDED;
|
|
|
236
|
+ String params = buildParams(prdName,sizeName,productCode);
|
|
|
237
|
+ InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
238
|
+
|
|
|
239
|
+ InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
240
|
+ logger.info("record noticeBuyerWhenDeliveryGoodsToBuyer inbox msg, buyerUid {}, wayBillCode {}, prdName {},SellerOrderGoods {} resp {}",
|
|
|
241
|
+ buyerUid, wayBillCode, prdName, JSON.toJSONString(psog), resp);
|
|
|
242
|
+
|
|
|
243
|
+ //短信
|
|
|
244
|
+ String phone = userProxyService.getMobile(buyerUid);
|
|
|
245
|
+ if (StringUtils.isBlank(phone)){
|
|
|
246
|
+ logger.warn("in noticeBuyerWhenDeliveryGoodsToBuyer notice buyer sms fail, buyerUid {} wayBillCode {} prdName {} ",
|
|
|
247
|
+ buyerUid, wayBillCode,prdName);
|
|
|
248
|
+ }else{
|
|
|
249
|
+ List<String> mobileList = Arrays.asList(phone);
|
|
|
250
|
+ String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_DEPOSIT_GOODS_PURCHASE_SENDED.getContent(),prdName,sizeName,productCode,wayBillCode);
|
|
|
251
|
+ sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
252
|
+ logger.info("record noticeBuyerWhenDeliveryGoodsToBuyer notice buyer sms msg, buyerUid {}, wayBillCode {}, prdName {} phone {}",
|
|
|
253
|
+ buyerUid, wayBillCode,prdName, phone);
|
|
|
254
|
+ }
|
|
|
255
|
+ } catch (Exception e) {
|
|
|
256
|
+ logger.warn("InBoxFacade noticeBuyerWhenDeliveryGoodsToBuyer error inbox msg, buyerUid {}, wayBillCode {} ,psog {}",
|
|
|
257
|
+ buyerUid, wayBillCode, psog, e);
|
|
|
258
|
+ }
|
|
|
259
|
+ });
|
|
|
260
|
+
|
|
|
261
|
+ }
|
|
|
262
|
+
|
|
|
263
|
+ /**
|
219
|
* 平台已发货给买家
|
264
|
* 平台已发货给买家
|
220
|
*
|
265
|
*
|
221
|
* @return
|
266
|
* @return
|