use of tk.ainiyue.danyuan.application.softm.sysmenu.po.SysMenuInfo in project danyuan-application by 514840279.
the class SysMenuServiceImpl method findzTreeByUser.
@Override
public List<AuthorityzTreeVO> findzTreeByUser(String id, String userName) {
List<AuthorityzTreeVO> list = null;
List<SysMenuInfo> listt = sysMenuDao.findzTreeByUser(id, userName);
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());
List<AuthorityzTreeVO> listt1 = findzTreeByUser(sysMenuInfo.getUuid(), userName);
if (listt1 != null) {
vo.getChildren().addAll(listt1);
}
list.add(vo);
}
}
return list;
}
use of tk.ainiyue.danyuan.application.softm.sysmenu.po.SysMenuInfo in project danyuan-application by 514840279.
the class SysMenuServiceImpl method findAllBySearchText.
/**
* 方法名 : findAllBySearchText
* 功 能 : TODO(这里用一句话描述这个方法的作用)
* 参 数 : @param pageNumber
* 参 数 : @param pageSize
* 参 数 : @param info
* 参 数 : @return
* 参 考 : @see
* tk.ainiyue.danyuan.application.softm.sysmenu.service.SysMenuService#findAllBySearchText(int,
* int, tk.ainiyue.danyuan.application.softm.sysmenu.po.SysMenuInfo)
* 作 者 : Administrator
*/
@Override
public Page<SysMenuInfo> findAllBySearchText(int pageNumber, int pageSize, SysMenuInfo info) {
Example<SysMenuInfo> example = Example.of(info);
Sort sort = new Sort(new Order(Direction.DESC, "insertDatetime"));
PageRequest request = new PageRequest(pageNumber - 1, pageSize, sort);
Page<SysMenuInfo> sourceCodes = sysMenuDao.findAll(example, request);
return sourceCodes;
}
use of tk.ainiyue.danyuan.application.softm.sysmenu.po.SysMenuInfo 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.softm.sysmenu.po.SysMenuInfo in project danyuan-application by 514840279.
the class SysMenuServiceImpl method onDropAuthority.
/**
* 方法名 : onDropAuthority
* 功 能 : TODO(这里用一句话描述这个方法的作用)
* 参 数 : @param authorityzTreeVO
* 参 数 : @return
* 参 考 : @see
* tk.ainiyue.danyuan.application.authority.service.AuthorityService#onDropAuthority(tk.ainiyue.danyuan.application.authority.vo.AuthorityzTreeVO)
* 作 者 : wang
*/
@Override
public AuthorityzTreeVO onDropAuthority(SysMenuInfo sysMenuInfo) {
String[] str = sysMenuInfo.getUuid().split(",");
if ("inner".equals(sysMenuInfo.getMoveType())) {
List<SysMenuInfo> list = sysMenuDao.getSize(sysMenuInfo.getParentsId());
int num = list.size();
for (String string : str) {
sysMenuDao.updateSysMenuInfoName(sysMenuInfo.getParentsId(), num++, string);
}
} else {
SysMenuInfo temp = sysMenuDao.getParentId(sysMenuInfo.getParentsId() == null ? "0" : sysMenuInfo.getParentsId());
List<SysMenuInfo> list = sysMenuDao.findAllByParentsIdOrderByF_SortCode(temp.getParentsId());
int num = 0;
for (int i = 0; i < list.size(); i++) {
for (String string : str) {
if (string.equals(list.get(i).getUuid())) {
list.remove(i);
i--;
}
}
}
if ("prev".equals(sysMenuInfo.getMoveType())) {
for (SysMenuInfo sysMenuInfo2 : list) {
if (temp.getUuid().equals(sysMenuInfo2.getUuid())) {
for (String string : str) {
sysMenuDao.updateSysMenuInfoName(temp.getParentsId(), num++, string);
}
}
sysMenuDao.updateSysMenuInfoName(temp.getParentsId(), num++, sysMenuInfo2.getUuid());
}
} else if ("next".equals(sysMenuInfo.getMoveType())) {
for (SysMenuInfo authority2 : list) {
sysMenuDao.updateSysMenuInfoName(temp.getParentsId(), num++, authority2.getUuid());
if (temp.getUuid().equals(authority2.getUuid())) {
for (String string : str) {
sysMenuDao.updateSysMenuInfoName(temp.getParentsId(), num++, string);
}
}
}
}
}
return new AuthorityzTreeVO();
}
use of tk.ainiyue.danyuan.application.softm.sysmenu.po.SysMenuInfo in project danyuan-application by 514840279.
the class SysMenuServiceImpl method findzTreeByF_ParentId.
/**
* 方法名 : findzTreeByF_ParentId
* 功 能 : TODO(这里用一句话描述这个方法的作用)
* 参 数 : @param string
* 参 数 : @return
* 参 考 : @see
* tk.ainiyue.danyuan.application.authority.service.AuthorityService#findzTreeByF_ParentId(java.lang.String)
* 作 者 : wang
*/
@Override
public List<AuthorityzTreeVO> findzTreeByF_ParentId(String id) {
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());
List<AuthorityzTreeVO> listt1 = findzTreeByF_ParentId(sysMenuInfo.getUuid());
if (listt1 != null) {
vo.getChildren().addAll(listt1);
}
list.add(vo);
}
}
return list;
}
Aggregations