|
|
@@ -286,27 +286,30 @@ public class AiCheckXxlJob {
|
|
|
if (taskObject.getInteger("code") == 200) {
|
|
|
com.alibaba.fastjson.JSONObject data = taskObject.getJSONObject("data");
|
|
|
if (data != null) {
|
|
|
- boolean isValid = data.getBoolean("is_valid");
|
|
|
- violation.setReportResult(data.getString("matched_type"));
|
|
|
- violation.setProcessingStatus(isValid ? "1" : "2");
|
|
|
- lifeUserViolationMapper.updateById(violation);
|
|
|
-
|
|
|
- // 发送通知
|
|
|
- LifeNotice lifeMessage = new LifeNotice();
|
|
|
- LifeUser lifeUser = lifeUserMapper.selectById(violation.getReportingUserId());
|
|
|
- lifeMessage.setReceiverId("user_" + lifeUser.getUserPhone());
|
|
|
- String text = "您的举报商品结果为" + (isValid ? "违规" : "未违规");
|
|
|
- com.alibaba.fastjson.JSONObject lifeMessagejson = new com.alibaba.fastjson.JSONObject();
|
|
|
- lifeMessagejson.put("title", "平台已受理");
|
|
|
- lifeMessagejson.put("message", text);
|
|
|
- lifeMessage.setContext(lifeMessagejson.toJSONString());
|
|
|
-
|
|
|
- lifeMessage.setTitle("举报通知");
|
|
|
- lifeMessage.setBusinessId(violation.getId());
|
|
|
- lifeMessage.setSenderId("system");
|
|
|
- lifeMessage.setIsRead(0);
|
|
|
- lifeMessage.setNoticeType(1);
|
|
|
- lifeNoticeMapper.insert(lifeMessage);
|
|
|
+ String status = data.getString("status");
|
|
|
+ if (!"processing".equals(status)) {
|
|
|
+ boolean isValid = data.getBoolean("is_valid");
|
|
|
+ violation.setReportResult(data.getString("matched_type"));
|
|
|
+ violation.setProcessingStatus(isValid ? "1" : "2");
|
|
|
+ lifeUserViolationMapper.updateById(violation);
|
|
|
+
|
|
|
+ // 发送通知
|
|
|
+ LifeNotice lifeMessage = new LifeNotice();
|
|
|
+ LifeUser lifeUser = lifeUserMapper.selectById(violation.getReportingUserId());
|
|
|
+ lifeMessage.setReceiverId("user_" + lifeUser.getUserPhone());
|
|
|
+ String text = "您的举报商品结果为" + (isValid ? "违规" : "未违规");
|
|
|
+ com.alibaba.fastjson.JSONObject lifeMessagejson = new com.alibaba.fastjson.JSONObject();
|
|
|
+ lifeMessagejson.put("title", "平台已受理");
|
|
|
+ lifeMessagejson.put("message", text);
|
|
|
+ lifeMessage.setContext(lifeMessagejson.toJSONString());
|
|
|
+
|
|
|
+ lifeMessage.setTitle("举报通知");
|
|
|
+ lifeMessage.setBusinessId(violation.getId());
|
|
|
+ lifeMessage.setSenderId("system");
|
|
|
+ lifeMessage.setIsRead(0);
|
|
|
+ lifeMessage.setNoticeType(1);
|
|
|
+ lifeNoticeMapper.insert(lifeMessage);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|