zouxuan 1 年之前
父節點
當前提交
5da51cfe7b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantPersonStatMapper.xml

+ 1 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/TenantPersonStatMapper.xml

@@ -14,7 +14,7 @@
         </sql> 
     
     <select id="init" resultType="com.yonge.cooleshow.biz.dal.entity.TenantPersonStat">
-        select ti.id_ tenantId,COUNT(s.user_id_) studentNum,COUNT(t.user_id_) teacherNum from tenant_info ti
+        select ti.id_ tenantId,COUNT(distinct s.user_id_) studentNum,COUNT(distinct t.user_id_) teacherNum from tenant_info ti
         left join student s ON s.tenant_id_ = ti.id_ AND s.lock_flag_ = 0
         left join teacher t ON t.tenant_id_ = ti.id_ AND t.lock_flag_ = 0
         group by ti.id_