模板修改功能删除字段 bug 修复

yun-zuoyi
wei.peng 6 years ago
parent 1cea3efd97
commit da490cef12

@ -2,6 +2,7 @@ package cn.estsh.i3plus.core.apiservice.controller.busi;
import cn.estsh.i3plus.core.api.iservice.busi.ISysLabelTemplateService;
import cn.estsh.i3plus.platform.common.convert.ConvertBean;
import cn.estsh.i3plus.platform.common.tool.BeanCopyTool;
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
import cn.estsh.i3plus.pojo.base.bean.ListPager;
import cn.estsh.i3plus.pojo.base.common.Pager;
@ -21,6 +22,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
@ -124,15 +126,20 @@ public class SysLabelTemplateController extends CoreBaseController {
// 条件验证
ValidatorBean.beginValid(sysLabelTemplate)
.notNull("id", sysLabelTemplate.getId())
.notNull("templateCode", sysLabelTemplate.getTemplateCode())
.notNull("templateName", sysLabelTemplate.getTemplateName())
.notNull("paramsPack", sysLabelTemplate.getParamsPack())
.notNull("templateContent", sysLabelTemplate.getTemplateContent());
SysLabelTemplate template = sysLabelTemplateService.getSysLabelTemplateById(sysLabelTemplate.getId());
ValidatorBean.checkNotNull(template,"不存在的模板信息");
//添加初始化
ConvertBean.modelUpdate(sysLabelTemplate, user);
BeanCopyTool.beanCopy(sysLabelTemplate,template);
sysLabelTemplateService.updateSysLabelTemplate(sysLabelTemplate);
sysLabelTemplateService.updateSysLabelTemplate(template);
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
}catch(ImppBusiException busExcep){
return ResultBean.fail(busExcep);

Loading…
Cancel
Save