AiSparringDetailMapper.xml 2.67 KB
<?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="cn.com.glsx.dj.mindworkplate.mapper.AiSparringDetailMapper" >
    <resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.AiSparringDetail" >
        <id column="id" property="id" jdbcType="INTEGER" />
        <result column="role" property="role" jdbcType="VARCHAR" />
        <result column="content" property="content" jdbcType="LONGNVARCHAR" />
        <result column="spk_time" property="spkTime" jdbcType="TIMESTAMP" />
        <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
        <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
        <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
        <result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
        <result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
        <result column="sparring_link" property="sparringLink" jdbcType="VARCHAR" />
        <result column="improve" property="improve" jdbcType="VARCHAR" />
        <result column="polish" property="polish" jdbcType="VARCHAR" />
        <result column="voice_url" property="voiceUrl" jdbcType="VARCHAR" />
        <result column="voice_duration" property="voiceDuration" jdbcType="INTEGER" />
        <result column="speed" property="speed" jdbcType="VARCHAR" />
        <result column="intonation" property="intonation" jdbcType="VARCHAR" />
        <result column="definition" property="definition" jdbcType="VARCHAR" />
        <result column="redundant" property="redundant" jdbcType="VARCHAR" />
    </resultMap>
    <resultMap id="DTOResultMap" extends="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.dto.AiSparringDetailDTO" >
        <result column="sensitive_list" property="sensitiveList" jdbcType="VARCHAR" />
    </resultMap>

    <select id="page"
            parameterType="cn.com.glsx.dj.mindworkplate.dto.AiSparringDetailRequestDTO"
            resultMap="DTOResultMap">
        select asd.*,sr.sensitive_list
        from ai_sparring_staff_record sr
        inner join ai_sparring_detail_task_ref asdtr on sr.id = asdtr.business_id and asdtr.deleted_flag = 'N'
        inner join ai_sparring_detail asd on asd.id = asdtr.detail_id and asd.deleted_flag = 'N'
        <where>
            sr.deleted_flag = 'N'
            <if test="channelSource != null">
                and asdtr.channel_source = #{channelSource}
            </if>
            <if test="staffRecordId != null">
                and asdtr.business_id = #{staffRecordId}
            </if>
        </where>
    </select>
</mapper>