Selaa lähdekoodia

Merge branch 'develop'

# Conflicts:
#	mall-server-api/src/main/resources/mapper/CommonMapper.xml
FengChaoYu 1 viikko sitten
vanhempi
commit
90ed340102

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

@@ -757,7 +757,7 @@ public interface CommonMapper {
 
     IPage<WorkerElecConfirmVO> workerSignConfirmPage(Page page, @Param("ex") ZfireParamBean zfireParamBean);
 
-    Integer workerSignConfirmCount();
+    Long workerSignConfirmCount();
 
     IPage<WorkerElecConfirmManualVO> workerSignConfirmManualPage(Page page, @Param("ex") ZfireParamBean zfireParamBean);
 

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

@@ -67,8 +67,8 @@ public class WorkerElecConfirmController {
 
     @PostMapping("/count")
     @ApiOperation("统计")
-    public ResponseHelper<Integer> count() throws RemoteServiceException {
-        Integer count = workerElecConfirmLogic.count();
+    public ResponseHelper<Long> count() throws RemoteServiceException {
+        Long count = workerElecConfirmLogic.count();
         return ResponseHelper.success(count);
     }
 

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

@@ -89,7 +89,7 @@ public class WorkerElecConfirmLogic {
         return vo;
     }
 
-    public Integer count() {
+    public Long count() {
         return commonMapper.workerSignConfirmCount();
     }
 

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

@@ -1685,21 +1685,15 @@
         ${ex.orderBy}
     </select>
     <select id="workerSignConfirmCount" resultType="java.lang.Integer">
-         FROM (
-            SELECT
-                IF(IFNULL(d.create_time, 1)=1, 1, 0) AS status
-            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.user_id = d.user_id
-            WHERE
-                a.examine_status IN ('OK', 'EXPIRED')
-              AND b.attr = 'SELF'
-            GROUP BY
-                b.belong_company_code,
-                a.user_id
-        )a WHERE a.status = 1
+        SELECT
+            COUNT(DISTINCT CONCAT( b.belong_company_code, '-', a.user_id )) AS total
+        FROM
+            websit_user a
+                INNER JOIN admin_websit b ON a.websit_id = b.websit_id AND b.attr = 'SELF'
+                LEFT JOIN worker_sign_confirm d ON b.belong_company_code = d.belong_company_code AND a.user_id = d.user_id
+        WHERE
+            a.examine_status IN ( 'OK', 'EXPIRED' )
+            AND d.create_time IS NULL
     </select>
     <select id="workerSignConfirmManualPage"
             resultType="com.gree.mall.manager.bean.worker.WorkerElecConfirmManualVO">