From bac68847daab669f5dfdc8220e6c82538eda3e66 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 12 Mar 2021 11:33:10 +0800
Subject: [PATCH] 分销员后台4
---
zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java | 53 +++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 39 insertions(+), 14 deletions(-)
diff --git a/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java b/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java
index 5538f6c..1aafb7c 100644
--- a/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/fenxiao/action/FenXiaoUserAction.java
@@ -2,19 +2,25 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.StringUtils;
+import com.matrix.core.tools.WebUtil;
+import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto;
import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto;
import com.matrix.system.fenxiao.service.ShopSalesmanApplyService;
import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo;
import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo;
+import com.matrix.system.fenxiao.vo.ShopSalesmanGradeVo;
import com.matrix.system.hive.action.util.QueryUtil;
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.web.bind.annotation.*;
+
+import java.util.List;
@RestController
@RequestMapping(value = "/fenXiao/fenXiaoUser")
@@ -41,23 +47,12 @@
shopSalesmanApplyDto.setOrder("desc");
}
-
Page<ShopSalesmanApplyVo> page = new Page(shopSalesmanApplyDto.getPageNum(), shopSalesmanApplyDto.getPageSize());
-
IPage<ShopSalesmanApplyVo> rows = shopSalesmanApplyService.findShopSalesmanApplyList(page,shopSalesmanApplyDto);
AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
return result;
}
-
- /**
- * 跳转 分销员待审核记录页面
- *
- @RequestMapping(value = "/shopSalesmanAppliing")
- public String shopSalesmanAppliing() {
- return "admin/fenxiao/fenxiao-apply";
- }
- */
/**
*获取分销员待审核记录
@@ -71,8 +66,6 @@
AjaxResult findShopSalesmanAppliingList(@RequestBody ShopSalesmanAppliingDto shopSalesmanAppliingDto) {
//设置用户公司ID
QueryUtil.setQueryLimitCom(shopSalesmanAppliingDto);
- //查询条件待审核状态
- shopSalesmanAppliingDto.setApplyStatus(1);
//排序
if(StringUtils.isBlank(shopSalesmanAppliingDto.getSort())){
shopSalesmanAppliingDto.setSort("create_time");
@@ -80,9 +73,41 @@
}
Page<ShopSalesmanAppliingVo> page = new Page(shopSalesmanAppliingDto.getPageNum(), shopSalesmanAppliingDto.getPageSize());
- IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto);
+ IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.selectBizUserApplyList(page,shopSalesmanAppliingDto);
+
+ //IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto);
AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal());
return result;
}
+ /**
+ *获取对应的分销员等级
+ */
+ @RequestMapping(value = "/getShopSalesmanGrade")
+ private @ResponseBody AjaxResult getShopSalesmanGradeVo(){
+ AjaxResult result= AjaxResult.buildSuccessInstance("查询成功");
+ SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+
+ List<ShopSalesmanGradeVo> dataList = shopSalesmanApplyService.getShopSalesmanGradeVo(user.getCompanyId());
+ result.putInMap("salesGrade", dataList);
+ return result;
+ }
+ /**
+ * 改变发布状态:已发布
+ * @param userId
+ *
+ */
+ @RequestMapping(value = "/addSaleManApply")
+ public @ResponseBody AjaxResult addSaleManApply(String userId,long gradeId) {
+ AjaxResult result= AjaxResult.buildSuccessInstance("设置成功");
+ SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
+ shopSalesmanApplyService.addSaleManApply(userId,gradeId);
+ return result;
+ }
+
+
+ public static void main(String[] args) {
+ System.out.println("===="+Long.parseLong(""));
+ }
+
}
--
Gitblit v1.9.1