Commit 1923a975 authored by shiyu's avatar shiyu

拍卖订单生成2

parent f96542e3
......@@ -351,30 +351,31 @@ public class DistributionOrderServiceImpl implements DistributionOrderService {
aliSmsSender.sendSms(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());
auctionOfferNoticeMsg.setProfit(PriceUtil.convertDoubleToString(Math.floor(profit)));
Result result = sendMsgService.auctionSuccessForDistributorsMsg(auctionOfferNoticeMsg);
if (!result.getSuccess()) {
if (distributionOrder.getSellerId() != null && distributionOrder.getSellerId() != 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);
}
} 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