| | |
| | | import com.sinata.modular.mall.service.ICommissionSettlementMonthService; |
| | | import com.sinata.modular.member.model.MemUser; |
| | | import com.sinata.modular.member.service.IMemUserService; |
| | | import com.sinata.modular.system.model.Role; |
| | | import com.sinata.modular.system.service.IRoleService; |
| | | import java.util.stream.Collectors; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | @Autowired |
| | | private ICommissionSettlementMonthService commissionSettlementMonthService; |
| | | |
| | | @Autowired |
| | | private IRoleService roleService; |
| | | |
| | | /** |
| | | * 跳转到佣金结算明细首页 |
| | |
| | | try { |
| | | // 【城市管理员】数据查询 |
| | | ShiroUser shiroUser = ShiroKit.getUser(); |
| | | if (shiroUser.getRoleList().contains(EnumCityRole.PROVINCE_ROLE.index)) { |
| | | // 省级城市管理员 |
| | | cityCode = shiroUser.getCityCode().substring(0, 2); |
| | | } else if (shiroUser.getRoleList().contains(EnumCityRole.CITY_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.CITY_ROLE.index)) { |
| | | // 市级城市管理员 |
| | | cityCode = shiroUser.getCityCode().substring(0, 4); |
| | | } |
| | | else if (cityRoleList.contains(EnumCityRole.PROVINCE_ROLE.index)) { |
| | | // 省级城市管理员 |
| | | cityCode = shiroUser.getCityCode().substring(0, 2); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |