Browse Source

大屏每小时更新全部数据

qin 1 year ago
parent
commit
dac2758b00

+ 3 - 1
src/main/java/com/poteviohealth/cgp/statistics/service/impl/OrderServiceImpl.java

@@ -978,7 +978,9 @@ public class OrderServiceImpl extends BaseServiceImpl<OrderMapper, Order> implem
                         String[] typeIds = key.split(",");
                         String[] names = customerType.split(",");
                         for (int i=0; i<typeIds.length; i++){
-                            mergeJsonFace(faceMap, typeIds[i], idList, names[i]);
+                            if(StringUtils.isNotEmpty(typeIds[i])){
+                                mergeJsonFace(faceMap, typeIds[i], idList, names[i]);
+                            }
                         }
                     }else{
                         mergeJsonFace(faceMap, key, idList, customerType);

+ 2 - 2
src/main/resources/mapper/statistics/OrderMapper.xml

@@ -110,7 +110,7 @@
             c.now_street_id as nowStreetId,
             c.now_street_name as nowStreetName,
             c.customer_sign_id as customerSignId,
-            CONCAT(',',CONCAT_WS( ',', cs.customer_type_id ),',') as customerTypeId,
+            CONCAT_WS( ',', cs.customer_type_id ) as customerTypeId,
             CONCAT_WS(',',cs.customer_type) as customerType,
             c.age as age,
             c.sex as sex,
@@ -134,7 +134,7 @@
             IFNULL(c.now_country_id,-1) AS countryId,
             IFNULL(c.now_street_id,-1) AS streetId,
             count(DISTINCT c.customer_id) as customerNum,
-            CONCAT_WS(',',csp.customer_type_id) as customerTypeId
+            CONCAT(',',CONCAT_WS( ',', csp.customer_type_id ),',') as customerTypeId
         FROM
             ${dbName}_customer.c_customer_subsidy_${operatorId} c
                 join (select subsidy_customer_id,customer_type_id from  ${dbName}_customer.c_customer_subsidy_supplier_${operatorId} where yn =0 and enabled = 1 group by subsidy_customer_id) csp