Commit a5522abd authored by shiyu's avatar shiyu

预估价模板消息3

parent b5395452
...@@ -479,18 +479,21 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService { ...@@ -479,18 +479,21 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
supplierItem.setId(dto.getId()); supplierItem.setId(dto.getId());
supplierItem.setOfficialEstimatedPrice(PriceUtil.convertPriceFromStr(dto.getOfficialEstimatedPrice())); supplierItem.setOfficialEstimatedPrice(PriceUtil.convertPriceFromStr(dto.getOfficialEstimatedPrice()));
supplierItemDao.update(supplierItem); supplierItemDao.update(supplierItem);
//发送模板消息,通知用户估价完成 //发送模板消息,通知用户估价完成
SupplierItem item = supplierItemDao.findById(dto.getId()); SupplierItem item = supplierItemDao.findById(dto.getId());
String buyerOpenId = sendMsgService.getOpenIdByUserId(item.getCreatorId()); if (CommConsts.SYSTEM_ACCOUNT.longValue() != item.getCreatorId() && CommConsts.SELF_SUPPORT_ACCOUNT.longValue() != item.getCreatorId()) {
if (com.xxdxxs.utils.StringUtils.hasLength(buyerOpenId)) { String buyerOpenId = sendMsgService.getOpenIdByUserId(item.getCreatorId());
ExchangeNoticeMsg exchangeNoticeMsg = new ExchangeNoticeMsg(); if (com.xxdxxs.utils.StringUtils.hasLength(buyerOpenId)) {
exchangeNoticeMsg.setItemId(item.getId()); ExchangeNoticeMsg exchangeNoticeMsg = new ExchangeNoticeMsg();
exchangeNoticeMsg.setItemName(item.getName()); exchangeNoticeMsg.setItemId(item.getId());
exchangeNoticeMsg.setOpenId(buyerOpenId); exchangeNoticeMsg.setItemName(item.getName());
exchangeNoticeMsg.setOfficialEstimatedPrice(PriceUtil.convertPriceFenToYuan(item.getOfficialEstimatedPrice())); exchangeNoticeMsg.setOpenId(buyerOpenId);
sendMsgService.sendOfficialEstimatedPriceMsg(exchangeNoticeMsg); exchangeNoticeMsg.setOfficialEstimatedPrice(PriceUtil.convertPriceFenToYuan(item.getOfficialEstimatedPrice()));
} else { sendMsgService.sendOfficialEstimatedPriceMsg(exchangeNoticeMsg);
logger.info(">>>>> 买家openid为空, 发送消息失败 <<<<<"); } else {
logger.info(">>>>> 买家openid为空, 发送消息失败 <<<<<");
}
} }
return Result.success(); return Result.success();
} catch (Exception e) { } catch (Exception e) {
......
...@@ -545,7 +545,6 @@ public class SendMsgServiceImpl implements SendMsgService { ...@@ -545,7 +545,6 @@ public class SendMsgServiceImpl implements SendMsgService {
@Override @Override
public String getOpenIdByUserId(long userId) { public String getOpenIdByUserId(long userId) {
//先查询寄售单用户信息
User user = userDao.queryById(userId); User user = userDao.queryById(userId);
String unionId = user.getWeixinUnionid(); String unionId = user.getWeixinUnionid();
OfficialAccountSubscribeRecord officialAccountSubscribeRecord = officialAccountSubscribeRecordDao.findOne(unionId); OfficialAccountSubscribeRecord officialAccountSubscribeRecord = officialAccountSubscribeRecordDao.findOne(unionId);
......
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