FengChaoYu 5 meses atrás
pai
commit
f44e15a337

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/commonmapper/CommonMapper.java

@@ -731,5 +731,5 @@ public interface CommonMapper {
 
     List<String> selectMainContractIdByValidDate(@Param("companyId") String companyWechatId, @Param("onDate") Date validDate);
 
-    IPage<WorkerTeamVO> workerTeamPage(Page page, @Param("ex") ZfireParamBean zfireParamBean);
+    IPage<WorkerTeamVO> workerTeamPage(Page page, @Param("ex") ZfireParamBean zfireParamBean, @Param("workerId") String workerId);
 }

+ 3 - 3
mall-server-api/src/main/java/com/gree/mall/manager/controller/worker/WorkerTeamController.java

@@ -9,7 +9,7 @@ import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.helper.ResponseHelper;
 import com.gree.mall.manager.logic.worker.WorkerTeamLogic;
 import com.gree.mall.manager.plus.entity.WorkerTeam;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.bean.WorkerTeamParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -35,7 +35,7 @@ public class WorkerTeamController {
     @ZfireList
     @PostMapping("/list")
     @ApiOperation(value = "列表")
-    public ResponseHelper<IPage<WorkerTeamVO>> list(@RequestBody ZfireParamBean zfireParamBean) {
+    public ResponseHelper<IPage<WorkerTeamVO>> list(@RequestBody WorkerTeamParamBean zfireParamBean) {
         IPage<WorkerTeamVO> list = workerTeamLogic.list(zfireParamBean);
         return ResponseHelper.success(list, new TypeReference<WorkerTeamVO>() {
         });
@@ -43,7 +43,7 @@ public class WorkerTeamController {
 
     @PostMapping("/list/export")
     @ApiOperation(value = "导出")
-    public void listExport(@RequestBody ZfireParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
+    public void listExport(@RequestBody WorkerTeamParamBean zfireParamBean, HttpServletRequest request, HttpServletResponse response) throws Exception {
         //2.查询要导出的内容
         IPage<WorkerTeamVO> list = workerTeamLogic.list(zfireParamBean);
         //3.导出

+ 3 - 3
mall-server-api/src/main/java/com/gree/mall/manager/logic/worker/WorkerTeamLogic.java

@@ -19,7 +19,7 @@ import com.gree.mall.manager.plus.entity.WorkerTeamApply;
 import com.gree.mall.manager.plus.service.*;
 import com.gree.mall.manager.utils.CommonUtils;
 import com.gree.mall.manager.utils.excel.ExcelUtils;
-import com.gree.mall.manager.zfire.bean.ZfireParamBean;
+import com.gree.mall.manager.zfire.bean.WorkerTeamParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
@@ -47,10 +47,10 @@ public class WorkerTeamLogic {
     private final WorkerTeamApplyService workerTeamApplyService;
     private final UserWaitService userWaitService;
 
-    public IPage<WorkerTeamVO> list(ZfireParamBean zfireParamBean) {
+    public IPage<WorkerTeamVO> list(WorkerTeamParamBean zfireParamBean) {
         AdminUserCom adminUser = commonLogic.getAdminUser();
         FieldUtils.supplyParam(zfireParamBean, WorkerTeamVO.class, adminUser);
-        return commonMapper.workerTeamPage(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean);
+        return commonMapper.workerTeamPage(new Page(zfireParamBean.getPageNum(), zfireParamBean.getPageSize()), zfireParamBean, zfireParamBean.getWorkerId());
     }
 
     public void add(WorkerTeam workerTeam) {

+ 14 - 0
mall-server-api/src/main/java/com/gree/mall/manager/zfire/bean/WorkerTeamParamBean.java

@@ -0,0 +1,14 @@
+package com.gree.mall.manager.zfire.bean;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class WorkerTeamParamBean extends ZfireParamBean {
+
+    @ApiModelProperty(value = "师傅编号")
+    private String workerId;
+
+}

+ 3 - 0
mall-server-api/src/main/resources/mapper/CommonMapper.xml

@@ -1518,6 +1518,9 @@
             worker_team a
             LEFT JOIN admin_websit b ON a.websit_id = b.websit_id
         ${ex.query}
+        <if test="workerId != null and workerId != ''">
+            AND (a.master_worker_id = #{workerId} OR a.assistant_worker_id = #{workerId})
+        </if>
         <if test="ex.adminWebsitIds != null and ex.adminWebsitIds.size > 0">
             AND a.websit_id IN
             <foreach item="item" index="index" collection="ex.adminWebsitIds" open="(" separator="," close=")">