Commit 92284a89 authored by shiyu's avatar shiyu

发消息

parent 1644951c
......@@ -315,6 +315,28 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
DateUtils.toString(payEndTime) + "前完成付款,请前往\"换藏小程序\"查看。";
aliSmsSender.sendAuctionWithTemplate(auctionRecord.getUserId(), msg);
}
//给中拍用户对应分销商发消息
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());
Result result = sendMsgService.auctionSuccessForDistributorsMsg(auctionOfferNoticeMsg);
if (!result.getSuccess()) {
String msg = "您分销的拍品" + supplierItem.getName() + "已成拍,成交价是" + PriceUtil.convertPriceFenToYuan(distributionOrder.getAmount()) +
"元,您预计获得利润" + PriceUtil.convertDoubleToString(Math.floor(profit)) + "元。请前往\"换藏小程序\"查看";
aliSmsSender.sendAuctionWithTemplate(distributionOrder.getSellerId(), msg);
}
} else {
String msg = "您分销的拍品" + supplierItem.getName() + "已成拍,成交价是" + PriceUtil.convertPriceFenToYuan(distributionOrder.getAmount()) +
"元,您预计获得利润" + PriceUtil.convertDoubleToString(Math.floor(profit)) + "元。请前往\"换藏小程序\"查看";
aliSmsSender.sendAuctionWithTemplate(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