Browse Source

Merge remote-tracking branch 'origin/master' into test

Michael 8 years ago
parent
commit
9fe8a8d94d
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/main/java/com/goafanti/common/mapper/AdminMapper.xml

+ 4 - 3
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -435,9 +435,9 @@
   </select>
   <select id = "selectAdminCount" parameterType="java.lang.String" resultType="java.lang.Integer">
    	select count(t.counts) 
-   	from(select id,count(*) counts from admin a
+   	from(select a.id counts from (select a.id  from admin a
    	left join user_role ur on a.id=ur.uid
-    where id <![CDATA[ <> ]]> '1'
+    where a.id <![CDATA[ <> ]]> '1'
     and (a.status != '注销' or a.status is null)
     <if test = "name != null"> 
     	and a.name = #{name,jdbcType=VARCHAR}
@@ -463,7 +463,8 @@
     <if test = "superiorId != null"> 
    		and a.superior_id = #{superiorId,jdbcType=VARCHAR}
     </if>
-    group by a.mobile)t
+    )a
+    group by a.id)t
   </select>
   <insert id="insertn" parameterType="com.goafanti.common.model.Admin" >
     insert into admin (id, mobile, name,