mybatisplus版本升级支持通用枚举、新增部门树、用户列表的无数据权限接口
| | |
| | | import com.ycl.common.utils.SecurityUtils; |
| | | import com.ycl.domain.entity.ProcessLog; |
| | | import com.ycl.event.event.TaskLogEvent; |
| | | import com.ycl.service.ProcessLogService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.context.event.EventListener; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | /** 流程实例id */ |
| | | @ApiModelProperty("流程实例id") |
| | | private String flowInsId; |
| | | private String processInsId; |
| | | |
| | | /** 产生日志的人/或其它 */ |
| | | @ApiModelProperty("产生日志的人/或其它") |
| | |
| | | <result column="task_id" property="taskId" /> |
| | | <result column="event_type" property="eventType" typeHandler="com.baomidou.mybatisplus.core.handlers.MybatisEnumTypeHandler"/> |
| | | <result column="project_id" property="projectId" /> |
| | | <result column="flow_ins_id" property="flowInsId" /> |
| | | <result column="process_ins_id" property="processInsId" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="nick_name" property="nickName" /> |
| | | <result column="gmt_create" property="gmtCreate" /> |
| | |
| | | TFL.task_id, |
| | | TFL.event_type, |
| | | TFL.project_id, |
| | | TFL.flow_ins_id, |
| | | TFL.process_ins_id, |
| | | TFL.user_id, |
| | | TFL.event_data_json, |
| | | TFL.id |
| | |
| | | TFL.task_id, |
| | | TFL.event_type, |
| | | TFL.project_id, |
| | | TFL.flow_ins_id, |
| | | TFL.process_ins_id, |
| | | TFL.user_id, |
| | | TFL.event_data_json, |
| | | TFL.gmt_create, |
| | |
| | | TFL.task_id, |
| | | TFL.event_type, |
| | | TFL.project_id, |
| | | TFL.flow_ins_id, |
| | | TFL.process_ins_id, |
| | | TFL.user_id, |
| | | SU.nick_name, |
| | | TFL.event_data_json, |
| | |
| | | <poi.version>4.1.2</poi.version> |
| | | <velocity.version>2.3</velocity.version> |
| | | <jwt.version>0.9.1</jwt.version> |
| | | <mybatisplus.version>3.5.1</mybatisplus.version> |
| | | <mybatisplus.version>3.5.4.1</mybatisplus.version> |
| | | <lombok.version>1.18.24</lombok.version> |
| | | <easyEacel.version>3.3.2</easyEacel.version> |
| | | <knife.version>3.0.3</knife.version> |
| | |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户列表 无数据权限 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @GetMapping("/list/no-data-auth") |
| | | public TableDataInfo listNoAuth(SysUser user) { |
| | | startPage(); |
| | | List<SysUser> list = userService.selectUserListNoAuth(user); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | @Log(title = "用户管理", businessType = BusinessType.EXPORT) |
| | | @PreAuthorize("@ss.hasPermi('system:user:export')") |
| | | @PostMapping("/export") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取部门树列表 无数据权限 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @GetMapping("/deptTree/no-data-auth") |
| | | public AjaxResult deptTreeNoDataAuth(SysDept dept) { |
| | | return success(deptService.deptTreeNoDataAuth(dept)); |
| | | } |
| | | |
| | | /** |
| | | * 获取部门树列表,流程配置使用 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | |
| | | */ |
| | | public List<TreeSelect> selectDeptTreeList(SysDept dept); |
| | | |
| | | |
| | | public List<TreeSelect> deptTreeNoDataAuth(SysDept dept); |
| | | |
| | | /** |
| | | * 流程配置使用--树结构 |
| | | * |
| | |
| | | */ |
| | | public List<SysUser> selectUserList(SysUser user); |
| | | |
| | | public List<SysUser> selectUserListNoAuth(SysUser user); |
| | | |
| | | /** |
| | | * 根据条件分页查询已分配用户角色列表 |
| | | * |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<TreeSelect> deptTreeNoDataAuth(SysDept dept) { |
| | | List<SysDept> depts = deptMapper.selectDeptList(dept);; |
| | | return buildDeptTreeSelect(depts); |
| | | } |
| | | |
| | | @Override |
| | | public List<StringTreeSelect> flowDeptTree(SysDept dept) { |
| | | List<SysDept> depts = deptMapper.selectDeptList(dept); |
| | | List<StringTreeSelect> list = depts.stream().map(item -> { |
| | |
| | | return userMapper.selectUserList(user); |
| | | } |
| | | |
| | | @Override |
| | | public List<SysUser> selectUserListNoAuth(SysUser user) { |
| | | return userMapper.selectUserList(user); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件分页查询已分配用户角色列表 |
| | | * |