Authored by chenchao

use key data of online

package com.yohoufo.msg.constants;
public enum PushToken {
UFO_BIDORDER_PAID_SUCCESS("UFO_BIDORDER_PAID_SUCCESS", "ef44f73c-f86e-4c7c-ba01-dfc677b9536e"),
UFO_BIDORDER_SELLER_ONSHELVE("UFO_BIDORDER_SELLER_ONSHELVE", "811b7c7e-9410-42a5-ad1f-e5f7f54a3d2f");
private String sceneKey;
private String securityKey;
PushToken(String sceneKey, String securityKey) {
this.sceneKey = sceneKey;
this.securityKey = securityKey;
}
public String getSceneKey() {
return sceneKey;
}
public String getSecurityKey() {
return securityKey;
}
}
... ...
... ... @@ -12,6 +12,7 @@ import com.yohoufo.dal.product.model.Product;
import com.yohoufo.msg.cache.CacheKeyBuilder;
import com.yohoufo.msg.concurrent.ThreadPoolFactory;
import com.yohoufo.msg.config.CaseIdConfig;
import com.yohoufo.msg.constants.PushToken;
import com.yohoufo.msg.model.NoticeCaseNode;
import com.yohoufo.msg.model.NoticeRuleNode;
import com.yohoufo.msg.model.PrdMsg;
... ... @@ -54,13 +55,14 @@ public class MsgService {
TabType seller = TabType.SELL;
logger.info("enter noticeSellerWhenBuyerBidSuccess, uidList {} sku {}", uidList, sellerOrderGoods.getStorageId());
ThreadPoolExecutor executorService = ThreadPoolFactory.getPushExecutorService4Seller();
PushToken pushToken = PushToken.UFO_BIDORDER_PAID_SUCCESS;
new Processer().caseRules(CaseIdConfig.BUYER_BID_SUCCESS_NOTICE_SELLER)
.logTitle("noticeSellerWhenBuyerBidSuccess")
.executorService(executorService)
.uidList(uidList)
.tabType(seller)
.sceneKey("UFO_BIDORDER_PAID_SUCCESS")
.securityKey("df09fe86-7499-4ef9-a99b-d9c8a0fb5f01")
.sceneKey(pushToken.getSceneKey())
.securityKey(pushToken.getSecurityKey())
.pushPrdMsg(sellerOrderGoods, product);
}
... ... @@ -68,13 +70,14 @@ public class MsgService {
public SendMessageRspBo noticeBuyerWhenSellerOnShelve(List<Integer> uidList, SellerOrderGoods sellerOrderGoods, Product product){
logger.info("enter noticeBuyerWhenSellerOnShelve, uidList {} sku {}", uidList, sellerOrderGoods.getStorageId());
ThreadPoolExecutor executorService = ThreadPoolFactory.getPushExecutorService4Buyer();
PushToken pushToken = PushToken.UFO_BIDORDER_SELLER_ONSHELVE;
new Processer().caseRules(CaseIdConfig.SELLER_ONSHELVE_NOTICE_BUYER_OF_BIDORDER)
.logTitle("noticeBuyerWhenSellerOnShelve")
.executorService(executorService)
.uidList(uidList)
.tabType(TabType.BUY)
.sceneKey("UFO_BIDORDER_SELLER_ONSHELVE")
.securityKey("7df7714f-f3b6-4dcf-92c2-d9b2c7ca896b")
.sceneKey(pushToken.getSceneKey())
.securityKey(pushToken.getSecurityKey())
.pushPrdMsg(sellerOrderGoods, product);
return new SendMessageRspBo();
... ...