liuxm
2024-05-16 1494d3e47a0dbdc5f49dacd779b5ffab871a2022
添加查询所有角色
4个文件已修改
30 ■■■■■ 已修改文件
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaRoleMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaRoleMapper.java
@@ -42,4 +42,6 @@
    Long selectSomeCount(Map<String, Object> params);
    List<BaRole> selectSome(Map<String, Object> params);
    List<BaRole> selectAll();
}
pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml
@@ -167,4 +167,11 @@
      </if>
    </trim>
  </select>
  <select id="selectAll" resultType="com.dy.pmsGlobal.pojoBa.BaRole">
    select
    <include refid="Base_Column_List" />
    from ba_role
    where deleted != 1 and disabled !=1
  </select>
</mapper>
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java
@@ -121,6 +121,23 @@
    }
    /**
     * 查询所有角色
     * @return
     */
    @GetMapping(path="all")
    @SsoPowerAop(power = "10100010") //登录与权限同时验证
    @Log("查询所有角色")
    public BaseResponse<List<BaRole>> all(String id){
        try{
            List<BaRole> roles=roleSv.selectAll();
            return BaseResponseUtils.buildSuccess(roles);
        }catch (Exception e){
            log.error("查询所有角色异常", e);
            return BaseResponseUtils.buildException(e.getMessage());
        }
    }
    /**
     * 查询角色信息
     * @param vo
     * @return
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java
@@ -93,6 +93,10 @@
        return dao.selectByPrimaryKey(Long.valueOf(roleId));
    }
    public List<BaRole> selectAll() {
        return dao.selectAll();
    }
    /**
     * 获取角色列表
     */