|
@@ -183,7 +183,7 @@ public class InBoxFacade { |
|
@@ -183,7 +183,7 @@ public class InBoxFacade { |
183
|
*
|
183
|
*
|
184
|
* @return
|
184
|
* @return
|
185
|
*/
|
185
|
*/
|
186
|
- public void appraisePassNotice(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
186
|
+ public void appraisePassNoticeBuyer(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
187
|
|
187
|
|
188
|
executorService.execute(()->{
|
188
|
executorService.execute(()->{
|
189
|
|
189
|
|
|
@@ -191,6 +191,7 @@ public class InBoxFacade { |
|
@@ -191,6 +191,7 @@ public class InBoxFacade { |
191
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
191
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
192
|
buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
192
|
buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
193
|
String prdName = psog.getProductName();
|
193
|
String prdName = psog.getProductName();
|
|
|
194
|
+ String sizeName = psog.getSizeName();
|
194
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
195
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
195
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
196
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
196
|
String params = buildParams(orderCode);
|
197
|
String params = buildParams(orderCode);
|
|
@@ -200,27 +201,6 @@ public class InBoxFacade { |
|
@@ -200,27 +201,6 @@ public class InBoxFacade { |
200
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, prdName {},SellerOrderGoods {} resp {}",
|
201
|
logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, prdName {},SellerOrderGoods {} resp {}",
|
201
|
buyerUid, orderCode, prdName, JSON.toJSONString(psog), resp);
|
202
|
buyerUid, orderCode, prdName, JSON.toJSONString(psog), resp);
|
202
|
|
203
|
|
203
|
- //seller notice
|
|
|
204
|
- String sizeName = psog.getSizeName();
|
|
|
205
|
- Integer sellerUid = psog.getUid();
|
|
|
206
|
- InboxBusinessTypeEnum ibtOfSeller = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_PASS;
|
|
|
207
|
- String paramsOfSeller = buildParams(prdName, sizeName);
|
|
|
208
|
- InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller);
|
|
|
209
|
-
|
|
|
210
|
- InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller);
|
|
|
211
|
- logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, prdName {} ,sizeName {} ,resp {}",
|
|
|
212
|
- buyerUid, orderCode, prdName,sizeName, respOfSeller);
|
|
|
213
|
- String phoneOfSeller = userProxyService.getMobile(sellerUid);
|
|
|
214
|
- if (StringUtils.isBlank(phoneOfSeller)){
|
|
|
215
|
- logger.warn("in appraisePassNotice sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
|
|
216
|
- }else{
|
|
|
217
|
- List<String> mobileList = Arrays.asList(phoneOfSeller);
|
|
|
218
|
- String contentOfSeller = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_APPRAISE_PASS.getContent(), orderCode);
|
|
|
219
|
- sendSmsService.smsSendByMobile(contentOfSeller, mobileList);
|
|
|
220
|
- logger.info("record appraisePassNotice sms msg notice seller, sellerUid {}, orderCode {}, prdName {} sizeName {} phone {}",
|
|
|
221
|
- sellerUid, orderCode, prdName, sizeName, phoneOfSeller);
|
|
|
222
|
- }
|
|
|
223
|
-
|
|
|
224
|
//短信
|
204
|
//短信
|
225
|
String phone = userProxyService.getMobile(buyerUid);
|
205
|
String phone = userProxyService.getMobile(buyerUid);
|
226
|
if (StringUtils.isBlank(phone)){
|
206
|
if (StringUtils.isBlank(phone)){
|
|
@@ -239,6 +219,45 @@ public class InBoxFacade { |
|
@@ -239,6 +219,45 @@ public class InBoxFacade { |
239
|
});
|
219
|
});
|
240
|
|
220
|
|
241
|
}
|
221
|
}
|
|
|
222
|
+
|
|
|
223
|
+ public void appraisePassNoticeSeller(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
|
|
224
|
+
|
|
|
225
|
+ executorService.execute(()->{
|
|
|
226
|
+
|
|
|
227
|
+ try {
|
|
|
228
|
+ logger.info("record appraisePassNoticeSeller inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
|
|
229
|
+ buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
|
|
230
|
+ String prdName = psog.getProductName();
|
|
|
231
|
+ String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
|
|
232
|
+
|
|
|
233
|
+ //seller notice
|
|
|
234
|
+ String sizeName = psog.getSizeName();
|
|
|
235
|
+ Integer sellerUid = psog.getUid();
|
|
|
236
|
+ InboxBusinessTypeEnum ibtOfSeller = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_APPRAISE_PASS;
|
|
|
237
|
+ String paramsOfSeller = buildParams(prdName, sizeName);
|
|
|
238
|
+ InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller);
|
|
|
239
|
+
|
|
|
240
|
+ InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller);
|
|
|
241
|
+ logger.info("record appraisePassNoticeSeller inbox msg, buyerUid {}, orderCode {}, prdName {} ,sizeName {} ,resp {}",
|
|
|
242
|
+ buyerUid, orderCode, prdName,sizeName, respOfSeller);
|
|
|
243
|
+ String phoneOfSeller = userProxyService.getMobile(sellerUid);
|
|
|
244
|
+ if (StringUtils.isBlank(phoneOfSeller)){
|
|
|
245
|
+ logger.warn("in appraisePassNoticeSeller sms fail, buyerUid {} orderCode {} prdName {} ", buyerUid, orderCode,prdName);
|
|
|
246
|
+ }else{
|
|
|
247
|
+ List<String> mobileList = Arrays.asList(phoneOfSeller);
|
|
|
248
|
+ String contentOfSeller = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTICE_SELLER_WHEN_APPRAISE_PASS.getContent(), orderCode);
|
|
|
249
|
+ sendSmsService.smsSendByMobile(contentOfSeller, mobileList);
|
|
|
250
|
+ logger.info("record appraisePassNoticeSeller sms msg notice seller, sellerUid {}, orderCode {}, prdName {} sizeName {} phone {}",
|
|
|
251
|
+ sellerUid, orderCode, prdName, sizeName, phoneOfSeller);
|
|
|
252
|
+ }
|
|
|
253
|
+
|
|
|
254
|
+ } catch (Exception e) {
|
|
|
255
|
+ logger.warn("InBoxFacade appraisePassNoticeSeller error inbox msg, buyerUid {}, orderCode {} ,psog {}",
|
|
|
256
|
+ buyerUid, orderCode, psog, e);
|
|
|
257
|
+ }
|
|
|
258
|
+ });
|
|
|
259
|
+
|
|
|
260
|
+ }
|
242
|
private String replaceSMSContent(InboxBusinessTypeEnum ibte, Object... params){
|
261
|
private String replaceSMSContent(InboxBusinessTypeEnum ibte, Object... params){
|
243
|
return getReplacedContent(ibte.getContent(), params);
|
262
|
return getReplacedContent(ibte.getContent(), params);
|
244
|
}
|
263
|
}
|