【7.1.6】修改属性时除了编码不能修改其他都可修改

pull/25/head
fengshuonan 2022-01-01 20:15:05 +08:00
parent d5a3a720ad
commit 3583e83e43
1 changed files with 2 additions and 5 deletions

View File

@ -83,15 +83,12 @@ public class SysThemeTemplateFieldServiceImpl extends ServiceImpl<SysThemeTempla
public void edit(SysThemeTemplateFieldRequest sysThemeTemplateFieldRequest) {
SysThemeTemplateField sysThemeTemplateField = this.queryThemeTemplateFieldById(sysThemeTemplateFieldRequest);
// 校验系统主题模板属性使用
this.verificationAttributeUsage(sysThemeTemplateField);
// 编号不能修改
sysThemeTemplateFieldRequest.setFieldCode(null);
// 更新属性
BeanUtil.copyProperties(sysThemeTemplateFieldRequest, sysThemeTemplateField);
// 设置是否必填:如果请求参数为空,默认设置为非必填
sysThemeTemplateField.setFieldRequired(StringUtils.isBlank(sysThemeTemplateFieldRequest.getFieldType()) ? YesOrNotEnum.N.getCode().charAt(0) : sysThemeTemplateFieldRequest.getFieldRequired());
this.updateById(sysThemeTemplateField);
}