Commit 025bd5ad authored by shiyu's avatar shiyu

模板消息2

parent b6cb1167
...@@ -107,12 +107,12 @@ public class AutoSendMsgJob { ...@@ -107,12 +107,12 @@ public class AutoSendMsgJob {
.map(AuctionRecord::getUserId) .map(AuctionRecord::getUserId)
.collect(Collectors.toList()); .collect(Collectors.toList());
SupplierItem supplierItem = supplierItemDao.findById(itemId); SupplierItem supplierItem = supplierItemDao.findById(itemId);
AuctionRecord lastRecord = auctionRecordDao.findLastedRecord(itemId); // AuctionRecord lastRecord = auctionRecordDao.findLastedRecord(itemId);
for (long userId : userIds) { for (long userId : userIds) {
//检查缓存中是否已有该商品的标识,已有标识该商品已发送过通知 //检查缓存中是否已有该商品的标识,已有标识该商品已发送过通知
String abortEndKey = QUANKU_ABORT_END_KEY + itemId + ":" + userId; String abortEndKey = QUANKU_ABORT_END_KEY + itemId + ":" + userId;
if (!redisUtils.hasKey(abortEndKey)) { if (!redisUtils.hasKey(abortEndKey)) {
String userOpenId = sendMsgService.getOpenIdByUserId(userId); /* String userOpenId = sendMsgService.getOpenIdByUserId(userId);
if (com.xxdxxs.utils.StringUtils.hasLength(userOpenId)) { if (com.xxdxxs.utils.StringUtils.hasLength(userOpenId)) {
AuctionOfferNoticeMsg auctionOfferNoticeMsg = new AuctionOfferNoticeMsg(); AuctionOfferNoticeMsg auctionOfferNoticeMsg = new AuctionOfferNoticeMsg();
auctionOfferNoticeMsg.setCurrentPrice(PriceUtil.convertPriceFenToYuan(lastRecord.getPrice())); auctionOfferNoticeMsg.setCurrentPrice(PriceUtil.convertPriceFenToYuan(lastRecord.getPrice()));
...@@ -129,7 +129,10 @@ public class AutoSendMsgJob { ...@@ -129,7 +129,10 @@ public class AutoSendMsgJob {
String msg = "您出过价的拍品" + supplierItem.getName() + ",将在1小时内结束,请前往\"换藏小程序\"查看。"; String msg = "您出过价的拍品" + supplierItem.getName() + ",将在1小时内结束,请前往\"换藏小程序\"查看。";
aliSmsSender.sendAuctionWithTemplate(userId, msg); aliSmsSender.sendAuctionWithTemplate(userId, msg);
logger.info("================商品id:{}, 将在1小时内结束,提醒短信发送成功 ==============", supplierItem.getId()); logger.info("================商品id:{}, 将在1小时内结束,提醒短信发送成功 ==============", supplierItem.getId());
} }*/
String msg = "您出过价的拍品" + supplierItem.getName() + ",将在1小时内结束,请前往\"换藏小程序\"查看。";
aliSmsSender.sendAuctionWithTemplate(userId, msg);
logger.info("================商品id:{}, 将在1小时内结束,提醒短信发送成功 ==============", supplierItem.getId());
redisUtils.set(abortEndKey, itemId, 3600); redisUtils.set(abortEndKey, itemId, 3600);
} }
} }
......
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