Commit be9d2368 authored by shiyu's avatar shiyu

发送商品订阅消息

parent 0fe49fa6
......@@ -3,6 +3,7 @@ package com.wwdz.ch.core.impl;
import com.wwdz.ch.core.api.OfficialAccountApi;
import com.wwdz.ch.core.api.WxAppletApi;
import com.wwdz.ch.core.consts.CommConsts;
import com.wwdz.ch.core.consts.DisposableSubscribeRecordEnum;
import com.wwdz.ch.core.entity.*;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.core.util.OkHttpUtil;
......@@ -707,7 +708,7 @@ public class SendMsgServiceImpl implements SendMsgService {
OkHttpUtil okHttpUtil = OkHttpUtil.builder().url(url);
Map<String, Object> map = new HashMap<>();
map.put("touser", openId);
map.put("template_id", "G-XhEvunfXdO0j5JSpCVKKYlLuQbF7Yux8QfVEz5_L9xQ");
map.put("template_id", DisposableSubscribeRecordEnum.TypeEnum.ITEM_PRE_END.getTemplateId());
Map<String, Object> miniprogramMap = new HashMap<>();
miniprogramMap.put("appid", APPLET_APPID);
StringBuffer stringBuffer = new StringBuffer(CommConsts.ITEM_OF_SPECIAL_PERFORMANCE_URL);
......
......@@ -380,32 +380,6 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
DateUtils.toString(payEndTime) + "前完成付款,请前往"+ url + "查看";
aliSmsSender.sendSms(auctionRecord.getUserId(), msg);
}
//给中拍用户对应分销商发消息
/* if (distributionOrder.getSellerId() != null && distributionOrder.getSellerId().longValue() != CommConsts.SYSTEM_ACCOUNT) {
String lastOpenId = sendMsgService.getOpenIdByUserId(distributionOrder.getSellerId());
if (com.xxdxxs.utils.StringUtils.hasLength(lastOpenId)) {
AuctionOfferNoticeMsg auctionOfferNoticeMsg = new AuctionOfferNoticeMsg();
auctionOfferNoticeMsg.setCurrentPrice(PriceUtil.convertPriceFenToYuan(auctionRecord.getPrice()));
auctionOfferNoticeMsg.setOpenId(lastOpenId);
auctionOfferNoticeMsg.setItemId(supplierItem.getId());
auctionOfferNoticeMsg.setItemName(supplierItem.getName());
auctionOfferNoticeMsg.setCurrentPrice(PriceUtil.convertPriceFenToYuan(distributionOrder.getAmount()));
auctionOfferNoticeMsg.setAuctionEndTime(auctionConfig.getRealEndTime());
auctionOfferNoticeMsg.setProfit(PriceUtil.convertDoubleToString(Math.floor(profit)));
Result result = sendMsgService.auctionSuccessForDistributorsMsg(auctionOfferNoticeMsg);
if (!result.getSuccess()) {
String url = wxAppletApi.getUrlLink(AUCTION_MSG_URL,"itemId=" + supplierItem.getId() + "&shareRecordId=");
String msg = "您分销的拍品" + supplierItem.getName() + "已成拍,成交价是" + PriceUtil.convertPriceFenToYuan(distributionOrder.getAmount()) +
"元,您预计获得利润" + PriceUtil.convertDoubleToString(Math.floor(profit)) + "元。请前往"+ url + "查看";
aliSmsSender.sendSms(distributionOrder.getSellerId(), msg);
}
} else {
String url = wxAppletApi.getUrlLink(AUCTION_MSG_URL,"itemId=" + supplierItem.getId() + "&shareRecordId=");
String msg = "您分销的拍品" + supplierItem.getName() + "已成拍,成交价是" + PriceUtil.convertPriceFenToYuan(distributionOrder.getAmount()) +
"元,您预计获得利润" + PriceUtil.convertDoubleToString(Math.floor(profit)) + "元。请前往"+ url + "查看";
aliSmsSender.sendSms(distributionOrder.getSellerId(), msg);
}
}*/
return Result.success(map);
} else {
return Result.failed("稍后再试");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment