메뉴 권한 관리 중간저장.
parent
37616477ae
commit
b2cedd163f
|
|
@ -28,8 +28,8 @@ function MenuAuthMgt(props) {
|
|||
// 리스트 항목 구성
|
||||
menuList.forEach(function (item, index) {
|
||||
const checkboxs = [];
|
||||
roleList.forEach(function (item, index) {
|
||||
checkboxs.push(<div><Form.Check /></div>)
|
||||
roleList.forEach(function (role) {
|
||||
checkboxs.push(<div><Form.Check checked={item.menuAuth.includes(role.itemCd)}/></div>)
|
||||
});
|
||||
mutListTag.push(
|
||||
<div className={"list_item"} key={"userListDiv_"+index}>
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ public class AdminConfigController extends BaseController {
|
|||
public ResultVO getMenuAuthMgt(){
|
||||
ResultVO resultVO = new ResultVO();
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
resultMap.put("menuList", adminConfigService.selectMenuList());
|
||||
resultMap.put("menuList", adminConfigService.selectMenuAuthList());
|
||||
resultMap.put("roleList", commonCodeService.selectCodeItemList("ROLE"));
|
||||
resultVO.setResult(resultMap);
|
||||
return resultVO;
|
||||
|
|
|
|||
|
|
@ -55,4 +55,7 @@ public class TcMenu {
|
|||
|
||||
@Transient
|
||||
private String menuTypeValue;
|
||||
|
||||
@Transient
|
||||
private String menuAuth;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ public interface TcMenuMapper {
|
|||
|
||||
List<TcMenu> selectMenuList();
|
||||
|
||||
List<TcMenu> selectMenuAuthList();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,4 +140,8 @@ public class AdminConfigService extends EgovAbstractServiceImpl {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public List<TcMenu> selectMenuAuthList(){
|
||||
return menuMapper.selectMenuAuthList();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,4 +24,21 @@
|
|||
order by menu_id asc
|
||||
</select>
|
||||
|
||||
<select id="selectMenuAuthList" resultType="TcMenu">
|
||||
select a.menu_id ,
|
||||
a.menu_title ,
|
||||
a.menu_group ,
|
||||
coalesce(b.role_cd, '') as menu_auth
|
||||
from tc_menu a
|
||||
left outer join (
|
||||
select menu_id , string_agg(role_id, ',') as role_cd
|
||||
from (
|
||||
select distinct *
|
||||
from tb_menu_role
|
||||
) aa
|
||||
group by menu_id
|
||||
) b on a.menu_id = b.menu_id
|
||||
where a.use_yn = 'Y'
|
||||
order by a.menu_id asc
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue