部门管理

master
shijie 4 years ago
parent a04eaba7ad
commit 96b3466579
  1. 21
      dq-financial-api/src/main/java/com/daqing/financial/hrms/PermissionControllerApi.java
  2. 3
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java
  3. 1
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/EmployeeServiceImpl.java
  4. 5
      dq-framework-common/src/main/java/com/daqing/framework/config/MybatisPlusConfig.java
  5. 51
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/PermissionAddRequest.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);
}

@ -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> employeeTO = employeeService.getEmployeeAndDeptById(Arrays.asList(ids));
return new ResponseResult<List<EmployeeTO>>().SUCCESS(employeeTO);

@ -19,7 +19,6 @@ public class EmployeeServiceImpl extends ServiceImpl<EmployeeDao, EmployeeEntity
*/
@Override
public List<EmployeeTO> getEmployeeAndDeptById(List<Long> ids) {
return this.getBaseMapper().getEmployeeAndDeptById(ids);
}

@ -12,8 +12,9 @@ import org.springframework.context.annotation.Configuration;
*/
@Configuration
public class MybatisPlusConfig {
@Bean
public PaginationInterceptor paginationInterceptor() {
return new PaginationInterceptor();
PaginationInterceptor page = new PaginationInterceptor();
page.setDialectType("mysql");
return page;
}
}

@ -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;
/**
* 是否是菜单10不是
*/
private Integer menuOrNot;
/**
* 排序
*/
private Integer sort;
/**
* 图标
*/
private String icon;
}
Loading…
Cancel
Save