|
@@ -442,14 +442,16 @@ public class ManagerController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(renovationPartsDetailEntity.getPartsBrandId() != null){
|
|
|
- RenovationPartsBrandEntity renovationPartsBrandEntity = renovationPartsBrandService.findById(renovationPartsDetailEntity.getPartsBrandId());
|
|
|
+ if(renovationPartsDetailEntity.getPartsBrandId() == null){
|
|
|
+ renovationPartsDetailEntity.setPartsBrandId(1L);
|
|
|
+ }
|
|
|
+ RenovationPartsBrandEntity renovationPartsBrandEntity = renovationPartsBrandService.findById(renovationPartsDetailEntity.getPartsBrandId());
|
|
|
|
|
|
- if(renovationPartsBrandEntity != null){
|
|
|
- responseRenovationPartsDetailManager.setBrandName(renovationPartsBrandEntity.getBrandName());
|
|
|
- }
|
|
|
+ if(renovationPartsBrandEntity != null){
|
|
|
+ responseRenovationPartsDetailManager.setBrandName(renovationPartsBrandEntity.getBrandName());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if(renovationPartsDetailEntity.getCompanyId() != null){
|
|
|
CompanyEntity companyEntity = companyService.findById(renovationPartsDetailEntity.getCompanyId());
|
|
|
|
|
@@ -477,10 +479,12 @@ public class ManagerController {
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "RequestRenovationPartsDetailManager", value = "json对象里面的参数", dataType = "String")})
|
|
|
public Result updateModelDetail(@RequestBody RequestRenovationPartsDetailManager param){
|
|
|
-
|
|
|
if(param.getId() == null){
|
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
|
}
|
|
|
+ if (StringUtils.isBlank(param.getZhName())) {
|
|
|
+ return Result.failure(1, "模型名称不能为空");
|
|
|
+ }
|
|
|
|
|
|
RenovationPartsDetailEntity renovationPartsDetailEntity = new RenovationPartsDetailEntity();
|
|
|
BeanUtils.copyProperties(param, renovationPartsDetailEntity);
|
|
@@ -548,10 +552,6 @@ public class ManagerController {
|
|
|
return Result.failure(CodeConstant.FAILURE_CODE_3001, CodeConstant.FAILURE_MSG_3001);
|
|
|
}
|
|
|
|
|
|
- if (StringUtils.isBlank(param.getName())) {
|
|
|
- return Result.failure(CodeConstant.FAILURE_CODE_3001, "模型名称为空,不能保存");
|
|
|
- }
|
|
|
-
|
|
|
ModelUploadEntity modelUploadEntity = modelUploadService.findById(param.getModelUploadId());
|
|
|
if(modelUploadEntity == null){
|
|
|
return Result.failure(CodeConstant.FAILURE_CODE_4009, CodeConstant.FAILURE_MSG_4009);
|