|
@@ -116,48 +116,9 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
|
|
|
if (null != goodsRecord) lifeuserViolation.setBusinessId(goodsRecord.getId());
|
|
if (null != goodsRecord) lifeuserViolation.setBusinessId(goodsRecord.getId());
|
|
|
}
|
|
}
|
|
|
int result = lifeUserViolationMapper.insert(lifeuserViolation);
|
|
int result = lifeUserViolationMapper.insert(lifeuserViolation);
|
|
|
- aiReportReviewUtil.reviewReport(lifeuserViolation.getId(), lifeuserViolation.getReportContextType());
|
|
|
|
|
if (result > 0) {
|
|
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;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|