| | |
| | | import com.moral.api.pojo.form.sysDictType.SysDictTypeDeleteForm; |
| | | import com.moral.api.pojo.form.sysDictType.SysDictTypeInsertForm; |
| | | import com.moral.api.pojo.form.sysDictType.SysDictTypeUpdateForm; |
| | | import com.moral.api.pojo.vo.sysDictData.SysDictDataDeleteVO; |
| | | import com.moral.api.pojo.vo.sysDictData.SysDictDataInsertVO; |
| | | import com.moral.api.pojo.vo.sysDictData.SysDictDataUpdateVO; |
| | | import com.moral.api.pojo.vo.sysDictType.SysDictTypeDeleteVO; |
| | | import com.moral.api.pojo.vo.sysDictType.SysDictTypeInsertVO; |
| | | import com.moral.api.pojo.vo.sysDictType.SysDictTypeQueryVO; |
| | | import com.moral.api.pojo.vo.sysDictType.SysDictTypeUpdateVO; |
| | | import com.moral.api.service.SysDictDataService; |
| | | import com.moral.api.service.SysDictTypeService; |
| | | import com.moral.constant.ResponseCodeEnum; |
| | |
| | | //处理插入业务 |
| | | SysDictDataDTO dto = sysDictDataService.insertData(form); |
| | | |
| | | //转换前端所需参数 |
| | | SysDictDataInsertVO vo = SysDictDataInsertVO.convert(dto); |
| | | |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), vo); |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), null); |
| | | } |
| | | |
| | | @PostMapping("data/update") |
| | |
| | | //处理更新业务 |
| | | SysDictDataDTO dto = sysDictDataService.updateData(form); |
| | | |
| | | //转换前端所需参数 |
| | | SysDictDataUpdateVO vo = SysDictDataUpdateVO.convert(dto); |
| | | |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), vo); |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), null); |
| | | } |
| | | |
| | | @PostMapping("data/delete") |
| | |
| | | //处理删除业务 |
| | | SysDictDataDTO dto = sysDictDataService.deleteData(form); |
| | | |
| | | //转换前端所需参数 |
| | | SysDictDataDeleteVO vo = SysDictDataDeleteVO.convert(dto); |
| | | |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), vo); |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), null); |
| | | } |
| | | |
| | | @GetMapping("type/query") |
| | |
| | | //处理插入业务 |
| | | SysDictTypeDTO dto = sysDictTypeService.insertType(form); |
| | | |
| | | //转换前端所需参数 |
| | | SysDictTypeInsertVO vo = SysDictTypeInsertVO.convert(dto); |
| | | |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), vo); |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(),null); |
| | | } |
| | | |
| | | @PostMapping("type/update") |
| | |
| | | //处理更新业务 |
| | | SysDictTypeDTO dto = sysDictTypeService.updateType(form); |
| | | |
| | | //转换前端所需参数 |
| | | SysDictTypeUpdateVO vo = SysDictTypeUpdateVO.convert(dto); |
| | | |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), vo); |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), null); |
| | | } |
| | | |
| | | @PostMapping("type/delete") |
| | |
| | | //处理删除业务 |
| | | SysDictTypeDTO dto = sysDictTypeService.deleteType(form); |
| | | |
| | | //转换前端所需参数 |
| | | SysDictTypeDeleteVO vo = SysDictTypeDeleteVO.convert(dto); |
| | | |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(), vo); |
| | | return new ResultMessage(dto.getCode(), dto.getMsg(),null); |
| | | } |
| | | |
| | | } |