|
|
@@ -159,6 +159,10 @@ public class StoreCommentAppealSupplementJobService {
|
|
|
updateAppeal.setAppealStatus(1);
|
|
|
updateAppeal.setFinalResult("已驳回");
|
|
|
log.info("【用户补充申诉】用户赢,申诉驳回,申诉ID: {}", appeal.getId());
|
|
|
+ Integer ratingId = appeal.getCommentId();
|
|
|
+ if (ratingId != null) {
|
|
|
+ incrementRatingRejectNum(ratingId);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
storeCommentAppealMapper.updateByRecordIdNew(appeal.getId(),
|
|
|
@@ -390,6 +394,18 @@ public class StoreCommentAppealSupplementJobService {
|
|
|
return baseUrl + "/" + recordId + "/completed";
|
|
|
}
|
|
|
|
|
|
+ private void incrementRatingRejectNum(Integer ratingId) {
|
|
|
+ try {
|
|
|
+ LambdaUpdateWrapper<CommonRating> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(CommonRating::getId, ratingId)
|
|
|
+ .setSql("reject_num = IFNULL(reject_num, 0) + 1");
|
|
|
+ int rows = commonRatingMapper.update(null, wrapper);
|
|
|
+ log.info("【用户补充申诉】申诉失败,评价拒绝次数+1,ratingId={},影响行数={}", ratingId, rows);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("【用户补充申诉】更新评价拒绝次数失败,ratingId={}", ratingId, e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void deleteRatingAndComments(Integer ratingId) {
|
|
|
try {
|
|
|
CommonRating rating = commonRatingMapper.selectById(ratingId);
|