|
|
@@ -1,6 +1,7 @@
|
|
|
package shop.alien.job.second;
|
|
|
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
@@ -18,10 +19,14 @@ import org.springframework.util.StringUtils;
|
|
|
import org.springframework.web.client.RestTemplate;
|
|
|
import shop.alien.entity.result.R;
|
|
|
import shop.alien.entity.second.SecondGoods;
|
|
|
+import shop.alien.entity.second.SecondUserCredit;
|
|
|
+import shop.alien.entity.second.SecondUserCreditRecord;
|
|
|
import shop.alien.entity.store.*;
|
|
|
import shop.alien.mapper.LifeNoticeMapper;
|
|
|
import shop.alien.mapper.LifeUserMapper;
|
|
|
import shop.alien.mapper.LifeUserViolationMapper;
|
|
|
+import shop.alien.mapper.second.SecondUserCreditMapper;
|
|
|
+import shop.alien.mapper.second.SecondUserCreditRecordMapper;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
@@ -38,6 +43,8 @@ public class AiUserViolationJob {
|
|
|
private final LifeUserMapper lifeUserMapper;
|
|
|
|
|
|
private final LifeNoticeMapper lifeNoticeMapper;
|
|
|
+ private final SecondUserCreditMapper secondUserCreditMapper;
|
|
|
+ private final SecondUserCreditRecordMapper secondUserCreditRecordMapper;
|
|
|
|
|
|
@Value("${third-party-user-name.base-url}")
|
|
|
private String userName;
|
|
|
@@ -161,6 +168,22 @@ public class AiUserViolationJob {
|
|
|
lifeMessage.setReceiverId("user_" + lifeUser.getUserPhone());
|
|
|
String text = "您的举报用户结果为" + (aiTask.getProcessingStatus().equals("1") ? "违规" : "未违规");
|
|
|
|
|
|
+// if ("1".equals(aiTask.getProcessingStatus())) {
|
|
|
+// SecondUserCredit secondUserCredit = new SecondUserCredit();
|
|
|
+// LambdaQueryWrapper<SecondUserCredit> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
+// queryWrapper.eq(SecondUserCredit::getUserId, lifeUser.getId());
|
|
|
+// secondUserCredit.setUserId(lifeUser.getId());
|
|
|
+// SecondUserCredit secondUserCredit1 = secondUserCreditMapper.selectOne(queryWrapper);
|
|
|
+// secondUserCredit.setUserPoints(secondUserCredit1.getUserPoints() - 50);
|
|
|
+//
|
|
|
+// SecondUserCreditRecord record = new SecondUserCreditRecord();
|
|
|
+// record.setUserId(lifeUser.getId());
|
|
|
+// record.setPoints(-50);
|
|
|
+// record.setPointsType(5);
|
|
|
+// record.setCurrentScoreCount(secondUserCredit.getUserPoints());
|
|
|
+// secondUserCreditRecordMapper.insert(record);
|
|
|
+// }
|
|
|
+
|
|
|
com.alibaba.fastjson.JSONObject lifeMessagejson = new com.alibaba.fastjson.JSONObject();
|
|
|
lifeMessagejson.put("title", "平台已受理");
|
|
|
lifeMessagejson.put("message", text);
|