use of tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfo 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;
}
use of tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfo in project danyuan-application by 514840279.
the class SysRolesJurisdictionController method save.
@ApiOperation(value = "修改角色权限信息", notes = "")
@RequestMapping(path = "/saveAll", method = RequestMethod.POST)
@ResponseBody
public String save(@RequestBody SysRolesJurisdictionVo vo) {
logger.info("saveAll", SysRolesJurisdictionController.class);
try {
for (SysRolesJurisdictionInfo info : vo.getSysRolesJurisdictionInfolist()) {
System.out.println(info.toString());
sysRolesJurisdictionService.save(info);
}
return "1";
} catch (Exception e) {
return "0";
}
}
use of tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfo in project danyuan-application by 514840279.
the class SysRolesJurisdictionServiceImpl method findAllBySearchText.
/**
* 方法名 : findAllBySearchText
* 功 能 : TODO(这里用一句话描述这个方法的作用)
* 参 数 : @param pageNumber
* 参 数 : @param pageSize
* 参 数 : @param info
* 参 数 : @return
* 参 考 : @see
* tk.ainiyue.danyuan.application.crm.jurisdiction.service.SysRolesJurisdictionService#findAllBySearchText(int,
* int,
* tk.ainiyue.danyuan.application.crm.jurisdiction.po.SysRolesJurisdictionInfo)
* 作 者 : Administrator
*/
@Override
public Page<SysRolesJurisdictionInfo> findAllBySearchText(int pageNumber, int pageSize, SysRolesJurisdictionInfo info) {
Example<SysRolesJurisdictionInfo> example = Example.of(info);
Sort sort = new Sort(new Order(Direction.DESC, "createTime"));
PageRequest request = new PageRequest(pageNumber - 1, pageSize, sort);
Page<SysRolesJurisdictionInfo> sourceCodes = sysRolesJurisdictionDao.findAll(example, request);
return sourceCodes;
}
Aggregations