|
@@ -46,6 +46,7 @@
|
|
|
<result column="state_" jdbcType="INTEGER" property="state"/>
|
|
|
<result column="logo_" jdbcType="VARCHAR" property="logo"/>
|
|
|
<result column="real_name_" jdbcType="VARCHAR" property="createdName"/>
|
|
|
+ <result column="studentCount" jdbcType="INTEGER" property="studentCount"/>
|
|
|
<!-- 机构产品信息-->
|
|
|
<result column="serve_name_" jdbcType="VARCHAR" property="serveName"/>
|
|
|
<result column="student_up_limit_" jdbcType="INTEGER" property="studentUpLimit"/>
|
|
@@ -63,12 +64,15 @@
|
|
|
u.`real_name_`,
|
|
|
c.`name_` AS serve_name_,
|
|
|
d.`student_up_limit_`,
|
|
|
- b.`expiry_date_`
|
|
|
+ b.`expiry_date_`,
|
|
|
+ ifnull(st.studentCount, 0) as studentCount
|
|
|
FROM tenant_info AS a
|
|
|
LEFT JOIN tenant_product_info AS b ON a.`id_` = b.`tenant_id_` and b.using_ = 0
|
|
|
LEFT JOIN platform_serve AS c ON b.`serve_id_` = c.`id_`
|
|
|
LEFT JOIN platform_serve_detail AS d ON b.`serve_detail_id_` = d.`id_` AND c.`id_` = d.`serve_id_`
|
|
|
LEFT JOIN sys_user AS u ON a.`created_by_` = u.`id_`
|
|
|
+ LEFT JOIN (select tenant_id_, count(tenant_id_) as studentCount from student group by tenant_id_) as st
|
|
|
+ on a.id_ = st.tenant_id_
|
|
|
<where>
|
|
|
<if test="param.search != null ">
|
|
|
AND (
|