| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/agent/company") |
| | | @Api(tags = "(经销商后台)公司信息") |
| | | @Api(tags = "(嘉视达经销商后台)公司信息") |
| | | @RequiredArgsConstructor(onConstructor_ = @Lazy) |
| | | public class AgentCompanyController extends BaseController { |
| | | |
| | |
| | | // 获取当前登录用户 |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | SysUser user = loginUser.getUser(); |
| | | if (!SecurityUtils.isAgentUser()) { |
| | | if (SecurityUtils.isAgentUser()) { |
| | | throw new ServiceException("请使用经销商/股东帐号访问"); |
| | | } |
| | | // 获取用户所属公司ID |
| | |
| | | @ApiOperation(value = "公司详情-管理人员列表") |
| | | @PostMapping(value = "/getCompanyUserList") |
| | | public R<Page<SysUser>> getCompanyUserList(@RequestBody BasePage pageReq) { |
| | | if (!SecurityUtils.isAgentUser()) { |
| | | if (SecurityUtils.isAgentUser()) { |
| | | throw new ServiceException("请使用经销商/股东帐号访问"); |
| | | } |
| | | // 获取当前登录用户 |
| | |
| | | @ApiOperation(value = "推广记录") |
| | | @PostMapping("/promotionPageList") |
| | | public R<Page<PromotionPageListVo>> promotionPageList(@RequestBody @Valid PromotionPageListQuery query) { |
| | | if (!SecurityUtils.isAgentUser()) { |
| | | if (SecurityUtils.isAgentUser()) { |
| | | throw new ServiceException("请使用经销商/股东帐号访问"); |
| | | } |
| | | Page<PromotionPageListVo> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | |
| | | @ApiOperation(value = "收益明细") |
| | | @PostMapping("/profitPageList") |
| | | public R<Page<ProfitPageListVo>> profitPageList(@RequestBody @Valid ProfitPageListQuery query) { |
| | | if (!SecurityUtils.isAgentUser()) { |
| | | if (SecurityUtils.isAgentUser()) { |
| | | throw new ServiceException("请使用经销商/股东帐号访问"); |
| | | } |
| | | Page<ProfitPageListVo> page = new Page<>(query.getPageNum(), query.getPageSize()); |