Browse Source

bugId-1141 【服务中台】详情页面已驳回处理结果显示不正确

zhangchen 1 month ago
parent
commit
6a956791a9

+ 7 - 9
alien-store/src/main/java/shop/alien/store/service/impl/LifeUserViolationServiceImpl.java

@@ -359,13 +359,7 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
         LifeUserViolation v = lifeUserViolationMapper.selectById(id);
         v.setProcessingStatus(processingStatus);
         v.setProcessingTime(new Date());
-        if(StringUtils.isNotBlank(reportResult)){
-            v.setReportResult(reportResult);
-        } else if(processingStatus.equals("1")){
-            v.setReportResult("经审核,举报属实,现已处理");
-        } else {
-            v.setReportResult("经审核,举报属实,现已处理/暂未发现违规行为");
-        }
+        v.setReportResult(reportResult);
 
         // 举报时间
         SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@@ -376,10 +370,14 @@ public class LifeUserViolationServiceImpl extends ServiceImpl<LifeUserViolationM
         if(StringUtils.isNotEmpty(v.getReportedUserId())){
             if (v.getReportedUserType().equals("1")) {
                 StoreUser storeUser = storeUserMapper.selectById(v.getReportedUserId());
-                reportedUserName = storeUser.getNickName();
+                if(storeUser != null){
+                    reportedUserName = storeUser.getNickName();
+                }
             } else{
                 LifeUser lifeUser = lifeUserMapper.selectById(v.getReportedUserId());
-                reportedUserName = lifeUser.getUserName();
+                if(lifeUser != null) {
+                    reportedUserName = lifeUser.getUserName();
+                }
             }
         }
         // 被举报动态信息