Commit 6f14c1eb by zhangxingmin

push

parent 74ef24a7
......@@ -82,6 +82,7 @@ public class ApiConditionConfigServiceImpl implements ApiConditionConfigService
throw new BusinessException("同类型下条件名称已存在");
}
ConditionConfig conditionConfig = new ConditionConfig();
BeanUtils.copyProperties(request,conditionConfig);
conditionConfig.setConditionBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_CONDITION_CONFIG.getCode()));
//条件编码
conditionConfig.setCode(CodeGenerator.generate10Code(CodeGeneratorConstants.PREFIX_CONDITION_CODE));
......@@ -108,6 +109,7 @@ public class ApiConditionConfigServiceImpl implements ApiConditionConfigService
if (!CollectionUtils.isEmpty(conditionConfigList)) {
throw new BusinessException("同类型下条件名称已存在");
}
BeanUtils.copyProperties(request,conditionConfig);
iConditionConfigService.saveOrUpdate(conditionConfig);
return Result.success();
}
......
......@@ -72,6 +72,7 @@ public class ApiConditionTypeServiceImpl implements ApiConditionTypeService {
throw new BusinessException("条件类型名称已存在");
}
ConditionType conditionType = new ConditionType();
BeanUtils.copyProperties(request,conditionType);
conditionType.setConditionTypeBizId(RandomStringGenerator.generateBizId16(CommonEnum.UID_TYPE_CONDITION_TYPE.getCode()));
//编码
conditionType.setCode(CodeGenerator.generate10Code(CodeGeneratorConstants.PREFIX_CONDITION_TYPE_CODE));
......@@ -97,6 +98,7 @@ public class ApiConditionTypeServiceImpl implements ApiConditionTypeService {
if (!CollectionUtils.isEmpty(conditionTypeList)) {
throw new BusinessException("条件类型名称已存在");
}
BeanUtils.copyProperties(request,conditionType);
iConditionTypeService.saveOrUpdate(conditionType);
return Result.success();
}
......
......@@ -146,6 +146,9 @@ public class ApiVariableServiceImpl implements ApiVariableService {
*/
@Override
public Result edit(ApiVariableEditRequest request) {
//校验变量信息是否存在
Result<Variable> result = checkVariableIsExist(request.getVariableBizId());
Variable variable = result.getData();
//校验变量中文名唯一性
List<Variable> variableList = iVariableService.queryList(VariableDto.builder()
.nameCn(request.getNameCn())
......@@ -164,7 +167,6 @@ public class ApiVariableServiceImpl implements ApiVariableService {
if (!CollectionUtils.isEmpty(variableList1)) {
throw new BusinessException("变量英文名已存在");
}
Variable variable = new Variable();
BeanUtils.copyProperties(request,variable);
iVariableService.saveOrUpdate(variable);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment