|
@@ -117,6 +117,8 @@ public class InBoxFacade { |
|
@@ -117,6 +117,8 @@ public class InBoxFacade { |
117
|
}
|
117
|
}
|
118
|
}
|
118
|
}
|
119
|
|
119
|
|
|
|
120
|
+
|
|
|
121
|
+
|
120
|
/**
|
122
|
/**
|
121
|
* 卖家发货后
|
123
|
* 卖家发货后
|
122
|
* @param buyerUid
|
124
|
* @param buyerUid
|
|
@@ -218,17 +220,18 @@ public class InBoxFacade { |
|
@@ -218,17 +220,18 @@ public class InBoxFacade { |
218
|
*
|
220
|
*
|
219
|
* @return
|
221
|
* @return
|
220
|
*/
|
222
|
*/
|
221
|
- public void appraisePassNoticeBuyer(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
223
|
+ public void appraisePassNoticeBuyer(int buyerUid, long orderCode, SellerOrderGoods psog) {
|
222
|
|
224
|
|
223
|
executorService.execute(()->{
|
225
|
executorService.execute(()->{
|
224
|
|
226
|
|
225
|
try {
|
227
|
try {
|
226
|
- logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
|
|
227
|
- buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
228
|
+ logger.info("record appraisePassNotice inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} ",
|
|
|
229
|
+ buyerUid, orderCode, psog, JSON.toJSONString(psog));
|
|
|
230
|
+ Product product = productMapper.selectByPrimaryKey(psog.getProductId());
|
|
|
231
|
+ String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
228
|
String skupTypeText=SkupType.getSkupType(psog.getAttributes()).attrName();
|
232
|
String skupTypeText=SkupType.getSkupType(psog.getAttributes()).attrName();
|
229
|
String prdName = psog.getProductName();
|
233
|
String prdName = psog.getProductName();
|
230
|
String sizeName = psog.getSizeName();
|
234
|
String sizeName = psog.getSizeName();
|
231
|
- String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
|
|
232
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
235
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
233
|
String params = buildParams(orderCode);
|
236
|
String params = buildParams(orderCode);
|
234
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
237
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
@@ -256,14 +259,15 @@ public class InBoxFacade { |
|
@@ -256,14 +259,15 @@ public class InBoxFacade { |
256
|
|
259
|
|
257
|
}
|
260
|
}
|
258
|
|
261
|
|
259
|
- public void appraisePassNoticeSeller(int buyerUid, long orderCode, SellerOrderGoods psog,Product product) {
|
262
|
+ public void appraisePassNoticeSeller(int buyerUid, long orderCode, SellerOrderGoods psog) {
|
260
|
|
263
|
|
261
|
executorService.execute(()->{
|
264
|
executorService.execute(()->{
|
262
|
|
265
|
|
263
|
try {
|
266
|
try {
|
264
|
logger.info("record appraisePassNoticeSeller inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
267
|
logger.info("record appraisePassNoticeSeller inbox msg, buyerUid {}, orderCode {}, psog {},SellerOrderGoods {} product {}",
|
265
|
- buyerUid, orderCode, psog, JSON.toJSONString(psog), JSON.toJSONString(product));
|
268
|
+ buyerUid, orderCode, psog, JSON.toJSONString(psog));
|
266
|
String prdName = psog.getProductName();
|
269
|
String prdName = psog.getProductName();
|
|
|
270
|
+ Product product = productMapper.selectByPrimaryKey(psog.getProductId());
|
267
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
271
|
String productCode = Optional.ofNullable(product).map(Product::getProductCode).orElse("");
|
268
|
|
272
|
|
269
|
//seller notice
|
273
|
//seller notice
|
|
@@ -1755,38 +1759,117 @@ public class InBoxFacade { |
|
@@ -1755,38 +1759,117 @@ public class InBoxFacade { |
1755
|
}
|
1759
|
}
|
1756
|
}
|
1760
|
}
|
1757
|
|
1761
|
|
|
|
1762
|
+ private void execute(Runnable task, String logModule, Object[] logParms){
|
|
|
1763
|
+ try{
|
|
|
1764
|
+ executorService.execute(task);
|
|
|
1765
|
+ }catch (Exception ex){
|
|
|
1766
|
+
|
|
|
1767
|
+ logger.warn(logModule, logParms, ex);
|
|
|
1768
|
+ }
|
|
|
1769
|
+ }
|
|
|
1770
|
+
|
1758
|
public void noticeWhenBuyerBlownCustomsClearance(int buyerUid, long orderCode, SellerOrderGoods sog){
|
1771
|
public void noticeWhenBuyerBlownCustomsClearance(int buyerUid, long orderCode, SellerOrderGoods sog){
|
1759
|
String prdName = sog.getProductName();
|
1772
|
String prdName = sog.getProductName();
|
1760
|
String sizeName = sog.getSizeName();
|
1773
|
String sizeName = sog.getSizeName();
|
1761
|
- try {
|
|
|
1762
|
- executorService.execute(()->{
|
|
|
1763
|
- InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.BUYER_BLOWN_CUSTOMS_CLEARANCE;
|
|
|
1764
|
- String params = buildParams(orderCode);
|
|
|
1765
|
- InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
1766
|
|
1774
|
|
1767
|
- InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
1768
|
- logger.info("record noticeWhenBuyerBlownCustomsClearance to buyer inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
|
|
|
1769
|
- buyerUid, orderCode,prdName, resp);
|
1775
|
+ Runnable task = ()->{
|
|
|
1776
|
+ InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.BUYER_BLOWN_CUSTOMS_CLEARANCE;
|
|
|
1777
|
+ String params = buildParams(orderCode);
|
|
|
1778
|
+ InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
1770
|
|
1779
|
|
1771
|
- //短信
|
|
|
1772
|
- String phone = userProxyService.getMobile(buyerUid);
|
|
|
1773
|
- if (StringUtils.isBlank(phone)){
|
|
|
1774
|
- logger.warn("in noticeWhenBuyerBlownCustomsClearance sms fail, buyerUid {} orderCode {} prdName {}", buyerUid, orderCode,prdName);
|
|
|
1775
|
- return;
|
|
|
1776
|
- }
|
|
|
1777
|
- List<String> mobileList = Arrays.asList(phone);
|
1780
|
+ InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
1781
|
+ logger.info("record noticeWhenBuyerBlownCustomsClearance to buyer inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
|
|
|
1782
|
+ buyerUid, orderCode,prdName, resp);
|
1778
|
|
1783
|
|
1779
|
- InboxBusinessTypeEnum sms=InboxBusinessTypeEnum.SMS_BUYER_BLOWN_CUSTOMS_CLEARANCE;
|
1784
|
+ //短信
|
|
|
1785
|
+ String phone = userProxyService.getMobile(buyerUid);
|
|
|
1786
|
+ if (StringUtils.isBlank(phone)){
|
|
|
1787
|
+ logger.warn("in noticeWhenBuyerBlownCustomsClearance sms fail, buyerUid {} orderCode {} prdName {}", buyerUid, orderCode,prdName);
|
|
|
1788
|
+ return;
|
|
|
1789
|
+ }
|
|
|
1790
|
+ List<String> mobileList = Arrays.asList(phone);
|
1780
|
|
1791
|
|
1781
|
- String content= getReplacedContent(sms.getContent(),prdName,sizeName,orderCode);
|
|
|
1782
|
- sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
1783
|
- logger.info("record noticeWhenBuyerBlownCustomsClearance inbox sms msg, buyer Uid {}, orderCode {},prdName {} ,sizeName {} ",
|
|
|
1784
|
- buyerUid, orderCode, prdName,sizeName);
|
|
|
1785
|
- });
|
|
|
1786
|
- } catch (Exception e) {
|
|
|
1787
|
- logger.warn("InBoxFacade noticeWhenBuyerBlownCustomsClearance error inbox msg, buyerUid {}, orderCode {} ,prdName {}",
|
|
|
1788
|
- buyerUid, orderCode, prdName, e);
|
|
|
1789
|
- }
|
1792
|
+ InboxBusinessTypeEnum sms=InboxBusinessTypeEnum.SMS_BUYER_BLOWN_CUSTOMS_CLEARANCE;
|
|
|
1793
|
+
|
|
|
1794
|
+ String content= getReplacedContent(sms.getContent(),prdName,sizeName,orderCode);
|
|
|
1795
|
+ sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
1796
|
+ logger.info("record noticeWhenBuyerBlownCustomsClearance inbox sms msg, buyer Uid {}, orderCode {},prdName {} ,sizeName {} ",
|
|
|
1797
|
+ buyerUid, orderCode, prdName,sizeName);
|
|
|
1798
|
+ };
|
|
|
1799
|
+ String logModule = "InBoxFacade noticeWhenBuyerBlownCustomsClearance error inbox msg, buyerUid {}, orderCode {} ,prdName {}";
|
|
|
1800
|
+ Object[] logparams = new Object[]{buyerUid, orderCode, prdName};
|
|
|
1801
|
+
|
|
|
1802
|
+ execute(task, logModule, logparams);
|
|
|
1803
|
+ }
|
|
|
1804
|
+
|
|
|
1805
|
+ public void noticeWhenQuickDeliverOrderPaid(int buyerUid, long orderCode, SellerOrderGoods sog){
|
|
|
1806
|
+ String prdName = sog.getProductName();
|
|
|
1807
|
+ String sizeName = sog.getSizeName();
|
|
|
1808
|
+
|
|
|
1809
|
+ Runnable task = ()->{
|
|
|
1810
|
+ InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_QUICK_DELIVER_ORDER_PAID;
|
|
|
1811
|
+ String params = buildParams(orderCode);
|
|
|
1812
|
+ InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
1813
|
+
|
|
|
1814
|
+ InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
1815
|
+ logger.info("record noticeWhenQuickDeliverOrderPaid to buyer inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
|
|
|
1816
|
+ buyerUid, orderCode,prdName, resp);
|
|
|
1817
|
+
|
|
|
1818
|
+ //短信
|
|
|
1819
|
+ String phone = userProxyService.getMobile(buyerUid);
|
|
|
1820
|
+ if (StringUtils.isBlank(phone)){
|
|
|
1821
|
+ logger.warn("in noticeWhenQuickDeliverOrderPaid sms fail, buyerUid {} orderCode {} prdName {}", buyerUid, orderCode,prdName);
|
|
|
1822
|
+ return;
|
|
|
1823
|
+ }
|
|
|
1824
|
+ List<String> mobileList = Arrays.asList(phone);
|
|
|
1825
|
+
|
|
|
1826
|
+ InboxBusinessTypeEnum sms=InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_QUICK_DELIVER_ORDER_PAID;
|
|
|
1827
|
+
|
|
|
1828
|
+ String content= getReplacedContent(sms.getContent(),prdName,sizeName,orderCode);
|
|
|
1829
|
+ sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
1830
|
+ logger.info("record noticeWhenQuickDeliverOrderPaid inbox sms msg, buyer Uid {}, orderCode {},prdName {} ,sizeName {} ",
|
|
|
1831
|
+ buyerUid, orderCode, prdName,sizeName);
|
|
|
1832
|
+ };
|
|
|
1833
|
+ String logModule = "InBoxFacade noticeWhenQuickDeliverOrderPaid error inbox msg, buyerUid {}, orderCode {} ,prdName {}";
|
|
|
1834
|
+ Object[] logparams = new Object[]{buyerUid, orderCode, prdName};
|
|
|
1835
|
+
|
|
|
1836
|
+ execute(task, logModule, logparams);
|
|
|
1837
|
+ appraisePassNoticeSeller(buyerUid,orderCode, sog);
|
|
|
1838
|
+ }
|
|
|
1839
|
+
|
|
|
1840
|
+ public void noticeWhenDepositOrderOfQuickDeliverGoodsPaid(int buyerUid, long orderCode, SellerOrderGoods sog){
|
|
|
1841
|
+ String prdName = sog.getProductName();
|
|
|
1842
|
+ String sizeName = sog.getSizeName();
|
|
|
1843
|
+
|
|
|
1844
|
+ Runnable task = ()->{
|
|
|
1845
|
+ InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_BUYER_WHEN_DEPOSIT_ORDER_OF_QUICK_DELIVER_PAID;
|
|
|
1846
|
+ String params = buildParams(orderCode);
|
|
|
1847
|
+ InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
1848
|
+
|
|
|
1849
|
+ InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
1850
|
+ logger.info("record noticeWhenDepositOrderOfPaid to buyer inbox msg, buyerUid {}, orderCode {},prdName {} resp {}",
|
|
|
1851
|
+ buyerUid, orderCode,prdName, resp);
|
|
|
1852
|
+
|
|
|
1853
|
+ //短信
|
|
|
1854
|
+ String phone = userProxyService.getMobile(buyerUid);
|
|
|
1855
|
+ if (StringUtils.isBlank(phone)){
|
|
|
1856
|
+ logger.warn("in noticeWhenDepositOrderOfPaid sms fail, buyerUid {} orderCode {} prdName {}", buyerUid, orderCode,prdName);
|
|
|
1857
|
+ return;
|
|
|
1858
|
+ }
|
|
|
1859
|
+ List<String> mobileList = Arrays.asList(phone);
|
|
|
1860
|
+
|
|
|
1861
|
+ InboxBusinessTypeEnum sms=InboxBusinessTypeEnum.SMS_NOTICE_BUYER_WHEN_DEPOSIT_ORDER_OF_QUICK_DELIVER_PAID;
|
|
|
1862
|
+
|
|
|
1863
|
+ String content= getReplacedContent(sms.getContent(),prdName,sizeName,orderCode);
|
|
|
1864
|
+ sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
1865
|
+ logger.info("record noticeWhenDepositOrderOfPaid inbox sms msg, buyer Uid {}, orderCode {},prdName {} ,sizeName {} ",
|
|
|
1866
|
+ buyerUid, orderCode, prdName,sizeName);
|
|
|
1867
|
+ };
|
|
|
1868
|
+ String logModule = "InBoxFacade noticeWhenDepositOrderOfPaid error inbox msg, buyerUid {}, orderCode {} ,prdName {}";
|
|
|
1869
|
+ Object[] logparams = new Object[]{buyerUid, orderCode, prdName};
|
|
|
1870
|
+ execute(task, logModule, logparams);
|
|
|
1871
|
+ //
|
|
|
1872
|
+ appraisePassNoticeSeller(buyerUid,orderCode, sog);
|
1790
|
}
|
1873
|
}
|
1791
|
|
1874
|
|
1792
|
public InboxReqVO buildInboxReqVO(int uid, String params, InboxBusinessTypeEnum ibt) {
|
1875
|
public InboxReqVO buildInboxReqVO(int uid, String params, InboxBusinessTypeEnum ibt) {
|