Переглянути джерело

fix:移除举报的平台受理通知,只留审核结果通知

李亚非 2 місяців тому
батько
коміт
c58280bc61

+ 2 - 41
alien-store/src/main/java/shop/alien/store/service/impl/LifeUserViolationServiceImpl.java

@@ -116,48 +116,9 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
                 if (null != goodsRecord) lifeuserViolation.setBusinessId(goodsRecord.getId());
             }
             int result = lifeUserViolationMapper.insert(lifeuserViolation);
-            aiReportReviewUtil.reviewReport(lifeuserViolation.getId(), lifeuserViolation.getReportContextType());
             if (result > 0) {
-                // AI审核
-                //登录获取token
-//                String token = aiUserViolationUtils.getAccessToken();
-//                //调用AI接口
-//                String taskId = aiUserViolationUtils.createTask(token, lifeuserViolation);
-//                if (org.springframework.util.StringUtils.isEmpty(taskId)) {
-//                    log.warn("Failed to create AI task for second round review, lifeuserViolation id={}", lifeuserViolation.getId());
-//                    return 0;
-//                }
-//                lifeuserViolation.setAiTaskId(taskId);
-//                lifeUserViolationMapper.updateById(lifeuserViolation);
-
-
-                // 举报人消息
-                    LifeNotice lifeNotice = getLifeNotice(lifeuserViolation);
-                    lifeNoticeMapper.insert(lifeNotice);
-                    WebSocketVo websocketVo = new WebSocketVo();
-                    websocketVo.setSenderId("system");
-                    websocketVo.setReceiverId(lifeNotice.getReceiverId());
-                    websocketVo.setCategory("notice");
-                    websocketVo.setNoticeType("1");
-                    websocketVo.setIsRead(0);
-                    websocketVo.setText(com.alibaba.fastjson2.JSONObject.from(lifeNotice).toJSONString());
-                    webSocketProcess.sendMessage(lifeNotice.getReceiverId(), com.alibaba.fastjson2.JSONObject.from(websocketVo).toJSONString());
-
-                    // 被举报人消息
-                    if(StringUtils.isNotEmpty(lifeuserViolation.getReportContextType()) && "1,2,3".contains(lifeuserViolation.getReportContextType())){
-                        LifeNotice lifeNoticeReported = getLifeReportedNotice(lifeuserViolation);
-                        if (lifeNoticeReported != null) {
-                            lifeNoticeMapper.insert(lifeNoticeReported);
-                            WebSocketVo websocketVoReported = new WebSocketVo();
-                            websocketVoReported.setSenderId("system");
-                            websocketVoReported.setReceiverId(lifeNoticeReported.getReceiverId());
-                            websocketVoReported.setCategory("notice");
-                            websocketVoReported.setNoticeType("1");
-                            websocketVoReported.setIsRead(0);
-                            websocketVoReported.setText(com.alibaba.fastjson2.JSONObject.from(lifeNoticeReported).toJSONString());
-                            webSocketProcess.sendMessage(lifeNoticeReported.getReceiverId(), com.alibaba.fastjson2.JSONObject.from(websocketVoReported).toJSONString());
-                        }
-                    }
+                // 调用AI异步审核,审核完成后会自动发送审核结果通知
+                aiReportReviewUtil.reviewReport(lifeuserViolation.getId(), lifeuserViolation.getReportContextType());
                 return result;
             }
         } catch (Exception e) {