wjj 6 天之前
父節點
當前提交
646e494a2f

+ 5 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsUserInformationCollection.java

@@ -117,4 +117,9 @@ public class FsUserInformationCollection extends BaseEntity{
     *完善状态 0-未完善 1-完善
     * */
     private Integer completeStatus;
+
+    /**
+     * 信息采集标识 0-企微信息采集 1-个微信息采集
+     */
+    private Integer qwTag;
 }

+ 14 - 11
fs-service/src/main/java/com/fs/hisStore/service/impl/FsUserInformationCollectionServiceImpl.java

@@ -359,6 +359,8 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
 
         //构建用户信息采集对象
         FsUserInformationCollection fsUserInformationCollection = buildUserInfoCollection(param);
+        //添加个微标识
+        fsUserInformationCollection.setQwTag(1);
         try {
             if (validateRequiredRemarks(param.getAnswers(),param.getQuestionId())){
                 //用户采集信息问题完善状态 0-未完善 1-完善
@@ -1318,9 +1320,9 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
     @Override
     public R bindUser(CollectionBindUserParam param) {
         //TODO 是否判断销售后续再做
-//        if (param.getCompanyUserId() != null) {
-//            return R.error("");
-//        }
+        if (param.getCompanyUserId() != null) {
+            return R.error("销售人员无法绑定");
+        }
         if (param.getUserId() == null) {
             return R.error("用户参数错误");
         }
@@ -1338,14 +1340,14 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         FsUserInformationCollection selectByUserId = fsUserInformationCollectionMapper.selectByUserId(param.getUserId());
         if (selectByUserId != null) {
             //查询此用户是否添加该销售企微好友,未添加提示添加销售
-            QwExternalContact externalContactCondition=new QwExternalContact();
-            externalContactCondition.setFsUserId(param.getUserId());
-            externalContactCondition.setCompanyUserId(selectByUserId.getCompanyUserId());
-            List<QwExternalContact> qwExternalContacts = qwExternalContactMapper.selectQwExternalContactList(externalContactCondition);
-            if (CollectionUtils.isEmpty(qwExternalContacts)){
-                log.error("客户二次提交采集信息,销售与分享客户之间没有企微好友关系,当前销售id:{},当前客户id:{}",selectByUserId.getCompanyUserId(),param.getUserId());
-                throw new CustomException("请添加分享销售企微好友!");
-            }
+//            QwExternalContact externalContactCondition=new QwExternalContact();
+//            externalContactCondition.setFsUserId(param.getUserId());
+//            externalContactCondition.setCompanyUserId(selectByUserId.getCompanyUserId());
+//            List<QwExternalContact> qwExternalContacts = qwExternalContactMapper.selectQwExternalContactList(externalContactCondition);
+//            if (CollectionUtils.isEmpty(qwExternalContacts)){
+//                log.error("客户二次提交采集信息,销售与分享客户之间没有企微好友关系,当前销售id:{},当前客户id:{}",selectByUserId.getCompanyUserId(),param.getUserId());
+//                throw new CustomException("请添加分享销售企微好友!");
+//            }
             if (!selectByUserId.getId().equals(param.getCollectionId())) {
                 throw new CustomException("已有信息采集信息!,请联系销售重新分享二维码!");
             }
@@ -1354,6 +1356,7 @@ public class FsUserInformationCollectionServiceImpl extends ServiceImpl<FsUserIn
         FsUserInformationCollection map = new FsUserInformationCollection();
         map.setUserId(param.getUserId());
         map.setId(param.getCollectionId());
+        map.setQwTag(1);
         if (fsUserInformationCollectionMapper.updateFsUserInformationCollection(map) > 0) {
             //更新信息采集进度表里面的用户id
             FsUserInformationCollectionSchedule schedule = scheduleMapper.selectCollectionScheduleRunningByCollectionId(param.getCollectionId());

+ 5 - 1
fs-service/src/main/resources/mapper/hisStore/FsUserInformationCollectionMapper.xml

@@ -35,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="thirdPartyUserId"    column="third_party_user_id"    />
         <result property="fillFlag"    column="fill_flag"    />
         <result property="completeStatus"    column="complete_status"    />
+        <result property="qwTag"    column="qw_tag"    />
     </resultMap>
 
     <!-- 用户信息采集视图对象类的ResultMap -->
@@ -61,7 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
              , doctor_confirm, create_time, update_time,doctor_id,company_user_id
              ,package_id,pay_type,amount,is_package,user_confirm2,package_order_code
              ,status,user_advice,doctor_advice,doctor_confirm_time,sex,user_name,user_phone_four
-             ,allergy,remark,age,info_source,third_party_user_id,fill_flag,complete_status  from fs_user_information_collection
+             ,allergy,remark,age,info_source,third_party_user_id,fill_flag,complete_status,qw_tag  from fs_user_information_collection
     </sql>
 
     <select id="selectFsUserInformationCollectionList" parameterType="FsUserInformationCollection" resultMap="FsUserInformationCollectionResult">
@@ -224,6 +225,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="thirdPartyUserId != null">third_party_user_id,</if>
             <if test="fillFlag != null">fill_flag,</if>
             <if test="completeStatus != null">complete_status,</if>
+            <if test="qwTag != null">qw_tag,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="questionId != null">#{questionId},</if>
@@ -255,6 +257,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="thirdPartyUserId != null">#{thirdPartyUserId},</if>
             <if test="fillFlag != null">#{fillFlag},</if>
             <if test="completeStatus != null">#{completeStatus},</if>
+            <if test="qwTag != null">#{qwTag},</if>
         </trim>
     </insert>
 
@@ -290,6 +293,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="thirdPartyUserId != null">third_party_user_id = #{thirdPartyUserId},</if>
             <if test="fillFlag != null">fill_flag = #{fillFlag},</if>
             <if test="completeStatus != null">complete_status = #{completeStatus},</if>
+            <if test="qwTag != null">qw_tag = #{qwTag},</if>
         </trim>
         where id = #{id}
     </update>