|  | @@ -1,66 +1,86 @@
 | 
	
		
			
				|  |  |  <?xml version="1.0" encoding="UTF-8" ?>
 | 
	
		
			
				|  |  |  <!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
 | 
	
		
			
				|  |  |  <mapper namespace="com.yonge.cooleshow.biz.dal.dao.TeacherAuthEntryRecordDao">
 | 
	
		
			
				|  |  | -	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord">
 | 
	
		
			
				|  |  | -            <result column="id_" property="id" />
 | 
	
		
			
				|  |  | -	        <result column="user_id_" property="userId" />
 | 
	
		
			
				|  |  | -	        <result column="subject_id_" property="subjectId" />
 | 
	
		
			
				|  |  | -	        <result column="introduction_" property="introduction" />
 | 
	
		
			
				|  |  | -	        <result column="graduate_school_" property="graduateSchool" />
 | 
	
		
			
				|  |  | -	        <result column="subject_" property="subject" />
 | 
	
		
			
				|  |  | -	        <result column="grad_certificate_" property="gradCertificate" />
 | 
	
		
			
				|  |  | -	        <result column="degree__certificate_" property="degreeCertificate" />
 | 
	
		
			
				|  |  | -	        <result column="teacher__certificate_" property="teacherCertificate" />
 | 
	
		
			
				|  |  | -	        <result column="teacher_auth_status_" property="teacherAuthStatus" />
 | 
	
		
			
				|  |  | -	        <result column="verify_user_id_" property="verifyUserId" />
 | 
	
		
			
				|  |  | -	        <result column="reason_" property="reason" />
 | 
	
		
			
				|  |  | -	        <result column="create_time_" property="createTime" />
 | 
	
		
			
				|  |  | -	        <result column="update_time_" property="updateTime" />
 | 
	
		
			
				|  |  | -		</resultMap>  
 | 
	
		
			
				|  |  | -    
 | 
	
		
			
				|  |  | +    <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord">
 | 
	
		
			
				|  |  | +        <result column="id_" property="id"/>
 | 
	
		
			
				|  |  | +        <result column="user_id_" property="userId"/>
 | 
	
		
			
				|  |  | +        <result column="subject_id_" property="subjectId"/>
 | 
	
		
			
				|  |  | +        <result column="introduction_" property="introduction"/>
 | 
	
		
			
				|  |  | +        <result column="graduate_school_" property="graduateSchool"/>
 | 
	
		
			
				|  |  | +        <result column="subject_" property="subject"/>
 | 
	
		
			
				|  |  | +        <result column="grad_certificate_" property="gradCertificate"/>
 | 
	
		
			
				|  |  | +        <result column="degree__certificate_" property="degreeCertificate"/>
 | 
	
		
			
				|  |  | +        <result column="teacher__certificate_" property="teacherCertificate"/>
 | 
	
		
			
				|  |  | +        <result column="teacher_auth_status_" property="teacherAuthStatus"/>
 | 
	
		
			
				|  |  | +        <result column="verify_user_id_" property="verifyUserId"/>
 | 
	
		
			
				|  |  | +        <result column="reason_" property="reason"/>
 | 
	
		
			
				|  |  | +        <result column="create_time_" property="createTime"/>
 | 
	
		
			
				|  |  | +        <result column="update_time_" property="updateTime"/>
 | 
	
		
			
				|  |  | +    </resultMap>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      <!-- 表字段 -->
 | 
	
		
			
				|  |  |      <sql id="baseColumns">
 | 
	
		
			
				|  |  | -         t.id_
 | 
	
		
			
				|  |  | -        , t.user_id_
 | 
	
		
			
				|  |  | -        , t.subject_id_
 | 
	
		
			
				|  |  | -        , t.introduction_
 | 
	
		
			
				|  |  | -        , t.graduate_school_
 | 
	
		
			
				|  |  | -        , t.subject_
 | 
	
		
			
				|  |  | -        , t.grad_certificate_
 | 
	
		
			
				|  |  | -        , t.degree__certificate_
 | 
	
		
			
				|  |  | -        , t.teacher__certificate_
 | 
	
		
			
				|  |  | -        , t.teacher_auth_status_
 | 
	
		
			
				|  |  | -        , t.verify_user_id_
 | 
	
		
			
				|  |  | -        , t.reason_
 | 
	
		
			
				|  |  | -        , t.create_time_
 | 
	
		
			
				|  |  | -        , t.update_time_
 | 
	
		
			
				|  |  | +         t.id_ as "id"
 | 
	
		
			
				|  |  | +        , t.user_id_ as "userId"
 | 
	
		
			
				|  |  | +        , t.subject_id_ as "subjectId"
 | 
	
		
			
				|  |  | +        , t.introduction_ as "introduction"
 | 
	
		
			
				|  |  | +        , t.graduate_school_ as "graduateSchool"
 | 
	
		
			
				|  |  | +        , t.subject_ as "subject"
 | 
	
		
			
				|  |  | +        , t.grad_certificate_ as "gradCertificate"
 | 
	
		
			
				|  |  | +        , t.degree__certificate_ as "degreeCertificate"
 | 
	
		
			
				|  |  | +        , t.teacher__certificate_ as "teacherCertificate"
 | 
	
		
			
				|  |  | +        , t.teacher_auth_status_ as "teacherAuthStatus"
 | 
	
		
			
				|  |  | +        , t.verify_user_id_ as "verifyUserId"
 | 
	
		
			
				|  |  | +        , t.reason_ as "reason"
 | 
	
		
			
				|  |  | +        , t.create_time_ as "createTime"
 | 
	
		
			
				|  |  | +        , t.update_time_ as "updateTime"
 | 
	
		
			
				|  |  |          </sql>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	<update id="updateUserCard">
 | 
	
		
			
				|  |  | -		UPDATE sys_user
 | 
	
		
			
				|  |  | -		<set>
 | 
	
		
			
				|  |  | -			<if test="realName != null and realName != ''">
 | 
	
		
			
				|  |  | -				real_name_ = #{param.realName},
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="idCardNo != null and idCardNo != ''">
 | 
	
		
			
				|  |  | -				id_card_no_ = #{param.idCardNo},
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="gender != null and gender != ''">
 | 
	
		
			
				|  |  | -				gender_ = #{param.gender},
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -			<if test="birthdate != null">
 | 
	
		
			
				|  |  | -				birthdate_ = #{param.birthdate},
 | 
	
		
			
				|  |  | -			</if>
 | 
	
		
			
				|  |  | -		</set>
 | 
	
		
			
				|  |  | -		WHERE id_ = #{param.userId}
 | 
	
		
			
				|  |  | -	</update>
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +    <update id="updateUserCard">
 | 
	
		
			
				|  |  | +        UPDATE sys_user
 | 
	
		
			
				|  |  | +        <set>
 | 
	
		
			
				|  |  | +            <if test="realName != null and realName != ''">
 | 
	
		
			
				|  |  | +                real_name_ = #{param.realName},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="idCardNo != null and idCardNo != ''">
 | 
	
		
			
				|  |  | +                id_card_no_ = #{param.idCardNo},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="gender != null and gender != ''">
 | 
	
		
			
				|  |  | +                gender_ = #{param.gender},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +            <if test="birthdate != null">
 | 
	
		
			
				|  |  | +                birthdate_ = #{param.birthdate},
 | 
	
		
			
				|  |  | +            </if>
 | 
	
		
			
				|  |  | +        </set>
 | 
	
		
			
				|  |  | +        WHERE id_ = #{param.userId}
 | 
	
		
			
				|  |  | +    </update>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    <!-- 分页查询 -->
 | 
	
		
			
				|  |  | +    <select id="selectPage" resultType = "com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo">
 | 
	
		
			
				|  |  | +        SELECT
 | 
	
		
			
				|  |  | +            <include refid="baseColumns"/>
 | 
	
		
			
				|  |  | +            u.real_name_ as realName,
 | 
	
		
			
				|  |  | +            u.id_card_no_ as idCardNo,
 | 
	
		
			
				|  |  | +            u.phone_ as phone
 | 
	
		
			
				|  |  | +        FROM teacher_auth_entry_record t
 | 
	
		
			
				|  |  | +        left join sys_user u on t.user_id_ = u.id_
 | 
	
		
			
				|  |  | +        where
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	<!-- 分页查询 -->
 | 
	
		
			
				|  |  | -    <select id="selectPage" resultMap="BaseResultMap">
 | 
	
		
			
				|  |  | -		SELECT         
 | 
	
		
			
				|  |  | -        	<include refid="baseColumns" />
 | 
	
		
			
				|  |  | -		FROM teacher_auth_entry_record t
 | 
	
		
			
				|  |  | -	</select>
 | 
	
		
			
				|  |  | +    <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo">
 | 
	
		
			
				|  |  | +        select
 | 
	
		
			
				|  |  | +        	<include refid="baseColumns"/>
 | 
	
		
			
				|  |  | +			u.real_name_ as realName,
 | 
	
		
			
				|  |  | +			u.id_card_no_ as idCardNo,
 | 
	
		
			
				|  |  | +			u.gender_ as gender,
 | 
	
		
			
				|  |  | +			(
 | 
	
		
			
				|  |  | +                SELECT GROUP_CONCAT(name_) FROM subject WHERE FIND_IN_SET(id_,t.subject_id_)
 | 
	
		
			
				|  |  | +            ) as subjectName,
 | 
	
		
			
				|  |  | +            (
 | 
	
		
			
				|  |  | +                SELECT u.username_ FROM sys_user u WHERE u.id_ = t.verify_user_id_
 | 
	
		
			
				|  |  | +            ) as verifyUser
 | 
	
		
			
				|  |  | +        from teacher_auth_entry_record t
 | 
	
		
			
				|  |  | +        left join sys_user u on t.user_id_ = u.id_
 | 
	
		
			
				|  |  | +        where t.id_ = #{id}
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |  </mapper>
 |