935090232@qq.com
2021-03-14 b0ee5ab18f8242d0ca81966c07db00e0c6274831
zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java
@@ -16,10 +16,14 @@
import com.matrix.system.fenxiao.dto.ExamineSaleManApplyDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto;
import com.matrix.system.fenxiao.entity.ShopSalesmanApply;
import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
import com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo;
import com.matrix.system.fenxiao.vo.ShopCustomDetailVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanDetailVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanGradeVo;
import com.matrix.system.hive.action.util.QueryUtil;
import io.swagger.annotations.ApiOperation;
@@ -40,6 +44,41 @@
    private ShopSalesmanApplyDao shopSalesmanApplyDao;
   @Autowired
   private BizUserDao bizUserDao;
   /**
     * 分销员详情页面信息
     */
    @ApiOperation(value = "分销员详情页面信息")
    @ApiResponses({
            @ApiResponse(code = 200, message = "OK",  response = ShopSalesmanDetailVo.class)
    })
    @PostMapping(value = "/findShopSalesmanDetail")
    public @ResponseBody
    AjaxResult findShopSalesmanDetail(@RequestBody ShopSalesmanDetailDto shopSalesmanDetailDto) {
       //设置用户公司ID
       QueryUtil.setQueryLimitCom(shopSalesmanDetailDto);
       AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
       //根据OPENID查询基础信息
       String userId = shopSalesmanDetailDto.getUserId();
       SalesmanBasicDetailVo salesmanBasicDetailVo = shopSalesmanApplyService.selectShopSalesmanDetailByOpenId(userId);
       result.putInMap("basicdetail", salesmanBasicDetailVo);
        //排序
        if(StringUtils.isBlank(shopSalesmanDetailDto.getSort())){
           shopSalesmanDetailDto.setSort("create_time");
           shopSalesmanDetailDto.setOrder("desc");
        }
        //查询绑定客户信息
        Page<ShopCustomDetailVo> page = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize());
        IPage<ShopCustomDetailVo> customDetailRows = shopSalesmanApplyService.findCustomDetail(page,shopSalesmanDetailDto);
        result.putInMap("customDetailRecords", customDetailRows.getRecords());
        result.putInMap("customDetailTotal", customDetailRows.getTotal());
        //查询邀请下级信息
        Page<ShopCustomDetailVo> pageLow = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize());
        IPage<ShopCustomDetailVo> customLowRows = shopSalesmanApplyService.findCustomLow(pageLow,shopSalesmanDetailDto);
        result.putInMap("customLowRecords", customLowRows.getRecords());
        result.putInMap("customLowTotal", customLowRows.getTotal());
        return result;
    }
   /**
     * 查询分销员审核记录