| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <?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.CompanyVoiceRoboticCallLogAddwxMapper">
-
- <resultMap type="CompanyVoiceRoboticCallLogAddwx" id="CompanyVoiceRoboticCallLogAddwxResult">
- <result property="logId" column="log_id" />
- <result property="roboticId" column="robotic_id" />
- <result property="wxClientId" column="wx_client_id" />
- <result property="runTime" column="run_time" />
- <result property="runParam" column="run_param" />
- <result property="result" column="result" />
- <result property="status" column="status" />
- <result property="createTime" column="create_time" />
- <result property="companyId" column="company_id" />
- <result property="wxAccountId" column="wx_account_id" />
- <result property="isWeCom" column="is_we_com" />
- </resultMap>
- <sql id="selectCompanyVoiceRoboticCallLogAddwxVo">
- select log_id, robotic_id, wx_client_id, run_time, run_param, result, status, create_time, company_id, wx_account_id,is_we_com from company_voice_robotic_call_log_addwx
- </sql>
- <select id="selectCompanyVoiceRoboticCallLogAddwxList" parameterType="CompanyVoiceRoboticCallLogAddwx" resultMap="CompanyVoiceRoboticCallLogAddwxResult">
- <include refid="selectCompanyVoiceRoboticCallLogAddwxVo"/>
- <where>
- <if test="roboticId != null "> and robotic_id = #{roboticId}</if>
- <if test="wxClientId != null "> and wx_client_id = #{wxClientId}</if>
- <if test="runTime != null "> and run_time = #{runTime}</if>
- <if test="runParam != null and runParam != ''"> and run_param = #{runParam}</if>
- <if test="result != null and result != ''"> and result = #{result}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="wxAccountId != null "> and wx_account_id = #{wxAccountId}</if>
- <if test="isWeCom != null "> and is_we_com = #{isWeCom}</if>
- </where>
- </select>
-
- <select id="selectCompanyVoiceRoboticCallLogAddwxByLogId" parameterType="Long" resultMap="CompanyVoiceRoboticCallLogAddwxResult">
- <include refid="selectCompanyVoiceRoboticCallLogAddwxVo"/>
- where log_id = #{logId}
- </select>
-
- <insert id="insertCompanyVoiceRoboticCallLogAddwx" parameterType="CompanyVoiceRoboticCallLogAddwx" useGeneratedKeys="true" keyProperty="logId">
- insert into company_voice_robotic_call_log_addwx
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="roboticId != null">robotic_id,</if>
- <if test="wxClientId != null">wx_client_id,</if>
- <if test="runTime != null">run_time,</if>
- <if test="runParam != null">run_param,</if>
- <if test="result != null">result,</if>
- <if test="status != null">status,</if>
- <if test="createTime != null">create_time,</if>
- <if test="companyId != null">company_id,</if>
- <if test="wxAccountId != null">wx_account_id,</if>
- <if test="isWeCom != null">is_we_com,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="roboticId != null">#{roboticId},</if>
- <if test="wxClientId != null">#{wxClientId},</if>
- <if test="runTime != null">#{runTime},</if>
- <if test="runParam != null">#{runParam},</if>
- <if test="result != null">#{result},</if>
- <if test="status != null">#{status},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="companyId != null">#{companyId},</if>
- <if test="wxAccountId != null">#{wxAccountId},</if>
- <if test="isWeCom != null">#{isWeCom},</if>
- </trim>
- </insert>
- <update id="updateCompanyVoiceRoboticCallLogAddwx" parameterType="CompanyVoiceRoboticCallLogAddwx">
- update company_voice_robotic_call_log_addwx
- <trim prefix="SET" suffixOverrides=",">
- <if test="roboticId != null">robotic_id = #{roboticId},</if>
- <if test="wxClientId != null">wx_client_id = #{wxClientId},</if>
- <if test="runTime != null">run_time = #{runTime},</if>
- <if test="runParam != null">run_param = #{runParam},</if>
- <if test="result != null">result = #{result},</if>
- <if test="status != null">status = #{status},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="companyId != null">company_id = #{companyId},</if>
- <if test="wxAccountId != null">wx_account_id = #{wxAccountId},</if>
- <if test="isWeCom != null">is_we_com = #{isWeCom},</if>
- </trim>
- where log_id = #{logId}
- </update>
- <delete id="deleteCompanyVoiceRoboticCallLogAddwxByLogId" parameterType="Long">
- delete from company_voice_robotic_call_log_addwx where log_id = #{logId}
- </delete>
- <delete id="deleteCompanyVoiceRoboticCallLogAddwxByLogIds" parameterType="String">
- delete from company_voice_robotic_call_log_addwx where log_id in
- <foreach item="logId" collection="array" open="(" separator="," close=")">
- #{logId}
- </foreach>
- </delete>
- <select id="listByCustomerIdAndRoboticId" parameterType="CompanyVoiceRoboticCallLogAddwx" resultType="com.fs.company.vo.CompanyVoiceRoboticCallLogAddwxVO">
- select
- t1.*,
- t2.wx_nick_name as wxAccountName,
- t3.nick_name as wxClientName,
- t4.company_name as companyName,
- t5.nick_name as companyUserName
- from company_voice_robotic_call_log_addwx t1
- left join company_wx_account t2 on t1.wx_account_id = t2.id
- left join company_wx_client t3 on t3.id = t1.wx_client_id
- left join company t4 on t4.company_id = t2.company_id
- left join company_user t5 on t5.user_id = t2.company_user_id
- where 1=1
- <if test="roboticId != null "> and t1.robotic_id = #{roboticId}</if>
- <if test="wxClientId != null "> and t1.wx_client_id = #{wxClientId}</if>
- <if test="isWeCom != null "> and t1.is_we_com = #{isWeCom}</if>
- </select>
- <select id="listByCustomerId" resultType="com.fs.company.vo.CompanyVoiceRoboticCallLogAddwxVO">
- select
- t1.*,
- t2.wx_nick_name as wxAccountName,
- t3.nick_name as wxClientName,
- t4.company_name as companyName,
- t5.nick_name as companyUserName
- from company_voice_robotic_call_log_addwx t1
- left join company_wx_account t2 on t1.wx_account_id = t2.id
- left join company_wx_client t3 on t3.id = t1.wx_client_id
- left join company t4 on t4.company_id = t2.company_id
- left join company_user t5 on t5.user_id = t2.company_user_id
- where 1=1
- <if test="wxclientIds != null ">
- and t1.wx_client_id in
- <foreach item='item' index='index' collection='wxclientIds' open='(' separator=',' close=')'>
- #{item}
- </foreach>
- </if>
- <if test="isWeCom != null "> and t1.is_we_com = #{isWeCom}</if>
- </select>
- </mapper>
|