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

+ 5 - 3
sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/custom/CustomManagerController.java

@@ -400,9 +400,11 @@ public class CustomManagerController extends BaseController {
             ResponseCustomProductManager manager = new ResponseCustomProductManager();
             BeanUtil.copyProperties(customProductEntity, manager, false);
             CustomProductFirstclassifyEntity firstclassifyEntity = productFirstclassifyService.findById(customProductEntity.getParentId());
-            manager.setModelId(customProductEntity.getModelId());
-            manager.setTypeName(firstclassifyEntity.getName());
-            managers.add(manager);
+            if (ObjectUtil.isNotNull(firstclassifyEntity)){
+                manager.setModelId(customProductEntity.getModelId());
+                manager.setTypeName(firstclassifyEntity.getName());
+                managers.add(manager);
+            }
         }
 
         Page<ResponseCustomProductManager> a = new Page<>(param.getPageNum(), param.getPageSize());