Explorar o código

会员关联项目

Long hai 3 semanas
pai
achega
5e53ca1739

+ 2 - 2
fs-service-system/src/main/java/com/fs/store/service/impl/FsUserCompanyUserServiceImpl.java

@@ -156,7 +156,7 @@ public class FsUserCompanyUserServiceImpl extends ServiceImpl<FsUserCompanyUserM
         userCompanyUser.setCompanyUserId(companyUserId);
         boolean hasBind = hasBind(userId, companyUserId);
         userCompanyUser.setIsRepeatFans(hasBind ? 1 : 0);
-        insertFsUserCompanyUser(userCompanyUser);
+        save(userCompanyUser);
     }
 
     /**
@@ -176,7 +176,7 @@ public class FsUserCompanyUserServiceImpl extends ServiceImpl<FsUserCompanyUserM
         if (Objects.nonNull(userCompanyUser)) {
             userCompanyUser.setCompanyId(companyId);
             userCompanyUser.setCompanyUserId(companyUserId);
-            updateFsUserCompanyUser(userCompanyUser);
+            updateById(userCompanyUser);
         }
     }
 }

+ 21 - 1
fs-service-system/src/main/resources/mapper/store/FsUserCompanyUserMapper.xml

@@ -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 id, user_id, company_user_id, company_id, is_repeat_fans, project_id, qw_user_id, qw_external_contact_id, qw_company_id 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,6 +47,10 @@ 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>
+            <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>
@@ -46,6 +58,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <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>
          </trim>
     </insert>
 
@@ -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>