| | |
| | | import com.sinata.modular.member.model.MemUserRelation; |
| | | import com.sinata.modular.member.service.IMemUserRelationService; |
| | | import com.sinata.modular.member.service.IMemUserService; |
| | | import com.sinata.modular.system.model.Role; |
| | | import com.sinata.modular.system.model.SystemNotice; |
| | | import com.sinata.modular.system.model.TCityRegion; |
| | | import com.sinata.modular.system.service.IRoleService; |
| | | import com.sinata.modular.system.service.ISystemNoticeService; |
| | | import com.sinata.modular.system.service.ITCityRegionService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | |
| | | @Autowired |
| | | private ISystemNoticeService systemNoticeService; |
| | | |
| | | @Autowired |
| | | private IRoleService roleService; |
| | | |
| | | /** |
| | | * 跳转到会员用户信息首页 |
| | |
| | | try { |
| | | // 【城市管理员】数据查询 |
| | | ShiroUser shiroUser = ShiroKit.getUser(); |
| | | if (shiroUser.getRoleList().contains(EnumCityRole.PROVINCE_ROLE.index)) { |
| | | List<Integer> roleList = shiroUser.getRoleList(); |
| | | List<Integer> cityRoleList = roleService.selectList( |
| | | new EntityWrapper<Role>().in("id", roleList)).stream().map(Role::getCityRole) |
| | | .collect( |
| | | Collectors.toList()); |
| | | if (cityRoleList.contains(EnumCityRole.PROVINCE_ROLE.index)) { |
| | | // 省级城市管理员 |
| | | wrapper.like("o.city_code", shiroUser.getCityCode().substring(0, 2), SqlLike.RIGHT); |
| | | } else if (shiroUser.getRoleList().contains(EnumCityRole.CITY_ROLE.index)) { |
| | | } else if (cityRoleList.contains(EnumCityRole.CITY_ROLE.index)) { |
| | | // 市级城市管理员 |
| | | wrapper.like("o.city_code", shiroUser.getCityCode().substring(0, 4), SqlLike.RIGHT); |
| | | } |