AiRoleInfoMapper.xml 3.11 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.AiRoleInfoMapper">
    <resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.AiRoleInfo">
        <!--
          WARNING - @mbg.generated
        -->
        <id column="id" property="id" jdbcType="INTEGER"/>
        <result column="scens_type" property="sceneType" jdbcType="INTEGER"/>
        <result column="business_type" property="businessType" jdbcType="INTEGER"/>
        <result column="role_type" property="roleType" jdbcType="INTEGER"/>
        <result column="role_name" property="roleName" jdbcType="VARCHAR"/>
        <result column="role_detail" property="roleDetail" jdbcType="VARCHAR"/>
        <result column="avatar" property="avatar" jdbcType="VARCHAR"/>
        <result column="created_by" property="createdBy" jdbcType="VARCHAR"/>
        <result column="created_time" property="createdTime" jdbcType="TIMESTAMP"/>
        <result column="updated_by" property="updatedBy" jdbcType="VARCHAR"/>
        <result column="updated_time" property="updatedTime" jdbcType="TIMESTAMP"/>
        <result column="attack_script" property="attackScript" jdbcType="VARCHAR"/>
        <result column="language_style" property="languageStyle" jdbcType="VARCHAR"/>
        <result column="speech_speed" property="speechSpeed" jdbcType="VARCHAR"/>
        <result column="personality_traits" property="personalityTraits" jdbcType="VARCHAR"/>
        <result column="pet_phrase" property="petPhrase" jdbcType="VARCHAR"/>
        <result column="detail_image" property="detailImage" jdbcType="VARCHAR"/>
        <result column="role_voice" property="roleVoice" jdbcType="VARCHAR"/>
        <result column="sparring_suggest" property="sparringSuggest" jdbcType="VARCHAR"/>
        <result column="role_voice_hs" property="roleVoiceHs" jdbcType="VARCHAR"/>
    </resultMap>
    <resultMap id="DTOResultMap" extends="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.dto.AiRoleInfoDTO">
    </resultMap>
    <sql id="Base_Column_List">
        <!--
          WARNING - @mbg.generated
        -->
        id, scens_type, business_type, role_type, role_name, role_detail, avatar, created_by, created_time,
        updated_by, updated_time,language_style, speech_speed, personality_traits, pet_phrase, sparring_suggest,
        detail_image, role_voice, roleVoiceHs
    </sql>
    <select id="page"
            parameterType="cn.com.glsx.dj.mindworkplate.dto.AiRoleInfoDTO"
            resultMap="DTOResultMap">
        select * from ai_role_info
        <where>
            <if test="sceneType != null">
                and scene_type = #{sceneType}
            </if>
            <if test="businessType != null">
                and business_type = #{businessType}
            </if>
            <if test="roleType != null">
                and role_type = #{roleType}
            </if>
            <if test="roleName != null and roleName != ''">
                and role_name like concat ('%', #{roleName}, '%')
            </if>
        </where>
    </select>
</mapper>