Sfoglia il codice sorgente

# Conflicts:
# suishenbang-system/src/main/resources/mapper/system/MetaHanaDeliverSignMapper.xml

yousongbo 1 mese fa
parent
commit
69a143f0eb

+ 16 - 5
suishenbang-system/src/main/resources/mapper/system/MetaHanaDeliverSignMapper.xml

@@ -218,11 +218,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </insert>
 
     <update id="updateCertificationSync" >
-        UPDATE customers_ext set is_authentication ='1' WHERE chains_code in (
-        SELECT chains_code FROM customers_ext WHERE chains_code in (
-        SELECT t2.customer_code FROM customers_ext t1 LEFT JOIN meta_relation_ship_diy t2
-        on  t1.chains_code = t2.main_customer_code
-        WHERE t1.is_authentication = '1' ) and is_authentication != '1')
+        UPDATE customers_ext
+        SET is_authentication = '1'
+        WHERE chains_code IN (
+            SELECT * FROM (
+                              SELECT chains_code
+                              FROM customers_ext
+                              WHERE chains_code IN (
+                                  SELECT t2.customer_code
+                                  FROM customers_ext t1
+                                           LEFT JOIN meta_relation_ship_diy t2
+                                                     ON t1.chains_code = t2.main_customer_code
+                                  WHERE t1.is_authentication = '1'
+                              )
+                                AND is_authentication != '1'
+                          ) AS temp_table
+        )
     </update>