Search in sources :

Example 1 with SysRolesJurisdictionInfoPK

use of tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfoPK in project danyuan-application by 514840279.

the class SysMenuServiceImpl method findzTreeRole.

@Override
public List<AuthorityzTreeVO> findzTreeRole(String id, String roleUuid) {
    List<AuthorityzTreeVO> list = null;
    List<SysMenuInfo> listt = sysMenuDao.findAllByParentsIdOrderByF_SortCode(id);
    if (listt != null && listt.size() > 0) {
        list = new ArrayList<>();
        for (SysMenuInfo sysMenuInfo : listt) {
            AuthorityzTreeVO vo = new AuthorityzTreeVO();
            vo.setId(sysMenuInfo.getUuid());
            vo.setName(sysMenuInfo.getName());
            vo.setIcon(sysMenuInfo.getIcon());
            vo.setUrl(sysMenuInfo.getUri());
            SysRolesJurisdictionInfo jurisdiction = new SysRolesJurisdictionInfo();
            SysRolesJurisdictionInfoPK pk = new SysRolesJurisdictionInfoPK(sysMenuInfo.getUuid(), roleUuid);
            jurisdiction = sysRolesJurisdictionDao.findById(SysRolesJurisdictionInfo.class, pk);
            if (jurisdiction != null) {
                vo.setChecked(jurisdiction.getChecked());
            }
            List<AuthorityzTreeVO> listt1 = findzTreeRole(sysMenuInfo.getUuid(), roleUuid);
            if (listt1 != null) {
                vo.getChildren().addAll(listt1);
            }
            list.add(vo);
        }
    }
    return list;
}
Also used : AuthorityzTreeVO(tk.ainiyue.danyuan.application.softm.sysmenu.vo.AuthorityzTreeVO) SysRolesJurisdictionInfo(tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfo) SysRolesJurisdictionInfoPK(tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfoPK) SysMenuInfo(tk.ainiyue.danyuan.application.softm.sysmenu.po.SysMenuInfo)

Aggregations

SysRolesJurisdictionInfo (tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfo)1 SysRolesJurisdictionInfoPK (tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfoPK)1 SysMenuInfo (tk.ainiyue.danyuan.application.softm.sysmenu.po.SysMenuInfo)1 AuthorityzTreeVO (tk.ainiyue.danyuan.application.softm.sysmenu.vo.AuthorityzTreeVO)1