diff --git a/bonus-admin/src/main/java/com/bonus/web/controller/system/SysEncryTypeController.java b/bonus-admin/src/main/java/com/bonus/web/controller/system/SysEncryTypeController.java index 01ba832..ac27e72 100644 --- a/bonus-admin/src/main/java/com/bonus/web/controller/system/SysEncryTypeController.java +++ b/bonus-admin/src/main/java/com/bonus/web/controller/system/SysEncryTypeController.java @@ -28,7 +28,7 @@ public class SysEncryTypeController extends BaseController { private ISysEncryTypeService encryTypeService; @GetMapping("/list") - @SysLog(title = "档案加密类型列表", module = "数据档案移交->档案加密类型管理", businessType = OperaType.QUERY, details = "档案加密类型列表", logType = 1) + @SysLog(title = "数据加密类型列表", module = "数据档案移交->数据加密类型管理", businessType = OperaType.QUERY, details = "数据加密类型列表", logType = 1) @RequiresPermissions("encry:type:list") public TableDataInfo list(SysEncryType sysEncryType) { startPage(); @@ -36,7 +36,7 @@ public class SysEncryTypeController extends BaseController { return getDataTable(list); } @PostMapping("addEncryType") - @SysLog(title = "新增档案加密类型", module = "数据档案移交->档案加密类型管理", businessType = OperaType.INSERT, details = "新增档案加密类型", logType = 1) + @SysLog(title = "新增数据加密类型", module = "数据档案移交->数据加密类型管理", businessType = OperaType.INSERT, details = "新增数据加密类型", logType = 1) @RequiresPermissions("encry:type:add") public R add(@RequestBody @Validated SysEncryType sysEncryType) { return encryTypeService.add(sysEncryType); @@ -44,14 +44,14 @@ public class SysEncryTypeController extends BaseController { @PostMapping("editEncryType") - @SysLog(title = "修改档案加密类型", module = "数据档案移交->档案加密类型管理", businessType = OperaType.UPDATE, details = "修改档案加密类型", logType = 1) + @SysLog(title = "修改数据加密类型", module = "数据档案移交->数据加密类型管理", businessType = OperaType.UPDATE, details = "修改数据加密类型", logType = 1) @RequiresPermissions("encry:type:edit") public R edit(@RequestBody @Validated SysEncryType sysEncryType) { return encryTypeService.edit(sysEncryType); } @PostMapping("delEncryType") - @SysLog(title = "删除档案加密类型", module = "数据档案移交->档案加密类型管理", businessType = OperaType.DELETE, details = "删除档案加密类型", logType = 1) + @SysLog(title = "删除数据加密类型", module = "数据档案移交->数据加密类型管理", businessType = OperaType.DELETE, details = "删除数据加密类型", logType = 1) @RequiresPermissions("encry:type:del") public R del(@RequestBody SysEncryType sysEncryType) { Integer delNum = encryTypeService.del(sysEncryType); diff --git a/bonus-admin/src/main/java/com/bonus/web/domain/TransferApplyDto.java b/bonus-admin/src/main/java/com/bonus/web/domain/TransferApplyDto.java index 26aac71..49ff95a 100644 --- a/bonus-admin/src/main/java/com/bonus/web/domain/TransferApplyDto.java +++ b/bonus-admin/src/main/java/com/bonus/web/domain/TransferApplyDto.java @@ -51,7 +51,6 @@ public class TransferApplyDto { */ private String auditUser; private String auditUserName; - private String transfertTime; /** diff --git a/bonus-admin/src/main/java/com/bonus/web/mapper/FileIndexMapper.java b/bonus-admin/src/main/java/com/bonus/web/mapper/FileIndexMapper.java index 50552a5..6d3fb64 100644 --- a/bonus-admin/src/main/java/com/bonus/web/mapper/FileIndexMapper.java +++ b/bonus-admin/src/main/java/com/bonus/web/mapper/FileIndexMapper.java @@ -20,4 +20,6 @@ public interface FileIndexMapper { Integer update(FileIndexDto dto); Integer del(FileIndexDto dto); + + Integer getCount(FileIndexDto dto); } diff --git a/bonus-admin/src/main/java/com/bonus/web/service/impl/FileIndexServiceImpl.java b/bonus-admin/src/main/java/com/bonus/web/service/impl/FileIndexServiceImpl.java index 9f967f1..f6285b6 100644 --- a/bonus-admin/src/main/java/com/bonus/web/service/impl/FileIndexServiceImpl.java +++ b/bonus-admin/src/main/java/com/bonus/web/service/impl/FileIndexServiceImpl.java @@ -25,12 +25,22 @@ public class FileIndexServiceImpl implements FileIndexService { @Override public AjaxResult add(FileIndexDto dto) { + // 查询名称是否重复 + Integer count = mapper.getCount(dto); + if (count > 0) { + return AjaxResult.error("名称已重复,请重新修改"); + } Integer add = mapper.add(dto); return add > 0 ? AjaxResult.success("添加成功") : AjaxResult.error("添加失败"); } @Override public AjaxResult update(FileIndexDto dto) { + // 查询名称是否重复 + Integer count = mapper.getCount(dto); + if (count > 0) { + return AjaxResult.error("名称已重复,请重新修改"); + } Integer update = mapper.update(dto); return update > 0 ? AjaxResult.success("修改成功") : AjaxResult.error("修改失败"); } diff --git a/bonus-admin/src/main/resources/mapper/FileIndexMapper.xml b/bonus-admin/src/main/resources/mapper/FileIndexMapper.xml index af68dc1..dceccfd 100644 --- a/bonus-admin/src/main/resources/mapper/FileIndexMapper.xml +++ b/bonus-admin/src/main/resources/mapper/FileIndexMapper.xml @@ -41,4 +41,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + diff --git a/bonus-admin/src/main/resources/mapper/FilesClassifyNameStandardMapper.xml b/bonus-admin/src/main/resources/mapper/FilesClassifyNameStandardMapper.xml index 9378ec7..a6eec42 100644 --- a/bonus-admin/src/main/resources/mapper/FilesClassifyNameStandardMapper.xml +++ b/bonus-admin/src/main/resources/mapper/FilesClassifyNameStandardMapper.xml @@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY dkfcns.create_time DESC