zhangchen 3 долоо хоног өмнө
parent
commit
3cd9e38cd1

+ 1 - 1
alien-lawyer/src/main/java/shop/alien/lawyer/controller/LawyerUserViolationController.java

@@ -57,7 +57,7 @@ public class LawyerUserViolationController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "reportedUserId", value = "被举报用户ID", required = true, dataType = "String", paramType = "body"),
             @ApiImplicitParam(name = "reportingUserId", value = "举报用户ID", required = true, dataType = "String", paramType = "body"),
-            @ApiImplicitParam(name = "violationType", value = "违规类型:1-用户违规,2-色情低俗,3-违法违规,4-谩骂嘲讽、煽动对立,5-涉嫌诈骗,6-人身攻击,7-种族歧视,8-政治敏感,9-虚假、不实内容,违反公德秩序,10-危害人身安全,11-网络暴力,12-其他原因", required = true, dataType = "String", paramType = "body"),
+            @ApiImplicitParam(name = "violationType", value = "违规类型1-服务态度差,2-专业能力差,3-响应时间超过24小时,4-其他原因", required = true, dataType = "String", paramType = "body"),
             @ApiImplicitParam(name = "reportContextType", value = "举报内容分类", required = true, dataType = "String", paramType = "body"),
             @ApiImplicitParam(name = "otherReasonContent", value = "其他原因具体内容(当violationType为12时必填)", required = false, dataType = "String", paramType = "body"),
             @ApiImplicitParam(name = "reportEvidenceImg", value = "举报凭证图片", required = false, dataType = "String", paramType = "body")

+ 9 - 13
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerUserViolationServiceImpl.java

@@ -414,23 +414,19 @@ public class LawyerUserViolationServiceImpl extends ServiceImpl<LawyerUserViolat
      */
     private String getViolationReason(LawyerUserViolation lawyerUserViolation) {
         String violationReasonId = lawyerUserViolation.getViolationReason();
+        String violationReason = DEFAULT_VIOLATION_REASON;
         if (StringUtils.isEmpty(violationReasonId)) {
-            return DEFAULT_VIOLATION_REASON;
+            return violationReason;
         }
 
-        try {
-            StoreDictionary storeDictionary = storeDictionaryMapper.selectById(violationReasonId);
-            if (storeDictionary != null && !DEFAULT_VIOLATION_REASON.equals(storeDictionary.getDictDetail())) {
-                return storeDictionary.getDictDetail();
-            } else {
-                // 如果是"其他原因",返回其他原因内容
-                String otherReason = lawyerUserViolation.getOtherReasonContent();
-                return StringUtils.isNotEmpty(otherReason) ? otherReason : DEFAULT_VIOLATION_REASON;
-            }
-        } catch (Exception e) {
-            log.error("获取违规原因异常,使用默认原因,异常信息:{}", e.getMessage(), e);
-            return DEFAULT_VIOLATION_REASON;
+        if(violationReasonId.equals("1")){
+            violationReason = "服务态度差";
+        } else if(violationReasonId.equals("2")){
+            violationReason = "专业能力差";
+        } else if(violationReasonId.equals("3")){
+            violationReason = "响应时间超过24小时";
         }
+        return violationReason;
     }
 
     /**