|  |  |  | 
|---|
|  |  |  | import com.matrix.biz.dao.BizUserDao; | 
|---|
|  |  |  | import com.matrix.component.redis.RedisUserLoginUtils; | 
|---|
|  |  |  | import com.matrix.core.pojo.AjaxResult; | 
|---|
|  |  |  | import com.matrix.core.pojo.BasePageQueryDto; | 
|---|
|  |  |  | import com.matrix.core.tools.StringUtils; | 
|---|
|  |  |  | import com.matrix.system.common.dao.BusParameterSettingsDao; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao; | 
|---|
|  |  |  | import com.matrix.system.fenxiao.service.ShopSalesmanApplyService; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.vo.SalesmanVo; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.api.dto.SaleOrderDto; | 
|---|
|  |  |  | import com.matrix.system.shopXcx.vo.SalesOrderVo; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import io.swagger.annotations.ApiResponse; | 
|---|
|  |  |  | import io.swagger.annotations.ApiResponses; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.validation.annotation.Validated; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.PostMapping; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestBody; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.RequestMapping; | 
|---|
|  |  |  | 
|---|
|  |  |  | private ShopSalesmanOrderDao shopSalesmanOrderDao; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation(value = "获取下级列表", notes = "keywords=1 推广订单,keywords=2 邀请订单") | 
|---|
|  |  |  | @ApiOperation(value = "获取推广订单", notes = "") | 
|---|
|  |  |  | @PostMapping(value = "/getOrderList") | 
|---|
|  |  |  | @ApiResponses({ | 
|---|
|  |  |  | @ApiResponse(code = 200, message = "ok", response = SalesmanVo.class) | 
|---|
|  |  |  | @ApiResponse(code = 200, message = "ok", response = SalesOrderVo.class) | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | AjaxResult getInvitationuserList(@RequestBody BasePageQueryDto pageDto) { | 
|---|
|  |  |  | AjaxResult getInvitationuserList(@RequestBody @Validated SaleOrderDto saleOrderDto) { | 
|---|
|  |  |  | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); | 
|---|
|  |  |  | Page<SalesmanVo> page=new Page<>(pageDto.getPageNum(),pageDto.getPageSize()); | 
|---|
|  |  |  | IPage<SalesmanVo> shopSalesmanApplyIPage = salesmanApplyDao.selectInvitationuserInPage(page, loginUser.getOpenId(),pageDto.getKeywords()); | 
|---|
|  |  |  | Page<SalesOrderVo> page=new Page<>(saleOrderDto.getPageNum(),saleOrderDto.getPageSize()); | 
|---|
|  |  |  | if(StringUtils.isBlank(saleOrderDto.getSort())){ | 
|---|
|  |  |  | saleOrderDto.setSort("create_time"); | 
|---|
|  |  |  | saleOrderDto.setOrder("desc"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | saleOrderDto.setUserId(loginUser.getOpenId()); | 
|---|
|  |  |  | IPage<SalesOrderVo> shopSalesmanApplyIPage = shopSalesmanOrderDao.selectSalesManOrder(page,  saleOrderDto); | 
|---|
|  |  |  | AjaxResult result=AjaxResult.buildSuccessInstance(shopSalesmanApplyIPage.getRecords()); | 
|---|
|  |  |  | return result; | 
|---|
|  |  |  | } | 
|---|