|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; |
|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; |
4
|
import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
|
4
|
import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum;
|
5
|
import com.yohobuy.ufo.model.order.common.SuperEnterStageLevel;
|
5
|
import com.yohobuy.ufo.model.order.common.SuperEnterStageLevel;
|
6
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
6
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
7
|
+import com.yohoufo.dal.product.ProductMapper;
|
7
|
import com.yohoufo.dal.product.model.Product;
|
8
|
import com.yohoufo.dal.product.model.Product;
|
8
|
import com.yohoufo.inboxclient.model.InBoxResponse;
|
9
|
import com.yohoufo.inboxclient.model.InBoxResponse;
|
9
|
import com.yohoufo.inboxclient.model.InboxReqVO;
|
10
|
import com.yohoufo.inboxclient.model.InboxReqVO;
|
|
@@ -44,6 +45,9 @@ public class InBoxFacade { |
|
@@ -44,6 +45,9 @@ public class InBoxFacade { |
44
|
@Autowired
|
45
|
@Autowired
|
45
|
private UserProxyService userProxyService;
|
46
|
private UserProxyService userProxyService;
|
46
|
|
47
|
|
|
|
48
|
+ @Autowired
|
|
|
49
|
+ private ProductMapper productMapper;
|
|
|
50
|
+
|
47
|
/*********************************************************************
|
51
|
/*********************************************************************
|
48
|
* 买家消息 和 短信
|
52
|
* 买家消息 和 短信
|
49
|
********************************************************************/
|
53
|
********************************************************************/
|
|
@@ -99,12 +103,11 @@ public class InBoxFacade { |
|
@@ -99,12 +103,11 @@ public class InBoxFacade { |
99
|
* 卖家发货后
|
103
|
* 卖家发货后
|
100
|
* @param buyerUid
|
104
|
* @param buyerUid
|
101
|
* @param orderCode
|
105
|
* @param orderCode
|
102
|
- * @param prdName
|
|
|
103
|
*/
|
106
|
*/
|
104
|
- public void sellerDeliver2Depot(int buyerUid, long orderCode, String prdName){
|
107
|
+ public void sellerDeliver2Depot(int buyerUid, long orderCode,SellerOrderGoods psog ){
|
105
|
executorService.execute(()-> {
|
108
|
executorService.execute(()-> {
|
106
|
try {
|
109
|
try {
|
107
|
-
|
110
|
+ String prdName = psog.getProductName();
|
108
|
InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_SELLER_DELIVER;
|
111
|
InboxBusinessTypeEnum ibtOfBuyer = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_SELLER_DELIVER;
|
109
|
String params = buildParams(orderCode);
|
112
|
String params = buildParams(orderCode);
|
110
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibtOfBuyer);
|
113
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibtOfBuyer);
|
|
@@ -112,13 +115,17 @@ public class InBoxFacade { |
|
@@ -112,13 +115,17 @@ public class InBoxFacade { |
112
|
logger.info("record sellerDeliver2Depot inbox msg, buyerUid {}, orderCode {}, prdName {} resp {}",
|
115
|
logger.info("record sellerDeliver2Depot inbox msg, buyerUid {}, orderCode {}, prdName {} resp {}",
|
113
|
buyerUid, orderCode, prdName, resp);
|
116
|
buyerUid, orderCode, prdName, resp);
|
114
|
|
117
|
|
|
|
118
|
+ String sizeName= psog.getSizeName();
|
|
|
119
|
+ Product product = productMapper.selectByPrimaryKey(psog.getProductId());
|
|
|
120
|
+ String productCode = product.getProductCode();
|
|
|
121
|
+
|
115
|
//sms
|
122
|
//sms
|
116
|
String phone = userProxyService.getMobile(buyerUid);
|
123
|
String phone = userProxyService.getMobile(buyerUid);
|
117
|
if (StringUtils.isBlank(phone)){
|
124
|
if (StringUtils.isBlank(phone)){
|
118
|
logger.warn("in sellerDeliver2Depot sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
125
|
logger.warn("in sellerDeliver2Depot sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
119
|
return;
|
126
|
return;
|
120
|
}
|
127
|
}
|
121
|
- String content=getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_SELLER_DELIVER.getContent(),prdName,orderCode);
|
128
|
+ String content=getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_SELLER_DELIVER.getContent(),prdName,sizeName,productCode,orderCode);
|
122
|
List<String> mobileList = Arrays.asList(phone);
|
129
|
List<String> mobileList = Arrays.asList(phone);
|
123
|
sendSmsService.smsSendByMobile(content,mobileList);
|
130
|
sendSmsService.smsSendByMobile(content,mobileList);
|
124
|
logger.info("record sellerDeliver2Depot inbox sms msg, buyerUid {}, orderCode {}, prdName {} phone {}",
|
131
|
logger.info("record sellerDeliver2Depot inbox sms msg, buyerUid {}, orderCode {}, prdName {} phone {}",
|
|
@@ -126,7 +133,7 @@ public class InBoxFacade { |
|
@@ -126,7 +133,7 @@ public class InBoxFacade { |
126
|
|
133
|
|
127
|
} catch (Exception ex) {
|
134
|
} catch (Exception ex) {
|
128
|
logger.warn("InBoxFacade depotDeliver2Buyer error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
135
|
logger.warn("InBoxFacade depotDeliver2Buyer error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
129
|
- buyerUid, orderCode,prdName, ex);
|
136
|
+ buyerUid, orderCode,psog, ex);
|
130
|
}
|
137
|
}
|
131
|
});
|
138
|
});
|
132
|
}
|
139
|
}
|
|
@@ -271,9 +278,14 @@ public class InBoxFacade { |
|
@@ -271,9 +278,14 @@ public class InBoxFacade { |
271
|
*
|
278
|
*
|
272
|
* @param orderCode
|
279
|
* @param orderCode
|
273
|
*/
|
280
|
*/
|
274
|
- public void noticeBuyerWhenSellerCancelAfterPaid(int buyerUid, long orderCode,String prdName) {
|
281
|
+ public void noticeBuyerWhenSellerCancelAfterPaid(int buyerUid, long orderCode,SellerOrderGoods psog ) {
|
275
|
try {
|
282
|
try {
|
276
|
executorService.execute(()->{
|
283
|
executorService.execute(()->{
|
|
|
284
|
+ String prdName = psog.getProductName();
|
|
|
285
|
+ String sizeName =psog.getSizeName();
|
|
|
286
|
+ Product product = productMapper.selectByPrimaryKey(psog.getProductId());
|
|
|
287
|
+ String productCode = product.getProductCode();
|
|
|
288
|
+
|
277
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_SELLER;
|
289
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_SELLER;
|
278
|
String params = buildParams(orderCode);
|
290
|
String params = buildParams(orderCode);
|
279
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
291
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
@@ -290,9 +302,7 @@ public class InBoxFacade { |
|
@@ -290,9 +302,7 @@ public class InBoxFacade { |
290
|
}
|
302
|
}
|
291
|
List<String> mobileList = Arrays.asList(phone);
|
303
|
List<String> mobileList = Arrays.asList(phone);
|
292
|
|
304
|
|
293
|
- //SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_SELLER;
|
|
|
294
|
- //String content=smsIbt.getReplacedContent(prdName);
|
|
|
295
|
- String content=getReplacedContent(InboxBusinessTypeEnum.SMS_CLOSED_SELLER.getContent(),prdName,orderCode);
|
305
|
+ String content=getReplacedContent(InboxBusinessTypeEnum.SMS_CLOSED_SELLER.getContent(),prdName,productCode,sizeName,orderCode);
|
296
|
|
306
|
|
297
|
sendSmsService.smsSendByMobile(content,mobileList);
|
307
|
sendSmsService.smsSendByMobile(content,mobileList);
|
298
|
logger.info("record noticeBuyerWhenSellerCancelAfterPaid inbox sms msg, buyerUid {}, orderCode {},prdName {}",
|
308
|
logger.info("record noticeBuyerWhenSellerCancelAfterPaid inbox sms msg, buyerUid {}, orderCode {},prdName {}",
|
|
@@ -300,7 +310,7 @@ public class InBoxFacade { |
|
@@ -300,7 +310,7 @@ public class InBoxFacade { |
300
|
});
|
310
|
});
|
301
|
} catch (Exception e) {
|
311
|
} catch (Exception e) {
|
302
|
logger.warn("InBoxFacade noticeBuyerWhenSellerCancelAfterPaid error inbox msg, buyerUid {}, orderCode {} prdName {}",
|
312
|
logger.warn("InBoxFacade noticeBuyerWhenSellerCancelAfterPaid error inbox msg, buyerUid {}, orderCode {} prdName {}",
|
303
|
- buyerUid, orderCode,prdName, e);
|
313
|
+ buyerUid, orderCode,psog, e);
|
304
|
}
|
314
|
}
|
305
|
}
|
315
|
}
|
306
|
|
316
|
|
|
@@ -330,9 +340,11 @@ public class InBoxFacade { |
|
@@ -330,9 +340,11 @@ public class InBoxFacade { |
330
|
* @param buyerUid
|
340
|
* @param buyerUid
|
331
|
* @param orderCode
|
341
|
* @param orderCode
|
332
|
*/
|
342
|
*/
|
333
|
- public void buyerGetEarnestMoneyWhenAppraiseFail(int buyerUid, long orderCode,String prdName) {
|
343
|
+ public void buyerGetEarnestMoneyWhenAppraiseFail(int buyerUid, long orderCode,SellerOrderGoods sellerOrderGoods ) {
|
334
|
try {
|
344
|
try {
|
335
|
executorService.execute(()->{
|
345
|
executorService.execute(()->{
|
|
|
346
|
+ String prdName = sellerOrderGoods.getProductName();
|
|
|
347
|
+ String sizeName=sellerOrderGoods.getSizeName();
|
336
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_PLATFORM;
|
348
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_PLATFORM;
|
337
|
String params = buildParams(orderCode);
|
349
|
String params = buildParams(orderCode);
|
338
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
350
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
@@ -341,6 +353,9 @@ public class InBoxFacade { |
|
@@ -341,6 +353,9 @@ public class InBoxFacade { |
341
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
|
353
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
|
342
|
buyerUid, orderCode,prdName, resp);
|
354
|
buyerUid, orderCode,prdName, resp);
|
343
|
|
355
|
|
|
|
356
|
+ Product product = productMapper.selectByPrimaryKey(sellerOrderGoods.getProductId());
|
|
|
357
|
+ String productCode = product.getProductCode();
|
|
|
358
|
+
|
344
|
//短信
|
359
|
//短信
|
345
|
String phone = userProxyService.getMobile(buyerUid);
|
360
|
String phone = userProxyService.getMobile(buyerUid);
|
346
|
if (StringUtils.isBlank(phone)){
|
361
|
if (StringUtils.isBlank(phone)){
|
|
@@ -348,17 +363,15 @@ public class InBoxFacade { |
|
@@ -348,17 +363,15 @@ public class InBoxFacade { |
348
|
return;
|
363
|
return;
|
349
|
}
|
364
|
}
|
350
|
List<String> mobileList = Arrays.asList(phone);
|
365
|
List<String> mobileList = Arrays.asList(phone);
|
351
|
- //SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_PLATFORM;
|
|
|
352
|
- //String content=smsIbt.getReplacedContent(prdName);
|
|
|
353
|
|
366
|
|
354
|
- String content=getReplacedContent(InboxBusinessTypeEnum.SMS_CLOSED_PLATFORM.getContent(),prdName,orderCode);
|
367
|
+ String content=getReplacedContent(InboxBusinessTypeEnum.SMS_CLOSED_PLATFORM.getContent(),prdName,sizeName,productCode,orderCode);
|
355
|
sendSmsService.smsSendByMobile(content,mobileList);
|
368
|
sendSmsService.smsSendByMobile(content,mobileList);
|
356
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox sms msg, buyerUid {}, orderCode {},prdName {}",
|
369
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox sms msg, buyerUid {}, orderCode {},prdName {}",
|
357
|
buyerUid, orderCode,prdName);
|
370
|
buyerUid, orderCode,prdName);
|
358
|
});
|
371
|
});
|
359
|
} catch (Exception e) {
|
372
|
} catch (Exception e) {
|
360
|
logger.warn("InBoxFacade buyerGetEarnestMoneyWhenAppraiseFail error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
373
|
logger.warn("InBoxFacade buyerGetEarnestMoneyWhenAppraiseFail error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
361
|
- buyerUid, orderCode,prdName, e);
|
374
|
+ buyerUid, orderCode,sellerOrderGoods, e);
|
362
|
}
|
375
|
}
|
363
|
}
|
376
|
}
|
364
|
|
377
|
|
|
@@ -1143,8 +1156,6 @@ public class InBoxFacade { |
|
@@ -1143,8 +1156,6 @@ public class InBoxFacade { |
1143
|
return;
|
1156
|
return;
|
1144
|
}
|
1157
|
}
|
1145
|
List<String> mobileList = Arrays.asList(phone);
|
1158
|
List<String> mobileList = Arrays.asList(phone);
|
1146
|
- //SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_PLATFORM;
|
|
|
1147
|
- //String content=smsIbt.getReplacedContent(prdName);
|
|
|
1148
|
|
1159
|
|
1149
|
String content= getReplacedContent(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_DELIVERY.getContent(),orderCode);
|
1160
|
String content= getReplacedContent(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_DELIVERY.getContent(),orderCode);
|
1150
|
sendSmsService.smsSendByMobile(content,mobileList);
|
1161
|
sendSmsService.smsSendByMobile(content,mobileList);
|