|
|
@@ -9,18 +9,13 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.google.common.collect.Lists;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.cloud.context.config.annotation.RefreshScope;
|
|
|
-import org.springframework.http.HttpEntity;
|
|
|
-import org.springframework.http.HttpHeaders;
|
|
|
-import org.springframework.http.HttpStatus;
|
|
|
-import org.springframework.http.MediaType;
|
|
|
-import org.springframework.http.ResponseEntity;
|
|
|
+import org.springframework.http.*;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
@@ -28,22 +23,16 @@ import org.springframework.web.multipart.MultipartFile;
|
|
|
import org.springframework.web.multipart.MultipartRequest;
|
|
|
import shop.alien.entity.store.*;
|
|
|
import shop.alien.entity.store.excelVo.util.ExcelExporter;
|
|
|
-import shop.alien.entity.store.vo.StoreCommentAppealLogVo;
|
|
|
-import shop.alien.entity.store.vo.StoreCommentAppealInfoVo;
|
|
|
-import shop.alien.entity.store.vo.StoreCommentAppealSupplementVo;
|
|
|
-import shop.alien.entity.store.vo.StoreCommentAppealVo;
|
|
|
-import shop.alien.entity.store.vo.WebSocketVo;
|
|
|
+import shop.alien.entity.store.vo.*;
|
|
|
import shop.alien.mapper.*;
|
|
|
import shop.alien.store.config.WebSocketProcess;
|
|
|
import shop.alien.store.service.CommonRatingService;
|
|
|
import shop.alien.store.service.StoreCommentAppealService;
|
|
|
import shop.alien.store.util.FileUploadUtil;
|
|
|
import shop.alien.store.util.ai.AiAuthTokenUtil;
|
|
|
+import shop.alien.util.common.constant.CommentSourceTypeEnum;
|
|
|
import shop.alien.util.common.netease.TextCheckUtil;
|
|
|
-import shop.alien.util.common.safe.TextModerationResultVO;
|
|
|
import shop.alien.util.common.safe.TextModerationUtil;
|
|
|
-import shop.alien.util.common.safe.TextReviewServiceEnum;
|
|
|
-import shop.alien.util.common.constant.CommentSourceTypeEnum;
|
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
@@ -193,13 +182,13 @@ public class StoreCommentAppealServiceImpl extends ServiceImpl<StoreCommentAppea
|
|
|
return 3;
|
|
|
}*/
|
|
|
|
|
|
- List<String> servicesList = Lists.newArrayList();
|
|
|
- servicesList.add(TextReviewServiceEnum.COMMENT_DETECTION_PRO.getService());
|
|
|
- servicesList.add(TextReviewServiceEnum.LLM_QUERY_MODERATION.getService());
|
|
|
- TextModerationResultVO textCheckResult = textModerationUtil.invokeFunction(appealReason, servicesList);
|
|
|
- if ("high".equals(textCheckResult.getRiskLevel())) {
|
|
|
- return 3;
|
|
|
- }
|
|
|
+// List<String> servicesList = Lists.newArrayList();
|
|
|
+// servicesList.add(TextReviewServiceEnum.COMMENT_DETECTION_PRO.getService());
|
|
|
+// servicesList.add(TextReviewServiceEnum.LLM_QUERY_MODERATION.getService());
|
|
|
+// TextModerationResultVO textCheckResult = textModerationUtil.invokeFunction(appealReason, servicesList);
|
|
|
+// if ("high".equals(textCheckResult.getRiskLevel())) {
|
|
|
+// return 3;
|
|
|
+// }
|
|
|
|
|
|
List<String> fileNameSet = new ArrayList<>(multipartRequest.getMultiFileMap().keySet());
|
|
|
LambdaQueryWrapper<StoreCommentAppeal> wrapper = new LambdaQueryWrapper<>();
|
|
|
@@ -277,14 +266,14 @@ public class StoreCommentAppealServiceImpl extends ServiceImpl<StoreCommentAppea
|
|
|
// return storeCommentAppealInfoVo;
|
|
|
// }
|
|
|
|
|
|
- List<String> servicesList = Lists.newArrayList();
|
|
|
- servicesList.add(TextReviewServiceEnum.COMMENT_DETECTION_PRO.getService());
|
|
|
- servicesList.add(TextReviewServiceEnum.LLM_QUERY_MODERATION.getService());
|
|
|
- TextModerationResultVO textCheckResult = textModerationUtil.invokeFunction(appealReason, servicesList);
|
|
|
- if ("high".equals(textCheckResult.getRiskLevel())) {
|
|
|
- storeCommentAppealInfoVo.setResult(3);
|
|
|
- return storeCommentAppealInfoVo;
|
|
|
- }
|
|
|
+// List<String> servicesList = Lists.newArrayList();
|
|
|
+// servicesList.add(TextReviewServiceEnum.COMMENT_DETECTION_PRO.getService());
|
|
|
+// servicesList.add(TextReviewServiceEnum.LLM_QUERY_MODERATION.getService());
|
|
|
+// TextModerationResultVO textCheckResult = textModerationUtil.invokeFunction(appealReason, servicesList);
|
|
|
+// if ("high".equals(textCheckResult.getRiskLevel())) {
|
|
|
+// storeCommentAppealInfoVo.setResult(3);
|
|
|
+// return storeCommentAppealInfoVo;
|
|
|
+// }
|
|
|
|
|
|
LambdaQueryWrapper<StoreCommentAppeal> wrapper = new LambdaQueryWrapper<>();
|
|
|
//待审批, 已通过
|