Browse Source

no message

FengChaoYu 3 months ago
parent
commit
a9d4fd498c

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

@@ -753,4 +753,6 @@ public interface CommonMapper {
 
     IPage<WorkerElecConfirmVO> workerSignConfirmPage(Page page,
                                                      @Param("ex") ZfireParamBean zfireParamBean);
+    @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
+    Integer workerSignConfirmCount();
 }

+ 7 - 0
mall-server-api/src/main/java/com/gree/mall/manager/controller/worker/WorkerElecConfirmController.java

@@ -55,4 +55,11 @@ public class WorkerElecConfirmController {
         WorkerElecConfirmVO detail = workerElecConfirmLogic.detail(workerNumber, belongCompanyCode);
         return ResponseHelper.success(detail);
     }
+
+    @PostMapping("/count")
+    @ApiOperation("详情")
+    public ResponseHelper<Integer> count() throws RemoteServiceException {
+        Integer count = workerElecConfirmLogic.count();
+        return ResponseHelper.success(count);
+    }
 }

+ 6 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/worker/WorkerElecConfirmLogic.java

@@ -12,6 +12,7 @@ import com.gree.mall.manager.plus.entity.User;
 import com.gree.mall.manager.plus.entity.WorkerSignConfirm;
 import com.gree.mall.manager.plus.service.SysDictCompanyService;
 import com.gree.mall.manager.plus.service.UserService;
+import com.gree.mall.manager.plus.service.WebsitUserService;
 import com.gree.mall.manager.plus.service.WorkerSignConfirmService;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
@@ -29,6 +30,7 @@ public class WorkerElecConfirmLogic {
     private final CommonLogic commonLogic;
     private final CommonMapper commonMapper;
     private final WorkerSignConfirmService workerSignConfirmService;
+    private final WebsitUserService websitUserService;
     private final UserService userService;
     private final SysDictCompanyService sysDictCompanyService;
 
@@ -79,4 +81,8 @@ public class WorkerElecConfirmLogic {
         vo.setUrl(Objects.isNull(confirm) ? null : confirm.getUrl());
         return vo;
     }
+
+    public Integer count() {
+        return commonMapper.workerSignConfirmCount();
+    }
 }

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

@@ -1684,6 +1684,21 @@
         </if>
         ${ex.orderBy}
     </select>
+    <select id="workerSignConfirmCount" resultType="java.lang.Integer">
+        SELECT
+            COUNT(IF(IFNULL(d.create_time, 1)=1, 1, 0))
+        FROM
+            websit_user a
+                LEFT JOIN admin_websit b ON a.websit_id = b.websit_id
+                LEFT JOIN `user` c ON a.user_id = c.user_id
+                LEFT JOIN worker_sign_confirm d ON b.belong_company_code = d.belong_company_code AND a.worker_number = d.worker_number
+        WHERE
+            a.examine_status IN ('OK', 'EXPIRED')
+          AND b.attr = 'SELF'
+        GROUP BY
+            b.belong_company_code,
+            a.worker_number
+    </select>
 
 
 </mapper>