|
@@ -2,6 +2,7 @@ package shop.alien.job.store;
|
|
|
|
|
|
|
|
import com.alibaba.fastjson2.JSON;
|
|
import com.alibaba.fastjson2.JSON;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
import lombok.RequiredArgsConstructor;
|
|
@@ -18,11 +19,12 @@ import org.springframework.util.LinkedMultiValueMap;
|
|
|
import org.springframework.util.MultiValueMap;
|
|
import org.springframework.util.MultiValueMap;
|
|
|
import org.springframework.util.StringUtils;
|
|
import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
-import shop.alien.entity.store.StoreComment;
|
|
|
|
|
-import shop.alien.entity.store.StoreCommentAppeal;
|
|
|
|
|
|
|
+import shop.alien.entity.store.*;
|
|
|
import shop.alien.entity.result.R;
|
|
import shop.alien.entity.result.R;
|
|
|
|
|
+import shop.alien.mapper.LifeNoticeMapper;
|
|
|
import shop.alien.mapper.StoreCommentAppealMapper;
|
|
import shop.alien.mapper.StoreCommentAppealMapper;
|
|
|
import shop.alien.mapper.StoreCommentMapper;
|
|
import shop.alien.mapper.StoreCommentMapper;
|
|
|
|
|
+import shop.alien.mapper.StoreUserMapper;
|
|
|
|
|
|
|
|
import java.net.URI;
|
|
import java.net.URI;
|
|
|
import java.net.URISyntaxException;
|
|
import java.net.URISyntaxException;
|
|
@@ -48,6 +50,8 @@ public class BadReviewAppealJob {
|
|
|
private final StoreCommentAppealMapper storeCommentAppealMapper;
|
|
private final StoreCommentAppealMapper storeCommentAppealMapper;
|
|
|
|
|
|
|
|
private final StoreCommentMapper storeCommentMapper;
|
|
private final StoreCommentMapper storeCommentMapper;
|
|
|
|
|
+ private final StoreUserMapper storeUserMapper;
|
|
|
|
|
+ private final LifeNoticeMapper lifeNoticeMapper;
|
|
|
|
|
|
|
|
// @Value("${third-party-login.base-url}")
|
|
// @Value("${third-party-login.base-url}")
|
|
|
// private String loginUrl;
|
|
// private String loginUrl;
|
|
@@ -172,6 +176,18 @@ public class BadReviewAppealJob {
|
|
|
storeCommentAppealMapper.updateByRecordId(appeal.getRecordId(),
|
|
storeCommentAppealMapper.updateByRecordId(appeal.getRecordId(),
|
|
|
sCommentAppeal.getAppealStatus(),
|
|
sCommentAppeal.getAppealStatus(),
|
|
|
sCommentAppeal.getFinalResult());
|
|
sCommentAppeal.getFinalResult());
|
|
|
|
|
+
|
|
|
|
|
+ // 发送通知
|
|
|
|
|
+ LifeNotice lifeMessage = new LifeNotice();
|
|
|
|
|
+ StoreUser storeUser = storeUserMapper.selectOne(new QueryWrapper<StoreUser>().eq("store_id", appeal.getStoreId()));
|
|
|
|
|
+ lifeMessage.setReceiverId("store_" + storeUser.getPhone());
|
|
|
|
|
+ String text = "您的评论申诉结果为" + sCommentAppeal.getFinalResult();
|
|
|
|
|
+ lifeMessage.setContext(text);
|
|
|
|
|
+ lifeMessage.setSenderId("system");
|
|
|
|
|
+ lifeMessage.setIsRead(0);
|
|
|
|
|
+ lifeMessage.setNoticeType(1);
|
|
|
|
|
+ lifeNoticeMapper.insert(lifeMessage);
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
if (analyzeResp != null) {
|
|
if (analyzeResp != null) {
|
|
|
log.error("调用差评申述置信度分析接口失败, http状态: {}", analyzeResp.getStatusCode());
|
|
log.error("调用差评申述置信度分析接口失败, http状态: {}", analyzeResp.getStatusCode());
|