|
@@ -0,0 +1,116 @@
|
|
|
+<?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.course.mapper.FsUserCompanyUserQwMapper">
|
|
|
+
|
|
|
+ <resultMap type="FsUserCompanyUserQw" id="FsUserCompanyUserQwResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="userId" column="user_id" />
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
+ <result property="companyId" column="company_id" />
|
|
|
+ <result property="isRepeatFans" column="is_repeat_fans" />
|
|
|
+ <result property="projectId" column="project_id" />
|
|
|
+ <result property="qwUserId" column="qw_user_id" />
|
|
|
+ <result property="qwExternalContactId" column="qw_external_contact_id" />
|
|
|
+ <result property="qwCompanyId" column="qw_company_id" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectFsUserCompanyUserQwVo">
|
|
|
+ select id, user_id, company_user_id, company_id, is_repeat_fans, project_id, qw_user_id, qw_external_contact_id, qw_company_id, create_by, update_by, create_time, status, remark, update_time from fs_user_company_user_qw
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectFsUserCompanyUserQwList" parameterType="FsUserCompanyUserQw" resultMap="FsUserCompanyUserQwResult">
|
|
|
+ <include refid="selectFsUserCompanyUserQwVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="userId != null "> and user_id = #{userId}</if>
|
|
|
+ <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
+ <if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
+ <if test="isRepeatFans != null "> and is_repeat_fans = #{isRepeatFans}</if>
|
|
|
+ <if test="projectId != null "> and project_id = #{projectId}</if>
|
|
|
+ <if test="qwUserId != null "> and qw_user_id = #{qwUserId}</if>
|
|
|
+ <if test="qwExternalContactId != null "> and qw_external_contact_id = #{qwExternalContactId}</if>
|
|
|
+ <if test="qwCompanyId != null "> and qw_company_id = #{qwCompanyId}</if>
|
|
|
+ <if test="status != null "> and status = #{status}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectFsUserCompanyUserQwById" parameterType="Long" resultMap="FsUserCompanyUserQwResult">
|
|
|
+ <include refid="selectFsUserCompanyUserQwVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertFsUserCompanyUserQw" parameterType="FsUserCompanyUserQw" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into fs_user_company_user_qw
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null">user_id,</if>
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
+ <if test="companyId != null">company_id,</if>
|
|
|
+ <if test="isRepeatFans != null">is_repeat_fans,</if>
|
|
|
+ <if test="projectId != null">project_id,</if>
|
|
|
+ <if test="qwUserId != null">qw_user_id,</if>
|
|
|
+ <if test="qwExternalContactId != null">qw_external_contact_id,</if>
|
|
|
+ <if test="qwCompanyId != null">qw_company_id,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="userId != null">#{userId},</if>
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
+ <if test="companyId != null">#{companyId},</if>
|
|
|
+ <if test="isRepeatFans != null">#{isRepeatFans},</if>
|
|
|
+ <if test="projectId != null">#{projectId},</if>
|
|
|
+ <if test="qwUserId != null">#{qwUserId},</if>
|
|
|
+ <if test="qwExternalContactId != null">#{qwExternalContactId},</if>
|
|
|
+ <if test="qwCompanyId != null">#{qwCompanyId},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateFsUserCompanyUserQw" parameterType="FsUserCompanyUserQw">
|
|
|
+ update fs_user_company_user_qw
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="userId != null">user_id = #{userId},</if>
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
+ <if test="companyId != null">company_id = #{companyId},</if>
|
|
|
+ <if test="isRepeatFans != null">is_repeat_fans = #{isRepeatFans},</if>
|
|
|
+ <if test="projectId != null">project_id = #{projectId},</if>
|
|
|
+ <if test="qwUserId != null">qw_user_id = #{qwUserId},</if>
|
|
|
+ <if test="qwExternalContactId != null">qw_external_contact_id = #{qwExternalContactId},</if>
|
|
|
+ <if test="qwCompanyId != null">qw_company_id = #{qwCompanyId},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteFsUserCompanyUserQwById" parameterType="Long">
|
|
|
+ delete from fs_user_company_user_qw where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteFsUserCompanyUserQwByIds" parameterType="String">
|
|
|
+ delete from fs_user_company_user_qw where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|