Commit 79a72e9f authored by shiyu's avatar shiyu

估价发送短信

parent 65b3c2dc
...@@ -485,13 +485,19 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService { ...@@ -485,13 +485,19 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
if (CommConsts.SYSTEM_ACCOUNT.longValue() != item.getCreatorId() && CommConsts.SELF_SUPPORT_ACCOUNT.longValue() != item.getCreatorId()) { if (CommConsts.SYSTEM_ACCOUNT.longValue() != item.getCreatorId() && CommConsts.SELF_SUPPORT_ACCOUNT.longValue() != item.getCreatorId()) {
String buyerOpenId = sendMsgService.getOpenIdByUserId(item.getCreatorId()); String buyerOpenId = sendMsgService.getOpenIdByUserId(item.getCreatorId());
if (com.xxdxxs.utils.StringUtils.hasLength(buyerOpenId)) { if (com.xxdxxs.utils.StringUtils.hasLength(buyerOpenId)) {
String officialEstimatedPrice = PriceUtil.convertPriceFenToYuan(item.getOfficialEstimatedPrice());
ExchangeNoticeMsg exchangeNoticeMsg = new ExchangeNoticeMsg(); ExchangeNoticeMsg exchangeNoticeMsg = new ExchangeNoticeMsg();
exchangeNoticeMsg.setItemId(item.getId()); exchangeNoticeMsg.setItemId(item.getId());
exchangeNoticeMsg.setItemName(item.getName()); exchangeNoticeMsg.setItemName(item.getName());
exchangeNoticeMsg.setOpenId(buyerOpenId); exchangeNoticeMsg.setOpenId(buyerOpenId);
exchangeNoticeMsg.setOfficialEstimatedPrice(PriceUtil.convertPriceFenToYuan(item.getOfficialEstimatedPrice())); exchangeNoticeMsg.setOfficialEstimatedPrice(officialEstimatedPrice);
logger.info("ExchangeNoticeMsg :{}", JsonUtils.from(exchangeNoticeMsg)); logger.info("ExchangeNoticeMsg :{}", JsonUtils.from(exchangeNoticeMsg));
sendMsgService.sendOfficialEstimatedPriceMsg(exchangeNoticeMsg); Result result = sendMsgService.sendOfficialEstimatedPriceMsg(exchangeNoticeMsg);
if (!result.getSuccess()) {
String url = wxAppletApi.getUrlLink("/pages/detail/index","itemId=" + dto.getId());
String msg = "您上传的商品" + item.getName() + "已完成估价,估价金额为" + officialEstimatedPrice + "元, 请前往"+ url + "查看";
aliSmsSender.sendSms(item.getCreatorId(), msg);
}
} else { } else {
logger.info(">>>>> 买家openid为空, 发送消息失败 <<<<<"); logger.info(">>>>> 买家openid为空, 发送消息失败 <<<<<");
} }
......
...@@ -48,7 +48,8 @@ public class WebMvcConfiguration implements WebMvcConfigurer { ...@@ -48,7 +48,8 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
"/wx/specialPerformance/sendMsg", "/wx/specialPerformance/sendMsgTest", "/wx/groupPurchase/systemAddRecord","/wx/officialAccount/**", "/wx/specialPerformance/sendMsg", "/wx/specialPerformance/sendMsgTest", "/wx/groupPurchase/systemAddRecord","/wx/officialAccount/**",
"/wx/supplierItem/**","/wx/specialPerformance/**","/wx/groupPurchase/**","/wx/disposableSubscribeRecord/**", "/wx/auctionRecord/findList", "/wx/supplierItem/**","/wx/specialPerformance/**","/wx/groupPurchase/**","/wx/disposableSubscribeRecord/**", "/wx/auctionRecord/findList",
"/wx/selfPage/countIntroduceAmount", "/wx/selfPage/countIntroduceAmount",
"/wx/exchange/findExchangeItem" "/wx/exchange/findExchangeItem", "/wx/specialPerformance/findInfos", "/wx/specialPerformance/findItemList",
"/wx/groupPurchase/findList", "/wx/groupPurchase/findItemDetail"
//下列路径上线注释 //下列路径上线注释
/* ,"/wx/specialPerformance/**" /* ,"/wx/specialPerformance/**"
, "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**", , "/wx/supplierItem/**", "/wx/shareRecord/**", "/wx/distributionOrder/**", "/wx/selfPage/**", "/wx/auctionRecord/**",
......
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