12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <?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.CompanyVoiceCallerMapper">
- <resultMap type="CompanyVoiceCaller" id="CompanyVoiceCallerResult">
- <result property="callerId" column="caller_id" />
- <result property="companyId" column="company_id" />
- <result property="companyUserId" column="company_user_id" />
- <result property="callerNo" column="caller_no" />
- <result property="mobile" column="mobile" />
- <result property="status" column="status" />
- <result property="remark" column="remark" />
- <result property="bindTime" column="bind_time" />
- </resultMap>
- <sql id="selectCompanyVoiceCallerVo">
- select caller_id, company_id, company_user_id, caller_no, mobile, status, remark,bind_time from company_voice_caller
- </sql>
- <select id="selectCompanyVoiceCallerList" parameterType="CompanyVoiceCaller" resultMap="CompanyVoiceCallerResult">
- <include refid="selectCompanyVoiceCallerVo"/>
- <where>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
- <if test="callerNo != null and callerNo != ''"> and caller_no = #{callerNo}</if>
- <if test="mobile != null and mobile != ''"> and mobile = #{mobile}</if>
- <if test="status != null "> and status = #{status}</if>
- </where>
- </select>
- <select id="selectCompanyVoiceCallerById" parameterType="Long" resultMap="CompanyVoiceCallerResult">
- <include refid="selectCompanyVoiceCallerVo"/>
- where caller_id = #{callerId}
- </select>
- <insert id="insertCompanyVoiceCaller" parameterType="CompanyVoiceCaller" useGeneratedKeys="true" keyProperty="callerId">
- insert into company_voice_caller
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="companyId != null">company_id,</if>
- <if test="companyUserId != null">company_user_id,</if>
- <if test="callerNo != null">caller_no,</if>
- <if test="mobile != null">mobile,</if>
- <if test="status != null">status,</if>
- <if test="remark != null">remark,</if>
- <if test="bindTime != null">bind_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="companyId != null">#{companyId},</if>
- <if test="companyUserId != null">#{companyUserId},</if>
- <if test="callerNo != null">#{callerNo},</if>
- <if test="mobile != null">#{mobile},</if>
- <if test="status != null">#{status},</if>
- <if test="remark != null">#{remark},</if>
- <if test="bindTime != null">#{bindTime},,</if>
- </trim>
- </insert>
- <update id="updateCompanyVoiceCaller" parameterType="CompanyVoiceCaller">
- update company_voice_caller
- <trim prefix="SET" suffixOverrides=",">
- <if test="companyId != null">company_id = #{companyId},</if>
- <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
- <if test="callerNo != null">caller_no = #{callerNo},</if>
- <if test="mobile != null">mobile = #{mobile},</if>
- <if test="status != null">status = #{status},</if>
- <if test="remark != null">remark = #{remark},</if>
- bind_time = #{bindTime}
- </trim>
- where caller_id = #{callerId}
- </update>
- <delete id="deleteCompanyVoiceCallerById" parameterType="Long">
- delete from company_voice_caller where caller_id = #{callerId}
- </delete>
- <delete id="deleteCompanyVoiceCallerByIds" parameterType="String">
- delete from company_voice_caller where caller_id in
- <foreach item="callerId" collection="array" open="(" separator="," close=")">
- #{callerId}
- </foreach>
- </delete>
- </mapper>
|