소스 검색

优化代码

xiewenjie 3 년 전
부모
커밋
f8e147721c
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ManagerController.java

+ 5 - 5
sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ManagerController.java

@@ -430,12 +430,12 @@ public class ManagerController extends BaseController {
                     responseRenovationPartsDetailManager.setTypeName(renovationPartsEntity.getDescription() + " > " + renovationPartsTypeEntity.getDescription());
                 }
             }
-
-            RenovationPartsColorEntity renovationPartsColorEntity = renovationPartsColorService.findById(renovationPartsDetailEntity.getPartsColorId());
-            if (renovationPartsColorEntity != null) {
-                responseRenovationPartsDetailManager.setColorName(renovationPartsColorEntity.getColorName());
+            if (ObjectUtil.isNotNull(renovationPartsDetailEntity.getPartsColorId())) {
+                RenovationPartsColorEntity renovationPartsColorEntity = renovationPartsColorService.findById(renovationPartsDetailEntity.getPartsColorId());
+                if (renovationPartsColorEntity != null) {
+                    responseRenovationPartsDetailManager.setColorName(renovationPartsColorEntity.getColorName());
+                }
             }
-
             ResponseRenovationPartsAttaching responseRenovationPartsAttaching = renovationPartsAttachingService.findAttachinByDetailId(renovationPartsDetailEntity.getId());
             if (responseRenovationPartsAttaching != null) {
                 if (responseRenovationPartsAttaching.isWallAttaching()) {