|
@@ -29,8 +29,10 @@
|
|
|
|
|
|
|
|
<!--年级统计-->
|
|
<!--年级统计-->
|
|
|
<select id="getClassTj" resultMap="Tj">
|
|
<select id="getClassTj" resultMap="Tj">
|
|
|
- select `name`, COUNT(*) as num from ( select IFNULL(b.`name`,'未知') `name` from `smart_user` a
|
|
|
|
|
- left join `smart_grade` b on a.`grade`=b.id ) c group by `name`
|
|
|
|
|
|
|
+ select `name`, COUNT(*) as num from ( select CONCAT(IFNULL(b.`name`,''),i.`name` ) `name` from `smart_user` a
|
|
|
|
|
+left join smart_identity i on i.deleted = 0 and i.id = a.identity_id
|
|
|
|
|
+left join `smart_grade` b on b.deleted = 0 and a.`grade`=b.id
|
|
|
|
|
+where a.deleted =0 and a.is_cancel = 0) c group by `name`
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<!--访客统计-->
|
|
<!--访客统计-->
|
|
@@ -97,9 +99,10 @@
|
|
|
|
|
|
|
|
<!--用户汇总学生-->
|
|
<!--用户汇总学生-->
|
|
|
<select id="getUserPage" resultMap="userPage">
|
|
<select id="getUserPage" resultMap="userPage">
|
|
|
- select a.id,a.sex_id as sexId,a.head_image as headImage, a.name,a.`card_no`,b.`name` as depart_ment from `smart_user` a
|
|
|
|
|
- left join `smart_department` b on a.`department_id`=b.id
|
|
|
|
|
- where a.`deleted`=0 and a.identity_id=#{identityId}
|
|
|
|
|
|
|
+ select a.id,a.sex_id as sexId,a.head_image as headImage, a.name,a.`card_no`,b.`name` as depart_ment from
|
|
|
|
|
+ `smart_user` a
|
|
|
|
|
+ left join `smart_department` b on a.`department_id`=b.id
|
|
|
|
|
+ where a.`deleted`=0 and a.identity_id=#{identityId}
|
|
|
<if test="key != null and key != ''">
|
|
<if test="key != null and key != ''">
|
|
|
and (a.name like '%' #{key} '%' or a.card_no like '%' #{key} '%')
|
|
and (a.name like '%' #{key} '%' or a.card_no like '%' #{key} '%')
|
|
|
</if>
|
|
</if>
|