shudonghui 1 year ago
parent
commit
ccdda17926
1 changed files with 3 additions and 1 deletions
  1. 3 1
      sop-business/src/main/resources/mapper/CrmAnalyseMapper.xml

+ 3 - 1
sop-business/src/main/resources/mapper/CrmAnalyseMapper.xml

@@ -31,6 +31,7 @@
         <!--        r.region_name-->
         <!--        order by count( c.id )-->
         SELECT
+        r.id,
         cu.province name,
         count( c.id ) count
         FROM
@@ -59,8 +60,9 @@
             </if>
         </where>
         GROUP BY
+        r.id,
         cu.province
-        order by count( c.id )
+        order by count( c.id ) desc
     </select>
     <select id="project" resultType="com.qmth.sop.business.bean.result.CrmAnalyseResult">
         SELECT