Parcourir la source

fixed bug in select cooperator

maqingyang il y a 11 mois
Parent
commit
8d8ba26ae6
1 fichiers modifiés avec 3 ajouts et 15 suppressions
  1. 3 15
      src/main/resources/mapper/CooperatorMapper.xml

+ 3 - 15
src/main/resources/mapper/CooperatorMapper.xml

@@ -73,21 +73,9 @@
     <select id="selectAll" resultType="com.kexun.entity.CooperatorInfo">
 
         SELECT *
-        FROM (
-            SELECT *
-            FROM (
-                SELECT *,row_number()
-                OVER (PARTITION BY cooperator_name ORDER BY cooperator_name DESC)num
-                FROM 	cooperator_info)A
-            WHERE A.num=1 AND is_deleted=0) AS coo
-        LEFT JOIN (
-            SELECT template_no
-            FROM field_template
-            WHERE is_deleted=0
-        ) tno
-        ON coo.template_no=tno.template_no
-        WHERE coo.is_deleted=0
-        ORDER BY coo.create_time DESC,coo.id DESC
+        FROM cooperator_info
+        WHERE is_deleted=0
+        ORDER BY create_time DESC,id DESC
 
 
     </select>