|  | @@ -154,16 +154,13 @@
 | 
	
		
			
				|  |  |      <select id="findStudentsByOrganId" resultMap="studentManageListDto">
 | 
	
		
			
				|  |  |          SELECT o.`name_` organ_name_,s.`user_id_` ,su.`username_` ,su.`phone_` parents_phone_,su.`real_name_` ,su.`gender_` , su.organ_id_,
 | 
	
		
			
				|  |  |  		tu.`real_name_` teacher_name_,IF(s.service_tag_=2,0,s.service_tag_) service_tag_ ,s.`operating_tag_` , s.care_package_, s.come_on_package_, suca.`course_balance_` ,
 | 
	
		
			
				|  |  | -		sub.`name_` music_group_subject_ ,su.birthdate_,s.subject_id_list_,s.teacher_id_,
 | 
	
		
			
				|  |  | -		case when su.password_ is null then false else true end isActive_,s.is_new_user_,case when count(sut.user_id_) > 0 then 1 else 0 end is_signed_contract_
 | 
	
		
			
				|  |  | +		su.birthdate_,s.subject_id_list_,s.teacher_id_,case when su.password_ is null then false else true end isActive_,s.is_new_user_,case when sut.user_id_ is null then 0 else 1 end is_signed_contract_
 | 
	
		
			
				|  |  |  		FROM `student` s LEFT JOIN `sys_user` su on s.`user_id_` = su.`id_`
 | 
	
		
			
				|  |  |  		LEFT JOIN `organization` o on o.`id_` = su.`organ_id_`
 | 
	
		
			
				|  |  |  		LEFT JOIN `sys_user` tu on tu.`id_` = s.`teacher_id_` 
 | 
	
		
			
				|  |  |  		LEFT JOIN `sys_user_cash_account` suca on suca.`user_id_` = s.`user_id_`
 | 
	
		
			
				|  |  | -		LEFT JOIN `subject` sub on sub.id_ = s.`subject_id_list_`
 | 
	
		
			
				|  |  |  		left join sys_user_tsign sut on sut.user_id_ = s.user_id_
 | 
	
		
			
				|  |  |          <include refid="findStudentsByOrganIdSql"/>
 | 
	
		
			
				|  |  | -        group by s.user_id_
 | 
	
		
			
				|  |  |          ORDER BY su.create_time_ DESC
 | 
	
		
			
				|  |  |          <include refid="global.limit"/>
 | 
	
		
			
				|  |  |      </select>
 | 
	
	
		
			
				|  | @@ -903,4 +900,14 @@
 | 
	
		
			
				|  |  |              AND (su.id_ = #{search} OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.phone_ LIKE CONCAT('%',#{search},'%'))
 | 
	
		
			
				|  |  |          </if>
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    <select id="getStudentSubject" resultMap="com.ym.mec.biz.dal.dao.SubjectDao.Subject">
 | 
	
		
			
				|  |  | +        SELECT s.user_id_ id_ ,GROUP_CONCAT(sj.name_) name_ FROM student s
 | 
	
		
			
				|  |  | +        LEFT JOIN subject sj ON FIND_IN_SET(sj.id_,s.subject_id_list_)
 | 
	
		
			
				|  |  | +        WHERE s.user_id_ IN
 | 
	
		
			
				|  |  | +        <foreach collection="userIds" item="userId" open="(" close=")" separator=",">
 | 
	
		
			
				|  |  | +            #{userId}
 | 
	
		
			
				|  |  | +        </foreach>
 | 
	
		
			
				|  |  | +        GROUP BY s.user_id_
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |  </mapper>
 |