...
|
...
|
@@ -10,6 +10,8 @@ import org.slf4j.LoggerFactory; |
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* Created by chenchao on 2018/10/8.
|
|
|
*/
|
...
|
...
|
@@ -21,12 +23,16 @@ public class InBoxFacade { |
|
|
@Autowired
|
|
|
private InBoxSDK inBoxSDK;
|
|
|
|
|
|
@Autowired
|
|
|
private SendSmsService sendSmsService;
|
|
|
|
|
|
/**
|
|
|
* 买家订单未付款
|
|
|
*
|
|
|
* @param buyerUid
|
|
|
*/
|
|
|
public void buyerOrderNotPayed(int buyerUid, long orderCode){
|
|
|
try{
|
|
|
public void buyerOrderNotPayed(int buyerUid, long orderCode) {
|
|
|
try {
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_UNPAID;
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
...
|
...
|
@@ -35,19 +41,20 @@ public class InBoxFacade { |
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record buyerOrderNotPayed inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerOrderNotPayed error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
buyerUid, orderCode,e);
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 买家支付订单
|
|
|
*
|
|
|
* @param buyerUid
|
|
|
* @param orderCode
|
|
|
*/
|
|
|
public void buyerFinishPaid(int buyerUid, long orderCode){
|
|
|
try{
|
|
|
public void buyerFinishPaid(int buyerUid, long orderCode) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_NOTIFIED_SELLER;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
...
|
...
|
@@ -55,290 +62,375 @@ public class InBoxFacade { |
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record buyerFinishPaid inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerFinishPaid error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
buyerUid, orderCode,e);
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 平台已发货给买家
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
public void depotDeliver2Buyer(int buyerUid,long orderCode){
|
|
|
try{
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record depotDeliver2Buyer inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
|
|
|
InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_SEND;
|
|
|
String smsparams = buildParams(orderCode);
|
|
|
InboxReqVO smsIbtReq = buildInboxReqVO(buyerUid, smsparams, smsIbt);
|
|
|
InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);
|
|
|
logger.info("record depotDeliver2Buyer inbox sms msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, smsresp);
|
|
|
}catch (Exception e){
|
|
|
public void depotDeliver2Buyer(int buyerUid, long orderCode, List<String> mobileList) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_SENDED;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record depotDeliver2Buyer inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
|
|
|
//InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_SEND;
|
|
|
//String smsparams = buildParams(orderCode);
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_SEND;
|
|
|
String content=smsIbt.getReplacedContent(orderCode);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record depotDeliver2Buyer inbox sms msg, buyerUid {}, orderCode {}",
|
|
|
buyerUid, orderCode);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade depotDeliver2Buyer error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
buyerUid, orderCode,e);
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单生成,卖家取消售卖
|
|
|
*
|
|
|
* @param orderCode
|
|
|
*/
|
|
|
public void noticeBuyerWhenSellerCancelAfterPaid(int buyerUid, long orderCode){
|
|
|
try{
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_SELLER;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticeBuyerWhenSellerCancelAfterPaid inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
|
|
|
//短信
|
|
|
InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_CLOSED_SELLER;
|
|
|
String smsparams = buildParams(orderCode);
|
|
|
InboxReqVO smsIbtReq = buildInboxReqVO(buyerUid, smsparams, smsIbt);
|
|
|
InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);
|
|
|
logger.info("record noticeBuyerWhenSellerCancelAfterPaid inbox sms msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, smsresp);
|
|
|
}catch (Exception e){
|
|
|
public void noticeBuyerWhenSellerCancelAfterPaid(int buyerUid, long orderCode, List<String> mobileList) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_SELLER;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticeBuyerWhenSellerCancelAfterPaid inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
|
|
|
//短信
|
|
|
//InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_CLOSED_SELLER;
|
|
|
//String smsparams = buildParams(orderCode);
|
|
|
//InboxReqVO smsIbtReq = buildInboxReqVO(buyerUid, smsparams, smsIbt);
|
|
|
//InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_SELLER;
|
|
|
String content=smsIbt.getReplacedContent(orderCode);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record noticeBuyerWhenSellerCancelAfterPaid inbox sms msg, buyerUid {}, orderCode {}",
|
|
|
buyerUid, orderCode);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade noticeBuyerWhenSellerCancelAfterPaid error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
buyerUid, orderCode,e);
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单生成,买家取消订单
|
|
|
*/
|
|
|
public void buyerCancelOrder(int buyerUid, long orderCode){
|
|
|
try{
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_BUYER;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record buyerCancelOrder inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
}catch (Exception e){
|
|
|
public void buyerCancelOrder(int buyerUid, long orderCode) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_BUYER;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record buyerCancelOrder inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerCancelOrder error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
buyerUid, orderCode,e);
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 平台鉴定不通过
|
|
|
*
|
|
|
* @param buyerUid
|
|
|
* @param orderCode
|
|
|
*/
|
|
|
public void buyerGetEarnestMoneyWhenAppraiseFail(int buyerUid, long orderCode){
|
|
|
try{
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_PLATFORM;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
|
|
|
//短信
|
|
|
InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_CLOSED_PLATFORM;
|
|
|
String smsparams = buildParams(orderCode);
|
|
|
InboxReqVO smsIbtReq = buildInboxReqVO(buyerUid, smsparams, smsIbt);
|
|
|
InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);
|
|
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox sms msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, smsresp);
|
|
|
}catch (Exception e){
|
|
|
public void buyerGetEarnestMoneyWhenAppraiseFail(int buyerUid, long orderCode, List<String> mobileList) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.PURCHASE_CLOSED_PLATFORM;
|
|
|
String params = buildParams(orderCode);
|
|
|
InboxReqVO req = buildInboxReqVO(buyerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox msg, buyerUid {}, orderCode {}, resp {}",
|
|
|
buyerUid, orderCode, resp);
|
|
|
|
|
|
//短信
|
|
|
//InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_CLOSED_PLATFORM;
|
|
|
//String smsparams = buildParams(orderCode);
|
|
|
//InboxReqVO smsIbtReq = buildInboxReqVO(buyerUid, smsparams, smsIbt);
|
|
|
//InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_PLATFORM;
|
|
|
String content=smsIbt.getReplacedContent(orderCode);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record buyerGetEarnestMoneyWhenAppraiseFail inbox sms msg, buyerUid {}, orderCode {}",
|
|
|
buyerUid, orderCode);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade buyerGetEarnestMoneyWhenAppraiseFail error inbox msg, buyerUid {}, orderCode {} ,error {}",
|
|
|
buyerUid, orderCode,e);
|
|
|
buyerUid, orderCode, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 卖家的保证金还没支付
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void sellerOrderNotPaid(int sellerUid, String prdName){
|
|
|
try{
|
|
|
public void sellerOrderNotPaid(int sellerUid, String prdName) {
|
|
|
try {
|
|
|
logger.info("record in sellerOrderNotPaid inbox msg, sellerUid {}, prdName {}",
|
|
|
sellerUid, prdName);
|
|
|
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerOrderNotPaid error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName,e);
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
public void sellerPlaySelf(int sellerUid, String prdName){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_UNSHELF;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
public void sellerPlaySelf(int sellerUid, String prdName) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_UNSHELF;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerPlaySelf inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerPlaySelf inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerPlaySelf error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 因为特殊原因下架商品
|
|
|
* 商品下架提醒,
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void notifyUnshelfCauseBySpecialReason(int sellerUid, String prdName){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record notifyUnshelfCauseBySpecialReason inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
|
|
|
//短信
|
|
|
InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_NOTIFIED_UNSHELF;
|
|
|
String smsparams = buildParams(prdName);
|
|
|
InboxReqVO smsIbtReq = buildInboxReqVO(sellerUid, smsparams, smsIbt);
|
|
|
InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);
|
|
|
logger.info("record notifyUnshelfCauseBySpecialReason inbox sms msg,sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, smsresp);
|
|
|
public void notifyUnshelfCauseBySpecialReason(int sellerUid, String prdName,List<String> mobileList) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_NOTIFIED_UNSHELF;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record notifyUnshelfCauseBySpecialReason inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
|
|
|
//短信
|
|
|
/* InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_NOTIFIED_UNSHELF;
|
|
|
String smsparams = buildParams(prdName);
|
|
|
InboxReqVO smsIbtReq = buildInboxReqVO(sellerUid, smsparams, smsIbt);
|
|
|
InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);*/
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_NOTIFIED_UNSHELF;
|
|
|
String content=smsIbt.getReplacedContent(prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record notifyUnshelfCauseBySpecialReason inbox sms msg,sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade notifyUnshelfCauseBySpecialReason error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 卖家支付保证金成功 发布的商品上架出售
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void sellerPaidEarnestMoney(int sellerUid, String prdName){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SHELF;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerPaidEarnestMoney inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
public void sellerPaidEarnestMoney(int sellerUid, String prdName) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SHELF;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerPaidEarnestMoney inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerPaidEarnestMoney error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 卖家商品售出提醒,买家下单后
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void sellerSkupCreateOrderByBuyer(int sellerUid, String prdName){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SELLED;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerSkupCreateOrderByBuyer inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
public void sellerSkupCreateOrderByBuyer(int sellerUid, String prdName) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SELLED;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerSkupCreateOrderByBuyer inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerSkupCreateOrderByBuyer error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 卖家发货提醒,买家支付购买后
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void sellerSkupPaidByBuyer(int sellerUid, String prdName){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SEND;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerSkupPaidByBuyer inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
|
|
|
//短信
|
|
|
InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND;
|
|
|
String smsparams = buildParams(prdName);
|
|
|
InboxReqVO smsIbtReq = buildInboxReqVO(sellerUid, smsparams, smsIbt);
|
|
|
InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);
|
|
|
logger.info("record sellerSkupPaidByBuyer inbox sms msg,sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, smsresp);
|
|
|
}
|
|
|
|
|
|
|
|
|
public void sellerDeliverNotice(int sellerUid, String prdName, int times){
|
|
|
logger.info("record sellerDeliverNotice inbox sms msg,sellerUid {}, prdName {}, times {}",
|
|
|
sellerUid, prdName, times);
|
|
|
if (times == 2){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_SECOND;
|
|
|
public void sellerSkupPaidByBuyer(int sellerUid, String prdName,List<String> mobileList) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_SEND;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerSkupPaidByBuyer inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
|
|
|
//短信
|
|
|
/*InboxBusinessTypeEnum smsIbt = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND;
|
|
|
String smsparams = buildParams(prdName);
|
|
|
InboxReqVO smsIbtReq = buildInboxReqVO(sellerUid, smsparams, smsIbt);
|
|
|
InBoxResponse smsresp = inBoxSDK.addInbox(smsIbtReq);*/
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_NOTIFIED_SEND;
|
|
|
String content=smsIbt.getReplacedContent(prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record sellerSkupPaidByBuyer inbox sms msg,sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerSkupPaidByBuyer error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (times == 3){
|
|
|
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_FAILED;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
public void sellerDeliverNotice(int sellerUid, String prdName, int times,List<String> mobileList) {
|
|
|
try {
|
|
|
logger.info("record sellerDeliverNotice inbox sms msg,sellerUid {}, prdName {}, times {}",
|
|
|
sellerUid, prdName, times);
|
|
|
if (times == 2) {
|
|
|
/*InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_SECOND;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);*/
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_NOTIFIED_SEND_SECOND;
|
|
|
String content=smsIbt.getReplacedContent(prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record sellerDeliverNotice inbox sms msg,sellerUid {}, prdName {}, times {},resp {}",
|
|
|
sellerUid, prdName, times);
|
|
|
}
|
|
|
|
|
|
if (times == 3) {
|
|
|
|
|
|
/*InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SMS_NOTIFIED_SEND_FAILED;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);*/
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_NOTIFIED_SEND_FAILED;
|
|
|
String content=smsIbt.getReplacedContent(prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record sellerDeliverNotice inbox sms msg,sellerUid {}, prdName {}, times {},resp {}",
|
|
|
sellerUid, prdName, times);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerDeliverNotice error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 买家支付完成,卖家取消
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void sellerCancelAfterBuyerPaid(int sellerUid, String prdName){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_SELLER;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerCancelAfterBuyerPaid inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
public void sellerCancelAfterBuyerPaid(int sellerUid, String prdName) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_SELLER;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record sellerCancelAfterBuyerPaid inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade sellerCancelAfterBuyerPaid error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单生成,买家取消订单(主动 超时未支付时)
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void noticSellerWhenBuyerCancel(int sellerUid, String prdName){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_BUYER;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticSellerWhenBuyerCancel inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
|
|
|
public void noticSellerWhenBuyerCancel(int sellerUid, String prdName,List<String> mobileList) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_BUYER;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InboxBusinessTypeEnum smsibt = InboxBusinessTypeEnum.SMS_CLOSED_BUYER;
|
|
|
InboxReqVO smsReq = buildInboxReqVO(sellerUid, params, smsibt);
|
|
|
InBoxResponse smsResp = inBoxSDK.addInbox(smsReq);
|
|
|
logger.info("record noticSellerWhenBuyerCancel sms inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid,prdName , smsResp);
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticSellerWhenBuyerCancel inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
|
|
|
//短信
|
|
|
/*InboxBusinessTypeEnum smsibt = InboxBusinessTypeEnum.SMS_CLOSED_BUYER;
|
|
|
InboxReqVO smsReq = buildInboxReqVO(sellerUid, params, smsibt);
|
|
|
InBoxResponse smsResp = inBoxSDK.addInbox(smsReq);*/
|
|
|
SmsContentEnum smsIbt=SmsContentEnum.SMS_CLOSED_BUYER;
|
|
|
String content=smsIbt.getReplacedContent(prdName);
|
|
|
sendSmsService.smsSendByMobile(content,mobileList);
|
|
|
logger.info("record noticSellerWhenBuyerCancel sms inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade noticSellerWhenBuyerCancel error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单生成,平台鉴定不通过
|
|
|
*
|
|
|
* @param sellerUid
|
|
|
* @param prdName
|
|
|
*/
|
|
|
public void noticeSellerWhenAppraiseFail(int sellerUid, String prdName){
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_PLATFORM;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticeSellerWhenAppraiseFail inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
public void noticeSellerWhenAppraiseFail(int sellerUid, String prdName) {
|
|
|
try {
|
|
|
InboxBusinessTypeEnum ibt = InboxBusinessTypeEnum.SALE_CLOSED_PLATFORM;
|
|
|
String params = buildParams(prdName);
|
|
|
InboxReqVO req = buildInboxReqVO(sellerUid, params, ibt);
|
|
|
|
|
|
InBoxResponse resp = inBoxSDK.addInbox(req);
|
|
|
logger.info("record noticeSellerWhenAppraiseFail inbox msg, sellerUid {}, prdName {}, resp {}",
|
|
|
sellerUid, prdName, resp);
|
|
|
} catch (Exception e) {
|
|
|
logger.error("InBoxFacade noticeSellerWhenAppraiseFail error inbox msg, sellerUid {}, prdName {} ,error {}",
|
|
|
sellerUid, prdName, e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
public InboxReqVO buildInboxReqVO(int uid,String params, InboxBusinessTypeEnum ibt){
|
|
|
public InboxReqVO buildInboxReqVO(int uid, String params, InboxBusinessTypeEnum ibt) {
|
|
|
InboxReqVO req = new InboxReqVO();
|
|
|
req.setType(ibt.getType());
|
|
|
req.setBusinessType(ibt.getBusinessType());
|
...
|
...
|
@@ -348,12 +440,12 @@ public class InBoxFacade { |
|
|
return req;
|
|
|
}
|
|
|
|
|
|
public static String buildParams(Object... objects){
|
|
|
if (objects == null){
|
|
|
public static String buildParams(Object... objects) {
|
|
|
if (objects == null) {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
if(objects.length == 1){
|
|
|
if (objects.length == 1) {
|
|
|
return objects[0].toString();
|
|
|
}
|
|
|
|
...
|
...
|
@@ -361,6 +453,5 @@ public class InBoxFacade { |
|
|
return params;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|