|
@@ -11,6 +11,8 @@
|
|
<result column="student_school_" jdbcType="VARCHAR" property="studentSchool"/>
|
|
<result column="student_school_" jdbcType="VARCHAR" property="studentSchool"/>
|
|
<result column="employee_id_" jdbcType="INTEGER" property="employeeId"/>
|
|
<result column="employee_id_" jdbcType="INTEGER" property="employeeId"/>
|
|
<result column="employee_name_" jdbcType="VARCHAR" property="employeeName"/>
|
|
<result column="employee_name_" jdbcType="VARCHAR" property="employeeName"/>
|
|
|
|
+ <result column="employee_phone_" jdbcType="VARCHAR" property="employeePhone"/>
|
|
|
|
+ <result column="employee_address_" jdbcType="VARCHAR" property="employeeAddress"/>
|
|
<result column="subject_id_" jdbcType="INTEGER" property="subjectId"/>
|
|
<result column="subject_id_" jdbcType="INTEGER" property="subjectId"/>
|
|
<result column="subject_name_" jdbcType="VARCHAR" property="subjectName"/>
|
|
<result column="subject_name_" jdbcType="VARCHAR" property="subjectName"/>
|
|
<result column="type_" jdbcType="INTEGER" property="type"/>
|
|
<result column="type_" jdbcType="INTEGER" property="type"/>
|
|
@@ -29,9 +31,7 @@
|
|
</resultMap>
|
|
</resultMap>
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
<select id="get" resultMap="StudentRepair">
|
|
<select id="get" resultMap="StudentRepair">
|
|
- SELECT *
|
|
|
|
- FROM school
|
|
|
|
- WHERE id_ = #{id}
|
|
|
|
|
|
+ SELECT * FROM student_repair WHERE id_=#{id}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentRepair" useGeneratedKeys="true" keyColumn="id"
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentRepair" useGeneratedKeys="true" keyColumn="id"
|
|
@@ -126,7 +126,7 @@
|
|
</update>
|
|
</update>
|
|
|
|
|
|
<select id="getStudents" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.BasicUserDto">
|
|
<select id="getStudents" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.BasicUserDto">
|
|
- SELECT username_ ,id_ user_id_,avatar_ head_url_,gender_
|
|
|
|
|
|
+ SELECT username_ ,id_ user_id_,avatar_ head_url_,gender_,phone_
|
|
FROM sys_user
|
|
FROM sys_user
|
|
WHERE FIND_IN_SET(organ_id_,#{organIdList})
|
|
WHERE FIND_IN_SET(organ_id_,#{organIdList})
|
|
AND user_type_ LIKE '%STUDENT%'
|
|
AND user_type_ LIKE '%STUDENT%'
|
|
@@ -211,4 +211,26 @@
|
|
AND mg.status_='PROGRESS'
|
|
AND mg.status_='PROGRESS'
|
|
ORDER BY id_ DESC
|
|
ORDER BY id_ DESC
|
|
</select>
|
|
</select>
|
|
|
|
+ <select id="getStudentInfo" resultMap="com.ym.mec.biz.dal.dao.MusicGroupDao.BasicUserDto">
|
|
|
|
+ SELECT su.username_,
|
|
|
|
+ su.id_ user_id_,
|
|
|
|
+ su.avatar_ head_url_,
|
|
|
|
+ su.gender_,
|
|
|
|
+ mg.id_ music_group_id_,
|
|
|
|
+ mg.name_ music_group_name_,
|
|
|
|
+ sr.subject_id_
|
|
|
|
+ FROM sys_user su
|
|
|
|
+ LEFT JOIN student_registration sr ON sr.user_id_ = su.id_
|
|
|
|
+ LEFT JOIN music_group mg ON mg.id_ = sr.music_group_id_
|
|
|
|
+ WHERE su.id_ = #{studentId}
|
|
|
|
+ ORDER BY mg.id_ DESC
|
|
|
|
+ LIMIT 1
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+ <select id="getRepairInfo" resultMap="StudentRepair">
|
|
|
|
+ SELECT sr.*,su.phone_ employee_phone_,e.contact_address_ employee_address_ FROM student_repair sr
|
|
|
|
+ LEFT JOIN sys_user su ON su.id_=sr.employee_id_
|
|
|
|
+ LEFT JOIN employee e ON sr.employee_id_ = e.user_id_
|
|
|
|
+ WHERE sr.id_ = #{id}
|
|
|
|
+ </select>
|
|
</mapper>
|
|
</mapper>
|