From 96b3466579acd44d74a2fa3d22dabae9d7e31ffb Mon Sep 17 00:00:00 2001 From: shijie <648688341@qq.com> Date: Fri, 11 Sep 2020 12:37:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrms/PermissionControllerApi.java | 21 ++++++++ .../hrms/controller/EmployeeController.java | 3 +- .../service/impl/EmployeeServiceImpl.java | 1 - .../framework/config/MybatisPlusConfig.java | 7 +-- .../hrms/request/PermissionAddRequest.java | 51 +++++++++++++++++++ 5 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 dq-financial-api/src/main/java/com/daqing/financial/hrms/PermissionControllerApi.java create mode 100644 dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/PermissionAddRequest.java diff --git a/dq-financial-api/src/main/java/com/daqing/financial/hrms/PermissionControllerApi.java b/dq-financial-api/src/main/java/com/daqing/financial/hrms/PermissionControllerApi.java new file mode 100644 index 00000000..730e55d4 --- /dev/null +++ b/dq-financial-api/src/main/java/com/daqing/financial/hrms/PermissionControllerApi.java @@ -0,0 +1,21 @@ +package com.daqing.financial.hrms; + +import com.daqing.framework.domain.hrms.request.DeptAddRequest; +import com.daqing.framework.model.response.ResponseResult; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +/** + * @Author: gongsj. + * @Description: 权限管理controllerApi定义 + * @Date:Created in 2020/09/11 11:13. + * @Modified By: + */ +@Api(value = "权限管理相关操作", tags = "提供权限信息增删改查等相关方法") +public interface PermissionControllerApi { + /** + * 新增一条权限信息 + */ + @ApiOperation(value = "新增一条权限信息", notes = "新增一条权限信息") + ResponseResult save(DeptAddRequest deptAddRequest); +} diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java index 58192a71..c7d1d566 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java @@ -23,6 +23,7 @@ import java.util.Map; @RestController @RequestMapping("hrms/employee") public class EmployeeController implements EmployeeControllerApi{ + @Autowired private EmployeeService employeeService; @@ -80,8 +81,8 @@ public class EmployeeController implements EmployeeControllerApi{ * @param ids * @return */ - @GetMapping("/getEmployeeAndDeptById/{ids}") @Override + @GetMapping("/getEmployeeAndDeptById/{ids}") public ResponseResult getEmployeeAndDeptById(@RequestBody @PathVariable("ids") Long[] ids) { List employeeTO = employeeService.getEmployeeAndDeptById(Arrays.asList(ids)); return new ResponseResult>().SUCCESS(employeeTO); diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java index 767c0ca4..c4ec6b44 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java @@ -19,7 +19,6 @@ public class EmployeeServiceImpl extends ServiceImpl getEmployeeAndDeptById(List ids) { - return this.getBaseMapper().getEmployeeAndDeptById(ids); } diff --git a/dq-framework-common/src/main/java/com/daqing/framework/config/MybatisPlusConfig.java b/dq-framework-common/src/main/java/com/daqing/framework/config/MybatisPlusConfig.java index 5cd15d76..d8ebb993 100644 --- a/dq-framework-common/src/main/java/com/daqing/framework/config/MybatisPlusConfig.java +++ b/dq-framework-common/src/main/java/com/daqing/framework/config/MybatisPlusConfig.java @@ -12,8 +12,9 @@ import org.springframework.context.annotation.Configuration; */ @Configuration public class MybatisPlusConfig { - @Bean - public PaginationInterceptor paginationInterceptor(){ - return new PaginationInterceptor(); + public PaginationInterceptor paginationInterceptor() { + PaginationInterceptor page = new PaginationInterceptor(); + page.setDialectType("mysql"); + return page; } } \ No newline at end of file diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/PermissionAddRequest.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/PermissionAddRequest.java new file mode 100644 index 00000000..5837ae65 --- /dev/null +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/PermissionAddRequest.java @@ -0,0 +1,51 @@ +package com.daqing.framework.domain.hrms.request; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 记录菜单权限 + * + * @author gongsj + * @email gongsj@gmail.com + * @date 2020-09-07 17:12:14 + */ +@Data +public class PermissionAddRequest implements Serializable { + + /** + * 权限标识符 + */ + private String code; + /** + * 名称 + */ + private String name; + /** + * 路径 + */ + private String url; + /** + * 父权限id + */ + private Long parentId; + /** + * 层级 + */ + private Integer level; + /** + * 是否是菜单:1、是,0、不是 + */ + private Integer menuOrNot; + /** + * 排序 + */ + private Integer sort; + /** + * 图标 + */ + private String icon; + +}