| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.stylefeng.guns.core.base.tips.SuccessTip; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | @Autowired |
| | | private IDriverOnlineTimeService driverOnlineTimeService; |
| | | |
| | | @Autowired |
| | | private ShiroExtUtil shiroExtUtil; |
| | | |
| | | private Logger log = LoggerFactory.getLogger(this.getClass()); |
| | | @Override |
| | | public EntityWrapper<TDriver> getPageList(String createTime, String phone, Integer status) { |
| | |
| | | } |
| | | wrapper.orderBy(true,"approvalStatus"); |
| | | // 判断是否为代理商或者分公司 |
| | | if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 2){ |
| | | if(Objects.requireNonNull(shiroExtUtil.getUser()).getRoleType() == 2){ |
| | | // 分公司 |
| | | wrapper.eq("branchOfficeId",ShiroKit.getUser().getObjectId()); |
| | | wrapper.eq("branchOfficeId",shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 3){ |
| | | if(Objects.requireNonNull(shiroExtUtil.getUser()).getRoleType() == 3){ |
| | | // 代理商 |
| | | wrapper.eq("agentId",ShiroKit.getUser().getObjectId()); |
| | | wrapper.eq("agentId",shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | return wrapper; |
| | | } |
| | |
| | | } |
| | | wrapper.orderBy(true,"approvalStatus"); |
| | | // 判断是否为代理商或者分公司 |
| | | if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 2){ |
| | | if(Objects.requireNonNull(shiroExtUtil.getUser()).getRoleType() == 2){ |
| | | // 分公司 |
| | | wrapper.eq("branchOfficeId",ShiroKit.getUser().getObjectId()); |
| | | wrapper.eq("branchOfficeId",shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | if(Objects.requireNonNull(ShiroKit.getUser()).getRoleType() == 3){ |
| | | if(Objects.requireNonNull(shiroExtUtil.getUser()).getRoleType() == 3){ |
| | | // 代理商 |
| | | wrapper.eq("agentId",ShiroKit.getUser().getObjectId()); |
| | | wrapper.eq("agentId",shiroExtUtil.getUser().getObjectId()); |
| | | } |
| | | return wrapper; |
| | | } |