|
@@ -1,18 +1,18 @@
|
|
|
<?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.TeacherAuthMusicianRecordDao">
|
|
|
- <resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.TeacherAuthMusicianRecord">
|
|
|
- <result column="id_" property="id" />
|
|
|
- <result column="user_id_" property="userId" />
|
|
|
- <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.TeacherAuthMusicianRecord">
|
|
|
+ <result column="id_" property="id"/>
|
|
|
+ <result column="user_id_" property="userId"/>
|
|
|
+ <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">
|
|
|
+ <!-- 表字段 -->
|
|
|
+ <sql id="baseColumns">
|
|
|
t.id_ as "id"
|
|
|
, t.user_id_ as "userId"
|
|
|
, t.teacher_auth_status_ as "teacherAuthStatus"
|
|
@@ -22,54 +22,57 @@
|
|
|
, t.update_time_ as "updateTime"
|
|
|
</sql>
|
|
|
|
|
|
- <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.MusicianAuthEntryRecordVo">
|
|
|
- select
|
|
|
- <include refid="baseColumns"/>,
|
|
|
- u.real_name_ as realName,
|
|
|
- u.id_card_no_ as idCardNo,
|
|
|
- (
|
|
|
- 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>
|
|
|
+ <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.MusicianAuthEntryRecordVo">
|
|
|
+ select
|
|
|
+ <include refid="baseColumns"/>,
|
|
|
+ u.real_name_ as realName,
|
|
|
+ u.id_card_no_ as idCardNo,
|
|
|
+ (
|
|
|
+ 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>
|
|
|
|
|
|
- <!-- 分页查询 -->
|
|
|
- <select id="selectPage" resultType = "com.yonge.cooleshow.biz.dal.vo.MusicianAuthEntryRecordVo">
|
|
|
- SELECT
|
|
|
- <include refid="baseColumns"/>,
|
|
|
- u.real_name_ as realName,
|
|
|
- u.id_card_no_ as idCardNo,
|
|
|
- u.phone_ as phone
|
|
|
- FROM teacher_auth_musician_record t
|
|
|
- left join sys_user u on t.user_id_ = u.id_
|
|
|
- left join sys_user v on t.verify_user_id_ = u.id_
|
|
|
- <where>
|
|
|
- <if test="null != param.search and '' != param.search">
|
|
|
- AND (
|
|
|
- t.user_id_ LIKE CONCAT('%', #{param.search}, '%') or
|
|
|
- u.username_ LIKE CONCAT('%', #{param.search}, '%') or
|
|
|
- u.phone_ LIKE CONCAT('%', #{param.search}, '%')
|
|
|
- )
|
|
|
- </if>
|
|
|
- <if test="null != param.verifyUser and '' != param.verifyUser">
|
|
|
- AND v.username_ LIKE CONCAT('%', #{param.verifyUser}, '%')
|
|
|
- </if>
|
|
|
- <if test="param.startTime !=null">
|
|
|
- <![CDATA[AND t.create_time_ >= #{param.startTime} ]]>
|
|
|
- </if>
|
|
|
- <if test="param.endTime !=null">
|
|
|
- <![CDATA[AND t.create_time_ <= #{param.endTime} ]]>
|
|
|
- </if>
|
|
|
- <if test="param.authStatus !=null">
|
|
|
- AND t.teacher_auth_status_ = #{param.authStatus}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.MusicianAuthEntryRecordVo">
|
|
|
+ SELECT
|
|
|
+ <include refid="baseColumns"/>,
|
|
|
+ u.real_name_ as realName,
|
|
|
+ u.id_card_no_ as idCardNo,
|
|
|
+ u.phone_ as phone
|
|
|
+ FROM teacher_auth_musician_record t
|
|
|
+ left join sys_user u on t.user_id_ = u.id_
|
|
|
+ left join sys_user v on t.verify_user_id_ = u.id_
|
|
|
+ <where>
|
|
|
+ <if test="null != param.search and '' != param.search">
|
|
|
+ AND (
|
|
|
+ t.user_id_ LIKE CONCAT('%', #{param.search}, '%') or
|
|
|
+ u.username_ LIKE CONCAT('%', #{param.search}, '%') or
|
|
|
+ u.phone_ LIKE CONCAT('%', #{param.search}, '%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="null != param.verifyUser and '' != param.verifyUser">
|
|
|
+ AND v.username_ LIKE CONCAT('%', #{param.verifyUser}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="param.startTime !=null">
|
|
|
+ <![CDATA[AND t.create_time_ >= #{param.startTime} ]]>
|
|
|
+ </if>
|
|
|
+ <if test="param.endTime !=null">
|
|
|
+ <![CDATA[AND t.create_time_ <= #{param.endTime} ]]>
|
|
|
+ </if>
|
|
|
+ <if test="param.authStatus !=null">
|
|
|
+ AND t.teacher_auth_status_ = #{param.authStatus}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
<select id="getLastRecordByUserId"
|
|
|
resultType="com.yonge.cooleshow.biz.dal.entity.TeacherAuthMusicianRecord">
|
|
|
select * from teacher_auth_musician_record where user_id_ = #{userId}
|
|
|
order by create_time_ desc limit 1
|
|
|
</select>
|
|
|
+ <select id="getUserToDoNum" resultType="java.lang.Integer">
|
|
|
+ select count(1) from teacher_auth_musician_record where teacher_auth_status_ = 1
|
|
|
+ </select>
|
|
|
</mapper>
|