| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.vincent.rsf.framework.common.Cools; |
| | | import com.vincent.rsf.framework.common.R; |
| | | import com.vincent.rsf.framework.exception.CoolException; |
| | | import com.vincent.rsf.server.common.utils.ExcelUtil; |
| | | import com.vincent.rsf.server.common.annotation.OperationLog; |
| | | import com.vincent.rsf.server.common.domain.BaseParam; |
| | |
| | | @PostMapping("/dictType/save") |
| | | public R save(@RequestBody DictType dictType) { |
| | | dictType.setCreateBy(getLoginUserId()); |
| | | dictType.setCreateTime(new Date()); |
| | | dictType.setUpdateBy(getLoginUserId()); |
| | | dictType.setUpdateTime(new Date()); |
| | | if (Objects.isNull(dictType.getName())) { |
| | | throw new CoolException("字典名称不能为空!!"); |
| | | } |
| | | if (Objects.isNull(dictType.getDescription())) { |
| | | throw new CoolException("字典描述不能为空!!"); |
| | | } |
| | | if (Objects.isNull(dictType.getCode())) { |
| | | throw new CoolException("字典编码不能为空!!"); |
| | | } |
| | | |
| | | if (!dictTypeService.save(dictType)) { |
| | | return R.error("Save Fail"); |
| | | } |