| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171 |
- <?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.aiSipCall.mapper.AiSipCallUserMapper">
-
- <resultMap type="AiSipCallUser" id="AiSipCallUserResult">
- <result property="userId" column="user_id" />
- <result property="deptId" column="dept_id" />
- <result property="loginName" column="login_name" />
- <result property="userName" column="user_name" />
- <result property="userType" column="user_type" />
- <result property="email" column="email" />
- <result property="phonenumber" column="phonenumber" />
- <result property="sex" column="sex" />
- <result property="avatar" column="avatar" />
- <result property="password" column="password" />
- <result property="salt" column="salt" />
- <result property="status" column="status" />
- <result property="delFlag" column="del_flag" />
- <result property="loginIp" column="login_ip" />
- <result property="loginDate" column="login_date" />
- <result property="pwdUpdateDate" column="pwd_update_date" />
- <result property="remark" column="remark" />
- <result property="logo" column="logo" />
- <result property="extNum" column="ext_num" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="companyId" column="company_id" />
- <result property="companyUserId" column="company_user_id" />
- <result property="gatewayIds" column="gateway_ids" />
- </resultMap>
- <sql id="selectAiSipCallUserVo">
- select user_id, dept_id, login_name, user_name, user_type, email, phonenumber, sex, avatar, password, salt, status, del_flag, login_ip, login_date, pwd_update_date, remark, logo, ext_num, create_by, create_time, update_by, update_time, company_id,company_user_id,gateway_ids from ai_sip_call_user
- </sql>
- <select id="selectAiSipCallUserList" parameterType="AiSipCallUser" resultMap="AiSipCallUserResult">
- <include refid="selectAiSipCallUserVo"/>
- <where>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
- <if test="loginName != null and loginName != ''"> and login_name like concat('%', #{loginName}, '%')</if>
- <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
- <if test="userType != null and userType != ''"> and user_type = #{userType}</if>
- <if test="email != null and email != ''"> and email = #{email}</if>
- <if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
- <if test="sex != null and sex != ''"> and sex = #{sex}</if>
- <if test="avatar != null and avatar != ''"> and avatar = #{avatar}</if>
- <if test="password != null and password != ''"> and password = #{password}</if>
- <if test="salt != null and salt != ''"> and salt = #{salt}</if>
- <if test="status != null and status != ''"> and status = #{status}</if>
- <if test="loginIp != null and loginIp != ''"> and login_ip = #{loginIp}</if>
- <if test="loginDate != null "> and login_date = #{loginDate}</if>
- <if test="pwdUpdateDate != null "> and pwd_update_date = #{pwdUpdateDate}</if>
- <if test="logo != null and logo != ''"> and logo = #{logo}</if>
- <if test="extNum != null and extNum != ''"> and ext_num = #{extNum}</if>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
- </where>
- </select>
-
- <select id="selectAiSipCallUserByUserId" parameterType="Long" resultMap="AiSipCallUserResult">
- <include refid="selectAiSipCallUserVo"/>
- where user_id = #{userId}
- </select>
-
- <insert id="insertAiSipCallUser" parameterType="AiSipCallUser">
- insert into ai_sip_call_user
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="userId != null">user_id,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="loginName != null and loginName != ''">login_name,</if>
- <if test="userName != null">user_name,</if>
- <if test="userType != null">user_type,</if>
- <if test="email != null">email,</if>
- <if test="phonenumber != null">phonenumber,</if>
- <if test="sex != null">sex,</if>
- <if test="avatar != null">avatar,</if>
- <if test="password != null">password,</if>
- <if test="salt != null">salt,</if>
- <if test="status != null">status,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="loginIp != null">login_ip,</if>
- <if test="loginDate != null">login_date,</if>
- <if test="pwdUpdateDate != null">pwd_update_date,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- <if test="logo != null">logo,</if>
- <if test="companyUserId != null">company_user_id,</if>
- <if test="extNum != null and extNum != ''">ext_num,</if>
- <if test="companyId != null ">company_id,</if>
- <if test="gatewayIds != null and gatewayIds != ''">gateway_ids,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="userId != null">#{userId},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="loginName != null and loginName != ''">#{loginName},</if>
- <if test="userName != null">#{userName},</if>
- <if test="userType != null">#{userType},</if>
- <if test="email != null">#{email},</if>
- <if test="phonenumber != null">#{phonenumber},</if>
- <if test="sex != null">#{sex},</if>
- <if test="avatar != null">#{avatar},</if>
- <if test="password != null">#{password},</if>
- <if test="salt != null">#{salt},</if>
- <if test="status != null">#{status},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="loginIp != null">#{loginIp},</if>
- <if test="loginDate != null">#{loginDate},</if>
- <if test="pwdUpdateDate != null">#{pwdUpdateDate},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- <if test="logo != null">#{logo},</if>
- <if test="companyUserId != null">#{companyUserId},</if>
- <if test="extNum != null and extNum != ''">#{extNum},</if>
- <if test="companyId != null">#{companyId},</if>
- <if test="gatewayIds != null and gatewayIds != ''">#{gatewayIds},</if>
- </trim>
- </insert>
- <update id="updateAiSipCallUser" parameterType="AiSipCallUser">
- update ai_sip_call_user
- <trim prefix="SET" suffixOverrides=",">
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="loginName != null and loginName != ''">login_name = #{loginName},</if>
- <if test="userName != null">user_name = #{userName},</if>
- <if test="userType != null">user_type = #{userType},</if>
- <if test="email != null">email = #{email},</if>
- <if test="phonenumber != null">phonenumber = #{phonenumber},</if>
- <if test="sex != null">sex = #{sex},</if>
- <if test="avatar != null">avatar = #{avatar},</if>
- <if test="password != null">password = #{password},</if>
- <if test="salt != null">salt = #{salt},</if>
- <if test="status != null">status = #{status},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="loginIp != null">login_ip = #{loginIp},</if>
- <if test="loginDate != null">login_date = #{loginDate},</if>
- <if test="pwdUpdateDate != null">pwd_update_date = #{pwdUpdateDate},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- <if test="logo != null">logo = #{logo},</if>
- <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
- <if test="extNum != null and extNum != ''">ext_num = #{extNum},</if>
- <if test="companyId != null">company_id = #{companyId},</if>
- <if test="gatewayIds != null and gatewayIds != ''">gateway_ids = #{gatewayIds},</if>
- </trim>
- where user_id = #{userId}
- </update>
- <delete id="deleteAiSipCallUserByUserId" parameterType="Long">
- delete from ai_sip_call_user where user_id = #{userId}
- </delete>
- <delete id="deleteAiSipCallUserByUserIds" parameterType="String">
- delete from ai_sip_call_user where user_id in
- <foreach item="userId" collection="array" open="(" separator="," close=")">
- #{userId}
- </foreach>
- </delete>
- </mapper>
|