| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?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.fs.company.mapper.CompanyVoiceRoboticCalleesMapper">
-
- <resultMap type="CompanyVoiceRoboticCallees" id="CompanyVoiceRoboticCalleesResult">
- <result property="id" column="id" />
- <result property="userId" column="user_id" />
- <result property="userName" column="user_name" />
- <result property="phone" column="phone" />
- <result property="roboticId" column="robotic_id" />
- <result property="params" column="params" />
- </resultMap>
- <sql id="selectCompanyVoiceRoboticCalleesVo">
- select id, user_id, user_name, phone, robotic_id, params from company_voice_robotic_callees
- </sql>
- <select id="selectCompanyVoiceRoboticCalleesList" parameterType="CompanyVoiceRoboticCallees" resultMap="CompanyVoiceRoboticCalleesResult">
- <include refid="selectCompanyVoiceRoboticCalleesVo"/>
- <where>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="userName != null and userName != ''"> and user_name = #{userName}</if>
- <if test="phone != null and phone != ''"> and phone = #{phone}</if>
- <if test="roboticId != null "> and robotic_id = #{roboticId}</if>
- <if test="params != null and params != ''"> and params = #{params}</if>
- </where>
- </select>
-
- <select id="selectCompanyVoiceRoboticCalleesById" parameterType="Long" resultMap="CompanyVoiceRoboticCalleesResult">
- <include refid="selectCompanyVoiceRoboticCalleesVo"/>
- where id = #{id}
- </select>
- <select id="selectByRoboticId" resultType="com.fs.company.domain.CompanyVoiceRoboticCallees">
- select * from company_voice_robotic_callees where robotic_id = #{id}
- </select>
- <insert id="insertCompanyVoiceRoboticCallees" parameterType="CompanyVoiceRoboticCallees" useGeneratedKeys="true" keyProperty="id">
- insert into company_voice_robotic_callees
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="userId != null">user_id,</if>
- <if test="userName != null">user_name,</if>
- <if test="phone != null">phone,</if>
- <if test="roboticId != null">robotic_id,</if>
- <if test="params != null">params,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="userId != null">#{userId},</if>
- <if test="userName != null">#{userName},</if>
- <if test="phone != null">#{phone},</if>
- <if test="roboticId != null">#{roboticId},</if>
- <if test="params != null">#{params},</if>
- </trim>
- </insert>
- <insert id="insertCompanyVoiceRoboticCalleesList" keyProperty="id">
- insert into company_voice_robotic_callees (user_id, user_name, phone, robotic_id, params) values
- <foreach collection="list" item="item" index="index" separator=",">
- (#{item.userId},#{item.userName},#{item.phone},#{item.roboticId},#{item.params})
- </foreach>
- </insert>
- <update id="updateCompanyVoiceRoboticCallees" parameterType="CompanyVoiceRoboticCallees">
- update company_voice_robotic_callees
- <trim prefix="SET" suffixOverrides=",">
- <if test="userId != null">user_id = #{userId},</if>
- <if test="userName != null">user_name = #{userName},</if>
- <if test="phone != null">phone = #{phone},</if>
- <if test="roboticId != null">robotic_id = #{roboticId},</if>
- <if test="params != null">params = #{params},</if>
- <if test="uuid != null">uuid = #{uuid},</if>
- <if test="result != null">result = #{result},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteCompanyVoiceRoboticCalleesById" parameterType="Long">
- delete from company_voice_robotic_callees where id = #{id}
- </delete>
- <delete id="deleteCompanyVoiceRoboticCalleesByIds" parameterType="String">
- delete from company_voice_robotic_callees where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <delete id="deleteByRoboticId">
- delete from company_voice_robotic_callees where robotic_id = #{id}
- </delete>
- <select id="countByRoboticIdNotUuid" resultType="long">
- select count(*) from company_voice_robotic_callees where robotic_id = #{roboticId} and result = 0
- </select>
- </mapper>
|