| 
					
				 | 
			
			
				@@ -11,6 +11,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="student_school_" jdbcType="VARCHAR" property="studentSchool"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="employee_id_" jdbcType="INTEGER" property="employeeId"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <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_name_" jdbcType="VARCHAR" property="subjectName"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="type_" jdbcType="INTEGER" property="type"/> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -29,9 +31,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 根据主键查询一条记录 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <select id="get" resultMap="StudentRepair"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        SELECT * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        FROM school 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        WHERE id_ = #{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        SELECT * FROM student_repair WHERE id_=#{id} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <insert id="insert" parameterType="com.ym.mec.biz.dal.entity.StudentRepair" useGeneratedKeys="true" keyColumn="id" 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -212,10 +212,25 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         ORDER BY id_ DESC 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </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_ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        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 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        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> 
			 |