Commit 1f6492d9 authored by huyuchen's avatar huyuchen

菜单权限修改

parent 9ae9289d
...@@ -35,7 +35,6 @@ public class SysUserPermissionController { ...@@ -35,7 +35,6 @@ public class SysUserPermissionController {
private final SysUserPermissionService sysUserPermissionService; private final SysUserPermissionService sysUserPermissionService;
/** /**
* 简单分页查询 * 简单分页查询
* *
...@@ -144,12 +143,12 @@ public class SysUserPermissionController { ...@@ -144,12 +143,12 @@ public class SysUserPermissionController {
} }
/** /**
* 名称,编码模糊搜索 * 根据类型查询字典值
* *
* @param type 字典类型 * @param type 字典类型
* @return * @return
*/ */
@Operation(description = "根据名称,编码模糊搜索") @Operation(description = "根据类型查询字典值")
@PostMapping("/selectDictByType") @PostMapping("/selectDictByType")
public R<List<SysDictVo>> selectDictByType(@RequestParam String type) { public R<List<SysDictVo>> selectDictByType(@RequestParam String type) {
return new R<>(sysUserPermissionService.selectDictByType(type)); return new R<>(sysUserPermissionService.selectDictByType(type));
......
...@@ -93,6 +93,14 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> { ...@@ -93,6 +93,14 @@ public interface SysUserPermissionMapper extends BaseMapper<SysUserPermission> {
*/ */
IPage<SysUserDeptVo> selectQuotationVO(Page<SysUserDeptVo> page, @Param("name") String name); IPage<SysUserDeptVo> selectQuotationVO(Page<SysUserDeptVo> page, @Param("name") String name);
/**
* 根据名称或者编码查询数据
* 部门&&收入归属权限
* @param name 名称
* @return
*/
IPage<SysUserDeptVo> selectDeptVO(Page<SysUserDeptVo> page, @Param("name") String name);
List<SysDictVo> selectDictByType(@Param("type") String type); List<SysDictVo> selectDictByType(@Param("type") String type);
} }
...@@ -115,6 +115,9 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM ...@@ -115,6 +115,9 @@ public class SysUserPermissionServiceImpl extends ServiceImpl<SysUserPermissionM
} else { } else {
iPage = baseMapper.selectContractSimpleVO(page, searchVo.getName(),searchVo.getName(),searchVo.getType()); iPage = baseMapper.selectContractSimpleVO(page, searchVo.getName(),searchVo.getName(),searchVo.getType());
} }
} else if (CommonConstants.EIGHT_STRING.equals(searchVo.getType()) || CommonConstants.NINE_STRING.equals(searchVo.getType())) {
//部门&&收入归属权限
iPage = baseMapper.selectDeptVO(page, searchVo.getName());
} else { } else {
//项目权限 //项目权限
if (CommonConstants.ONE_STRING.equals(user.getId())) { if (CommonConstants.ONE_STRING.equals(user.getId())) {
......
...@@ -195,6 +195,16 @@ ...@@ -195,6 +195,16 @@
</if> </if>
</select> </select>
<select id="selectDeptVO" resultMap="nameAndCodeMap">
SELECT
a.fd_no code,a.fd_name name
from sys_org_element a
where a.fd_is_available = '1' and fd_org_type = 2
<if test="name != null and name.trim() != ''">
AND (a.fd_no like concat('%',#{name},'%') or a.fd_name like concat('%',#{name},'%'))
</if>
</select>
<select id="selectDictByType" resultMap="dictMap"> <select id="selectDictByType" resultMap="dictMap">
SELECT SELECT
a.dict_id as id,a.name a.dict_id as id,a.name
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment