|
|
@@ -82,11 +82,125 @@
|
|
|
|
|
|
<delete id="batchDeleteByPrimaryKey" parameterType="java.util.List">
|
|
|
delete
|
|
|
- from activity_user
|
|
|
+ from lecture_user
|
|
|
where id in
|
|
|
<foreach item="item" index="index" collection="list" open="("
|
|
|
separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
+
|
|
|
+ <select id="findLectureUserListByPage" parameterType="String" resultType="com.goafanti.LectureUser.bo.LectureUserListBo">
|
|
|
+ select
|
|
|
+ lu.lid,
|
|
|
+ lu.uid,
|
|
|
+ lu.create_time as createTime,
|
|
|
+ lu.last_update_time as lastUpdateTime,
|
|
|
+ l.name as lectureName,
|
|
|
+ u.number,
|
|
|
+ u.mobile,
|
|
|
+ ui.username,
|
|
|
+ l.lecture_time as lectureTime,
|
|
|
+ l.end_time as endTime
|
|
|
+ from lecture_user lu
|
|
|
+ left join user u on u.id = lu.uid
|
|
|
+ left join user_identity ui on ui.uid = lu.uid
|
|
|
+ left join lecture l on l.id = lu.lid
|
|
|
+ where u.type = 0
|
|
|
+ <if test="mobile != null">
|
|
|
+ and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="number != null">
|
|
|
+ and u.number = #{number,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="lectureName != null">
|
|
|
+ and l.name like CONCAT('%',#{lectureName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="username != null">
|
|
|
+ and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ order by lu.lecture_time desc
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findLectureUserCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(1)
|
|
|
+ from lecture_user lu
|
|
|
+ left join user u on u.id = lu.uid
|
|
|
+ left join user_identity ui on ui.uid = lu.uid
|
|
|
+ left join lecture l on l.id = lu.lid
|
|
|
+ where u.type = 0
|
|
|
+ <if test="mobile != null">
|
|
|
+ and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="number != null">
|
|
|
+ and u.number = #{number,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="lectureName != null">
|
|
|
+ and l.name like CONCAT('%',#{lectureName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="username != null">
|
|
|
+ and ui.username like CONCAT('%',#{username,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findLectureOrgListByPage" parameterType="String" resultType="com.goafanti.LectureUser.bo.LectureUserListBo">
|
|
|
+ select
|
|
|
+ lu.lid,
|
|
|
+ lu.uid,
|
|
|
+ lu.create_time as createTime,
|
|
|
+ lu.last_update_time as lastUpdateTime,
|
|
|
+ l.name as lectureName,
|
|
|
+ u.number,
|
|
|
+ u.mobile,
|
|
|
+ oi.unit_name as unitName,
|
|
|
+ l.lecture_time as lectureTime,
|
|
|
+ l.end_time as endTime
|
|
|
+ from lecture_user lu
|
|
|
+ left join user u on u.id = lu.uid
|
|
|
+ left join organization_identity oi on oi.uid = lu.uid
|
|
|
+ left join lecture l on l.id = lu.lid
|
|
|
+ where u.type = 1
|
|
|
+ <if test="mobile != null">
|
|
|
+ and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="number != null">
|
|
|
+ and u.number = #{number,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="lectureName != null">
|
|
|
+ and l.name like CONCAT('%',#{lectureName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="unitName != null">
|
|
|
+ and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ order by lu.lecture_time desc
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findLectureOrgCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(1)
|
|
|
+ from lecture_user lu
|
|
|
+ left join user u on u.id = lu.uid
|
|
|
+ left join organization_identity oi on oi.uid = lu.uid
|
|
|
+ left join lecture l on l.id = lu.lid
|
|
|
+ where u.type = 1
|
|
|
+ <if test="mobile != null">
|
|
|
+ and u.mobile = #{mobile,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="number != null">
|
|
|
+ and u.number = #{number,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="activityName != null">
|
|
|
+ and l.name like CONCAT('%',#{lectureName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ <if test="unitName != null">
|
|
|
+ and oi.unit_name like CONCAT('%',#{unitName,jdbcType=VARCHAR},'%')
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|