Authored by qinchao

卖家消息,区分现货等类型

@@ -631,13 +631,14 @@ public class InBoxFacade { @@ -631,13 +631,14 @@ public class InBoxFacade {
631 public void sellerPlaySelf(int sellerUid,SellerOrderGoods sellerOrderGoods) { 631 public void sellerPlaySelf(int sellerUid,SellerOrderGoods sellerOrderGoods) {
632 try { 632 try {
633 executorService.execute(() -> { 633 executorService.execute(() -> {
  634 + String skupTypeText=SkupType.getSkupType(sellerOrderGoods.getAttributes()).attrName();
634 String prdName = sellerOrderGoods.getProductName(); 635 String prdName = sellerOrderGoods.getProductName();
635 String sizeName = sellerOrderGoods.getSizeName(); 636 String sizeName = sellerOrderGoods.getSizeName();
636 Product product = productMapper.selectByPrimaryKey(sellerOrderGoods.getProductId()); 637 Product product = productMapper.selectByPrimaryKey(sellerOrderGoods.getProductId());
637 String productCode = product.getProductCode(); 638 String productCode = product.getProductCode();
638 639
639 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_UNSHELF; 640 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_UNSHELF;
640 - String params = buildParams(prdName,sizeName,productCode); 641 + String params = buildParams(skupTypeText,prdName,sizeName,productCode);
641 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt); 642 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
642 643
643 InBoxResponse resp = inBoxSDK.addInbox(req); 644 InBoxResponse resp = inBoxSDK.addInbox(req);
@@ -661,13 +662,14 @@ public class InBoxFacade { @@ -661,13 +662,14 @@ public class InBoxFacade {
661 public void sellerSkupCreateOrderByBuyer(int sellerUid, SellerOrderGoods psog) { 662 public void sellerSkupCreateOrderByBuyer(int sellerUid, SellerOrderGoods psog) {
662 try { 663 try {
663 executorService.execute(() -> { 664 executorService.execute(() -> {
  665 + String skupTypeText=SkupType.getSkupType(psog.getAttributes()).attrName();
664 String prdName = psog.getProductName(); 666 String prdName = psog.getProductName();
665 String sizeName = psog.getSizeName(); 667 String sizeName = psog.getSizeName();
666 Product product = productMapper.selectByPrimaryKey(psog.getProductId()); 668 Product product = productMapper.selectByPrimaryKey(psog.getProductId());
667 String productCode = product.getProductCode(); 669 String productCode = product.getProductCode();
668 670
669 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SELLED; 671 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SELLED;
670 - String params = buildParams(prdName,sizeName,productCode); 672 + String params = buildParams(skupTypeText,prdName,sizeName,productCode);
671 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt); 673 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
672 674
673 InBoxResponse resp = inBoxSDK.addInbox(req); 675 InBoxResponse resp = inBoxSDK.addInbox(req);
@@ -819,11 +821,12 @@ public class InBoxFacade { @@ -819,11 +821,12 @@ public class InBoxFacade {
819 String sizeName = sog.getSizeName(); 821 String sizeName = sog.getSizeName();
820 try { 822 try {
821 executorService.execute(() -> { 823 executorService.execute(() -> {
  824 + String skupTypeText=SkupType.getSkupType(sog.getAttributes()).attrName();
822 Product product = productMapper.selectByPrimaryKey(sog.getProductId()); 825 Product product = productMapper.selectByPrimaryKey(sog.getProductId());
823 String productCode = product.getProductCode(); 826 String productCode = product.getProductCode();
824 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SEND; 827 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SEND;
825 String timelimitDesc = new StringBuilder().append(deliveryTimeLimit).append(unit).toString(); 828 String timelimitDesc = new StringBuilder().append(deliveryTimeLimit).append(unit).toString();
826 - String params = buildParams(prdName, sizeName,productCode, timelimitDesc); 829 + String params = buildParams(skupTypeText,prdName, sizeName,productCode, timelimitDesc);
827 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt); 830 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
828 831
829 InBoxResponse resp = inBoxSDK.addInbox(req); 832 InBoxResponse resp = inBoxSDK.addInbox(req);
@@ -842,7 +845,7 @@ public class InBoxFacade { @@ -842,7 +845,7 @@ public class InBoxFacade {
842 return; 845 return;
843 } 846 }
844 List<String> mobileList = Arrays.asList(phone); 847 List<String> mobileList = Arrays.asList(phone);
845 - String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND.getContent(),prdName,sizeName,productCode,orderCode,timelimitDesc); 848 + String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTIFIED_SEND.getContent(),skupTypeText,prdName,sizeName,productCode,orderCode,timelimitDesc);
846 sendSmsService.smsSendByMobile(content, mobileList); 849 sendSmsService.smsSendByMobile(content, mobileList);
847 logger.info("record sellerSkupPaidByBuyer inbox sms msg,sellerUid {}, prdName {},orderCode {} timelimitDesc {}", 850 logger.info("record sellerSkupPaidByBuyer inbox sms msg,sellerUid {}, prdName {},orderCode {} timelimitDesc {}",
848 sellerUid, prdName,orderCode, timelimitDesc); 851 sellerUid, prdName,orderCode, timelimitDesc);
@@ -864,12 +867,12 @@ public class InBoxFacade { @@ -864,12 +867,12 @@ public class InBoxFacade {
864 String prdName = sog.getProductName(); 867 String prdName = sog.getProductName();
865 String sizeName = sog.getSizeName(); 868 String sizeName = sog.getSizeName();
866 try { 869 try {
867 - 870 + executorService.execute(() -> {
868 Product product = productMapper.selectByPrimaryKey(sog.getProductId()); 871 Product product = productMapper.selectByPrimaryKey(sog.getProductId());
869 String productCode = product.getProductCode(); 872 String productCode = product.getProductCode();
870 - executorService.execute(() -> { 873 + String skupTypeText=SkupType.getSkupType(sog.getAttributes()).attrName();
871 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_SELLER; 874 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_SELLER;
872 - String params = buildParams(prdName, sizeName,productCode); 875 + String params = buildParams(skupTypeText,prdName, sizeName,productCode);
873 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt); 876 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
874 877
875 InBoxResponse resp = inBoxSDK.addInbox(req); 878 InBoxResponse resp = inBoxSDK.addInbox(req);
@@ -976,12 +979,13 @@ public class InBoxFacade { @@ -976,12 +979,13 @@ public class InBoxFacade {
976 public void notifyUnshelfCauseBySpecialReason(int sellerUid,SellerOrderGoods psog ) { 979 public void notifyUnshelfCauseBySpecialReason(int sellerUid,SellerOrderGoods psog ) {
977 try { 980 try {
978 executorService.execute(() -> { 981 executorService.execute(() -> {
  982 + String skupTypeText=SkupType.getSkupType(psog.getAttributes()).attrName();
979 String prdName = psog.getProductName(); 983 String prdName = psog.getProductName();
980 String sizeName = psog.getSizeName(); 984 String sizeName = psog.getSizeName();
981 Product product = productMapper.selectByPrimaryKey(psog.getProductId()); 985 Product product = productMapper.selectByPrimaryKey(psog.getProductId());
982 String productCode = product.getProductCode(); 986 String productCode = product.getProductCode();
983 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF; 987 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF;
984 - String params = buildParams(prdName,sizeName,productCode); 988 + String params = buildParams(skupTypeText,prdName,sizeName,productCode);
985 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt); 989 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
986 990
987 InBoxResponse resp = inBoxSDK.addInbox(req); 991 InBoxResponse resp = inBoxSDK.addInbox(req);
@@ -1000,7 +1004,7 @@ public class InBoxFacade { @@ -1000,7 +1004,7 @@ public class InBoxFacade {
1000 return; 1004 return;
1001 } 1005 }
1002 List<String> mobileList = Arrays.asList(phone); 1006 List<String> mobileList = Arrays.asList(phone);
1003 - String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTIFIED_UNSHELF.getContent(),prdName,sizeName,productCode); 1007 + String content = getReplacedContent(InboxBusinessTypeEnum.SMS_NOTIFIED_UNSHELF.getContent(),skupTypeText,prdName,sizeName,productCode);
1004 sendSmsService.smsSendByMobile(content, mobileList); 1008 sendSmsService.smsSendByMobile(content, mobileList);
1005 logger.info("record notifyUnshelfCauseBySpecialReason inbox sms msg,sellerUid {}, prdName {}, resp {}", 1009 logger.info("record notifyUnshelfCauseBySpecialReason inbox sms msg,sellerUid {}, prdName {}, resp {}",
1006 sellerUid, prdName); 1010 sellerUid, prdName);
@@ -1393,6 +1397,7 @@ public class InBoxFacade { @@ -1393,6 +1397,7 @@ public class InBoxFacade {
1393 Integer sellerUid = sog.getUid(); 1397 Integer sellerUid = sog.getUid();
1394 String prdName = sog.getProductName(); 1398 String prdName = sog.getProductName();
1395 String sizeName = sog.getSizeName(); 1399 String sizeName = sog.getSizeName();
  1400 + String skupTypeText=SkupType.getSkupType(sog.getAttributes()).attrName();
1396 InboxBusinessTypeEnum ibt; 1401 InboxBusinessTypeEnum ibt;
1397 InboxBusinessTypeEnum smsInboxBusinessTypeEnum; 1402 InboxBusinessTypeEnum smsInboxBusinessTypeEnum;
1398 String params ; 1403 String params ;
@@ -1401,15 +1406,15 @@ public class InBoxFacade { @@ -1401,15 +1406,15 @@ public class InBoxFacade {
1401 String productCode = product.getProductCode(); 1406 String productCode = product.getProductCode();
1402 try { 1407 try {
1403 if (times == 2) { 1408 if (times == 2) {
1404 - params = buildParams(prdName, sizeName,productCode, leftTime, timeUnit); 1409 + params = buildParams(skupTypeText,prdName, sizeName,productCode, leftTime, timeUnit);
1405 ibt = InboxBusinessTypeEnum.NOTICE_SELLER_DELIVER_GOODS; 1410 ibt = InboxBusinessTypeEnum.NOTICE_SELLER_DELIVER_GOODS;
1406 smsInboxBusinessTypeEnum = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_SECOND; 1411 smsInboxBusinessTypeEnum = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_SECOND;
1407 - content = getReplacedContent(smsInboxBusinessTypeEnum.getContent(),prdName,sizeName,productCode,leftTime,timeUnit,orderCode); 1412 + content = getReplacedContent(smsInboxBusinessTypeEnum.getContent(),skupTypeText,prdName,sizeName,productCode,leftTime,timeUnit,orderCode);
1408 } else if (times == 3) { 1413 } else if (times == 3) {
1409 - params = buildParams(prdName, sizeName,productCode); 1414 + params = buildParams(skupTypeText,prdName, sizeName,productCode);
1410 ibt = InboxBusinessTypeEnum.NOTICE_SELLER_DELIVER_GOODS_FAIL; 1415 ibt = InboxBusinessTypeEnum.NOTICE_SELLER_DELIVER_GOODS_FAIL;
1411 smsInboxBusinessTypeEnum = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_FAILED; 1416 smsInboxBusinessTypeEnum = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_FAILED;
1412 - content = getReplacedContent(smsInboxBusinessTypeEnum.getContent(),prdName,sizeName,productCode,orderCode); 1417 + content = getReplacedContent(smsInboxBusinessTypeEnum.getContent(),skupTypeText,prdName,sizeName,productCode,orderCode);
1413 } else { 1418 } else {
1414 return; 1419 return;
1415 } 1420 }
@@ -1486,6 +1491,7 @@ public class InBoxFacade { @@ -1486,6 +1491,7 @@ public class InBoxFacade {
1486 Integer sellerUid = sog.getUid(); 1491 Integer sellerUid = sog.getUid();
1487 String prdName = sog.getProductName(); 1492 String prdName = sog.getProductName();
1488 String sizeName = sog.getSizeName(); 1493 String sizeName = sog.getSizeName();
  1494 + String skupTypeText=SkupType.getSkupType(sog.getAttributes()).attrName();
1489 try { 1495 try {
1490 executorService.execute(()->{ 1496 executorService.execute(()->{
1491 Product product = productMapper.selectByPrimaryKey(sog.getProductId()); 1497 Product product = productMapper.selectByPrimaryKey(sog.getProductId());
@@ -1500,7 +1506,7 @@ public class InBoxFacade { @@ -1500,7 +1506,7 @@ public class InBoxFacade {
1500 buyerUid, orderCode,prdName, resp); 1506 buyerUid, orderCode,prdName, resp);
1501 //seller 1507 //seller
1502 InboxBusinessTypeEnum ibtOfSeller = InboxBusinessTypeEnum.SALE_CLOSED_BY_BUYER_AFTER_DELIVERY; 1508 InboxBusinessTypeEnum ibtOfSeller = InboxBusinessTypeEnum.SALE_CLOSED_BY_BUYER_AFTER_DELIVERY;
1503 - String paramsOfSeller = buildParams(prdName, sizeName,productCode); 1509 + String paramsOfSeller = buildParams(skupTypeText,prdName, sizeName,productCode);
1504 InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller); 1510 InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller);
1505 InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller); 1511 InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller);
1506 logger.info("record buyerCancelBeforeDepotReceive to seller inbox msg, sellerUid {}, orderCode {},prdName {} resp {}", 1512 logger.info("record buyerCancelBeforeDepotReceive to seller inbox msg, sellerUid {}, orderCode {},prdName {} resp {}",
@@ -1519,7 +1525,7 @@ public class InBoxFacade { @@ -1519,7 +1525,7 @@ public class InBoxFacade {
1519 } 1525 }
1520 List<String> mobileList = Arrays.asList(phone); 1526 List<String> mobileList = Arrays.asList(phone);
1521 1527
1522 - String content= getReplacedContent(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_DELIVERY.getContent(),orderCode); 1528 + String content= getReplacedContent(InboxBusinessTypeEnum.SMS_CANCELED_BY_BUYER_AFTER_DELIVERY.getContent(),skupTypeText,prdName, sizeName,productCode,orderCode);
1523 sendSmsService.smsSendByMobile(content,mobileList); 1529 sendSmsService.smsSendByMobile(content,mobileList);
1524 logger.info("record buyerCancelBeforeDepotReceive inbox sms msg, sellerUid {}, orderCode {},prdName {}", 1530 logger.info("record buyerCancelBeforeDepotReceive inbox sms msg, sellerUid {}, orderCode {},prdName {}",
1525 sellerUid, orderCode, prdName); 1531 sellerUid, orderCode, prdName);
@@ -1544,12 +1550,13 @@ public class InBoxFacade { @@ -1544,12 +1550,13 @@ public class InBoxFacade {
1544 executorService.execute(()->{ 1550 executorService.execute(()->{
1545 Product product = productMapper.selectByPrimaryKey(sog.getProductId()); 1551 Product product = productMapper.selectByPrimaryKey(sog.getProductId());
1546 String productCode = product.getProductCode(); 1552 String productCode = product.getProductCode();
  1553 + String skupTypeText=SkupType.getSkupType(sog.getAttributes()).attrName();
1547 1554
1548 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_BUYER_CANCEL_NO_RESPONSIBILITY; 1555 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.NOTICE_SELLER_WHEN_BUYER_CANCEL_NO_RESPONSIBILITY;
1549 if(autoReSell){ 1556 if(autoReSell){
1550 ibt = InboxBusinessTypeEnum.NOTICE_SELLER_AUTO_RESELL_WHEN_BUYER_CANCEL_NO_RESPONSIBILITY; 1557 ibt = InboxBusinessTypeEnum.NOTICE_SELLER_AUTO_RESELL_WHEN_BUYER_CANCEL_NO_RESPONSIBILITY;
1551 } 1558 }
1552 - String params = buildParams(prdName, sizeName,productCode); 1559 + String params = buildParams(skupTypeText,prdName, sizeName,productCode);
1553 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt); 1560 InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
1554 1561
1555 InBoxResponse resp = inBoxSDK.addInbox(req); 1562 InBoxResponse resp = inBoxSDK.addInbox(req);
@@ -1573,7 +1580,7 @@ public class InBoxFacade { @@ -1573,7 +1580,7 @@ public class InBoxFacade {
1573 if(autoReSell){ 1580 if(autoReSell){
1574 sms=InboxBusinessTypeEnum.SMS_NOTICE_SELLER_AUTO_RESELL_WHEN_BUYER_CANCEL_NO_RESPONSIBILITY; 1581 sms=InboxBusinessTypeEnum.SMS_NOTICE_SELLER_AUTO_RESELL_WHEN_BUYER_CANCEL_NO_RESPONSIBILITY;
1575 } 1582 }
1576 - String content = replaceSMSContent(sms, orderCode, prdName,sizeName,productCode); 1583 + String content = replaceSMSContent(sms,skupTypeText, orderCode, prdName,sizeName,productCode);
1577 sendSmsService.smsSendByMobile(content,mobileList); 1584 sendSmsService.smsSendByMobile(content,mobileList);
1578 logger.info("record noticeSellerWhenBuyerCancelNoResponsibility inbox sms msg, sellerUid {}, orderCode {},prdName {}", 1585 logger.info("record noticeSellerWhenBuyerCancelNoResponsibility inbox sms msg, sellerUid {}, orderCode {},prdName {}",
1579 sellerUid, orderCode, prdName); 1586 sellerUid, orderCode, prdName);
@@ -1588,6 +1595,7 @@ public class InBoxFacade { @@ -1588,6 +1595,7 @@ public class InBoxFacade {
1588 Integer sellerUid = sog.getUid(); 1595 Integer sellerUid = sog.getUid();
1589 String prdName = sog.getProductName(); 1596 String prdName = sog.getProductName();
1590 String sizeName = sog.getSizeName(); 1597 String sizeName = sog.getSizeName();
  1598 + String skupTypeText=SkupType.getSkupType(sog.getAttributes()).attrName();
1591 try { 1599 try {
1592 executorService.execute(()->{ 1600 executorService.execute(()->{
1593 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_BY_BUYER_AFTER_PAID; 1601 InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_BY_BUYER_AFTER_PAID;
@@ -1604,7 +1612,7 @@ public class InBoxFacade { @@ -1604,7 +1612,7 @@ public class InBoxFacade {
1604 if(autoReSellFlag){ 1612 if(autoReSellFlag){
1605 ibtOfSeller = InboxBusinessTypeEnum.SALE_CLOSED_AUTO_RESELL_BY_BUYER_AFTER_PAID; 1613 ibtOfSeller = InboxBusinessTypeEnum.SALE_CLOSED_AUTO_RESELL_BY_BUYER_AFTER_PAID;
1606 } 1614 }
1607 - String paramsOfSeller = buildParams(prdName, sizeName,productCode); 1615 + String paramsOfSeller = buildParams(skupTypeText,prdName, sizeName,productCode);
1608 InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller); 1616 InboxReqVO reqOfSeller = buildInboxReqVO(sellerUid, paramsOfSeller, ibtOfSeller);
1609 InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller); 1617 InBoxResponse respOfSeller = inBoxSDK.addInbox(reqOfSeller);
1610 logger.info("record buyerCancelBeforeSellerDeliver to seller inbox msg, sellerUid {}, orderCode {},prdName {} resp {}", 1618 logger.info("record buyerCancelBeforeSellerDeliver to seller inbox msg, sellerUid {}, orderCode {},prdName {} resp {}",
@@ -1627,7 +1635,7 @@ public class InBoxFacade { @@ -1627,7 +1635,7 @@ public class InBoxFacade {
1627 if(autoReSellFlag){ 1635 if(autoReSellFlag){
1628 sms=InboxBusinessTypeEnum.SMS_CANCELED_AUTO_RESELL_BY_BUYER_AFTER_PAID; 1636 sms=InboxBusinessTypeEnum.SMS_CANCELED_AUTO_RESELL_BY_BUYER_AFTER_PAID;
1629 } 1637 }
1630 - String content= getReplacedContent(sms.getContent(),orderCode,prdName,sizeName,productCode); 1638 + String content= getReplacedContent(sms.getContent(),skupTypeText,orderCode,prdName,sizeName,productCode);
1631 sendSmsService.smsSendByMobile(content,mobileList); 1639 sendSmsService.smsSendByMobile(content,mobileList);
1632 logger.info("record buyerCancelBeforeSellerDeliver inbox sms msg, sellerUid {}, orderCode {},prdName {} ,sizeName {} ,productCode {}", 1640 logger.info("record buyerCancelBeforeSellerDeliver inbox sms msg, sellerUid {}, orderCode {},prdName {} ,sizeName {} ,productCode {}",
1633 sellerUid, orderCode, prdName,sizeName,productCode); 1641 sellerUid, orderCode, prdName,sizeName,productCode);