|
@@ -222,14 +222,24 @@ public class BadReviewAppealJob {
|
|
|
// 发送通知
|
|
// 发送通知
|
|
|
LifeNotice lifeMessage = new LifeNotice();
|
|
LifeNotice lifeMessage = new LifeNotice();
|
|
|
StoreUser storeUser = storeUserMapper.selectOne(new QueryWrapper<StoreUser>().eq("store_id", appeal.getStoreId()));
|
|
StoreUser storeUser = storeUserMapper.selectOne(new QueryWrapper<StoreUser>().eq("store_id", appeal.getStoreId()));
|
|
|
- lifeMessage.setTitle("申诉通知");
|
|
|
|
|
|
|
+ if (storeUser == null) {
|
|
|
|
|
+ log.warn("发送申诉通知失败,未找到店铺用户,申诉ID: {},店铺ID: {}", appeal.getId(), appeal.getStoreId());
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ String title = "申诉通知";
|
|
|
|
|
+ lifeMessage.setTitle(title);
|
|
|
lifeMessage.setReceiverId("store_" + storeUser.getPhone());
|
|
lifeMessage.setReceiverId("store_" + storeUser.getPhone());
|
|
|
String text = "您的评论申诉结果为" + sCommentAppeal.getFinalResult();
|
|
String text = "您的评论申诉结果为" + sCommentAppeal.getFinalResult();
|
|
|
lifeMessage.setContext(text);
|
|
lifeMessage.setContext(text);
|
|
|
lifeMessage.setSenderId("system");
|
|
lifeMessage.setSenderId("system");
|
|
|
lifeMessage.setIsRead(0);
|
|
lifeMessage.setIsRead(0);
|
|
|
lifeMessage.setNoticeType(1);
|
|
lifeMessage.setNoticeType(1);
|
|
|
- lifeNoticeMapper.insert(lifeMessage);
|
|
|
|
|
|
|
+ int insertResult = lifeNoticeMapper.insert(lifeMessage);
|
|
|
|
|
+ if (insertResult > 0) {
|
|
|
|
|
+ log.info("申诉通知发送成功,申诉ID: {},通知标题: {}", appeal.getId(), title);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ log.error("申诉通知发送失败,申诉ID: {},通知标题: {}", appeal.getId(), title);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
} else {
|
|
} else {
|
|
|
if (analyzeResp != null) {
|
|
if (analyzeResp != null) {
|