|
|
|
|
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Assert; |
|
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
|
import com.biutag.exception.BusinessException; |
|
|
|
|
import com.biutag.lan.config.AdminThreadLocal; |
|
|
|
|
import com.biutag.lan.service.IPermService; |
|
|
|
|
import com.biutag.lan.service.IRoleService; |
|
|
|
|
import com.biutag.lan.domain.validate.commons.PageValidate; |
|
|
|
|
@ -50,14 +51,13 @@ public class RoleServiceImpl implements IRoleService {
|
|
|
|
|
@Override |
|
|
|
|
public List<RoleVo> all() { |
|
|
|
|
QueryWrapper<Role> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.select("id,name,sort,is_disable,create_time,update_time"); |
|
|
|
|
queryWrapper.select("id,name,sort,is_disable,create_time,update_time").ge("id", AdminThreadLocal.getRoleId()); |
|
|
|
|
queryWrapper.orderByDesc(Arrays.asList("sort", "id")); |
|
|
|
|
List<Role> Roles = roleMapper.selectList(queryWrapper); |
|
|
|
|
|
|
|
|
|
List<RoleVo> list = new ArrayList<>(); |
|
|
|
|
for (Role Role : Roles) { |
|
|
|
|
RoleVo vo = new RoleVo(); |
|
|
|
|
|
|
|
|
|
vo.setId(Role.getId()); |
|
|
|
|
vo.setName(Role.getName()); |
|
|
|
|
vo.setSort(Role.getSort()); |
|
|
|
|
@ -69,7 +69,6 @@ public class RoleServiceImpl implements IRoleService {
|
|
|
|
|
vo.setMenus(Collections.EMPTY_LIST); |
|
|
|
|
list.add(vo); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return list; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|