|
@@ -10,10 +10,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectFsUserCompanyUserVo">
|
|
|
- select id, user_id, company_user_id, company_id, is_repeat_fans from fs_user_company_user
|
|
|
+ select * from fs_user_company_user
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectFsUserCompanyUserList" parameterType="FsUserCompanyUser" resultMap="FsUserCompanyUserResult">
|
|
@@ -23,6 +27,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -39,14 +47,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyUserId != null">company_user_id,</if>
|
|
|
<if test="companyId != null">company_id,</if>
|
|
|
<if test="isRepeatFans != null">is_repeat_fans,</if>
|
|
|
- </trim>
|
|
|
+ <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>
|
|
|
+ </trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id},</if>
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
<if test="companyUserId != null">#{companyUserId},</if>
|
|
|
<if test="companyId != null">#{companyId},</if>
|
|
|
<if test="isRepeatFans != null">#{isRepeatFans},</if>
|
|
|
- </trim>
|
|
|
+ <if test="projectId != null">#{projectId},</if>
|
|
|
+ <if test="qwUserId != null">#{qwUserId},</if>
|
|
|
+ <if test="qwExternalContactId != null">#{qwExternalContactId},</if>
|
|
|
+ <if test="qwCompanyId != null">#{qwCompanyId},</if>
|
|
|
+ </trim>
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateFsUserCompanyUser" parameterType="FsUserCompanyUser">
|
|
@@ -56,6 +72,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<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_contaact_id = #{qwExternalContactId},</if>
|
|
|
+ <if test="qwCompanyId != null">qw_company_id = #{qwCompanyId},</if>
|
|
|
</trim>
|
|
|
where id = #{id}
|
|
|
</update>
|
|
@@ -73,11 +93,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectRepeatCompanyUserName" resultType="FsUserCompanyUser">
|
|
|
SELECT
|
|
|
- GROUP_CONCAT( company_user.nick_name ) AS repeatCompanyUserName,
|
|
|
- fs_user_company_user.user_id
|
|
|
+ GROUP_CONCAT( company_user.nick_name ) AS repeatCompanyUserName,
|
|
|
+ fs_user_company_user.user_id
|
|
|
FROM
|
|
|
- fs_user_company_user
|
|
|
- LEFT JOIN company_user ON company_user.user_id = fs_user_company_user.company_user_id
|
|
|
+ fs_user_company_user
|
|
|
+ LEFT JOIN company_user ON company_user.user_id = fs_user_company_user.company_user_id
|
|
|
<where>
|
|
|
fs_user_company_user.user_id IN
|
|
|
<foreach item="userId" collection="userIds" open="(" separator="," close=")">
|
|
@@ -85,7 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</foreach>
|
|
|
</where>
|
|
|
GROUP BY
|
|
|
- fs_user_company_user.user_id
|
|
|
+ fs_user_company_user.user_id
|
|
|
</select>
|
|
|
|
|
|
<update id="transfer">
|