Ver código fonte

销售推送搭销会员信息到医生端

wjj 1 semana atrás
pai
commit
730e95880d
19 arquivos alterados com 513 adições e 5 exclusões
  1. 6 1
      fs-company/src/main/java/com/fs/company/controller/company/FsDoctorController.java
  2. 44 0
      fs-company/src/main/java/com/fs/company/controller/qw/FsDoctorMemberSalesController.java
  3. 3 0
      fs-service/src/main/java/com/fs/his/domain/FsSopDoctorTask.java
  4. 3 0
      fs-service/src/main/java/com/fs/his/domain/FsStoreOrder.java
  5. 3 0
      fs-service/src/main/java/com/fs/his/mapper/FsDoctorMapper.java
  6. 2 0
      fs-service/src/main/java/com/fs/his/service/IFsDoctorService.java
  7. 5 0
      fs-service/src/main/java/com/fs/his/service/impl/FsDoctorServiceImpl.java
  8. 44 0
      fs-service/src/main/java/com/fs/qw/domain/FsDoctorMemberSales.java
  9. 3 0
      fs-service/src/main/java/com/fs/qw/domain/QwExternalContact.java
  10. 61 0
      fs-service/src/main/java/com/fs/qw/mapper/FsDoctorMemberSalesMapper.java
  11. 22 0
      fs-service/src/main/java/com/fs/qw/param/MemberSalesParam.java
  12. 70 0
      fs-service/src/main/java/com/fs/qw/service/IFsDoctorMemberSalesService.java
  13. 151 0
      fs-service/src/main/java/com/fs/qw/service/impl/FsDoctorMemberSalesServiceImpl.java
  14. 1 3
      fs-service/src/main/java/com/fs/qw/service/impl/QwExternalContactServiceImpl.java
  15. 3 0
      fs-service/src/main/java/com/fs/qw/vo/QwExternalContactVO.java
  16. 2 0
      fs-service/src/main/resources/mapper/his/FsSopDoctorTaskMapper.xml
  17. 1 0
      fs-service/src/main/resources/mapper/his/FsStoreOrderMapper.xml
  18. 86 0
      fs-service/src/main/resources/mapper/qw/FsDoctorMemberSalesMapper.xml
  19. 3 1
      fs-service/src/main/resources/mapper/qw/QwExternalContactMapper.xml

+ 6 - 1
fs-company/src/main/java/com/fs/company/controller/company/FsDoctorController.java

@@ -143,6 +143,11 @@ public class FsDoctorController extends BaseController
         return getDataTable(list);
     }
 
-
+    @GetMapping("/options")
+    public TableDataInfo options()
+    {
+        List<OptionsVO> optionsVOS = fsDoctorService.selectDoctorOptionsType1();
+        return getDataTable(optionsVOS);
+    }
 
 }

+ 44 - 0
fs-company/src/main/java/com/fs/company/controller/qw/FsDoctorMemberSalesController.java

@@ -0,0 +1,44 @@
+package com.fs.company.controller.qw;
+
+
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
+import com.fs.common.utils.ServletUtils;
+import com.fs.company.domain.CompanyUser;
+import com.fs.framework.security.LoginUser;
+import com.fs.framework.service.TokenService;
+import com.fs.qw.param.MemberSalesParam;
+import com.fs.qw.service.IFsDoctorMemberSalesService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 医生会员搭销控制层
+ */
+@Slf4j
+@RestController
+@RequestMapping("/qw/memberSales")
+public class FsDoctorMemberSalesController extends BaseController {
+
+    @Autowired
+    private IFsDoctorMemberSalesService doctorMemberSalesService;
+
+    @Autowired
+    private TokenService tokenService;
+
+
+    @PostMapping("/push")
+    public R push(@RequestBody MemberSalesParam param) {
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        CompanyUser user = loginUser.getUser();
+        param.setCompanyId(user.getCompanyId());
+        param.setCompanyUserId(user.getUserId());
+
+        return doctorMemberSalesService.push(param);
+    }
+}

+ 3 - 0
fs-service/src/main/java/com/fs/his/domain/FsSopDoctorTask.java

@@ -49,4 +49,7 @@ public class FsSopDoctorTask extends BaseEntity{
 
     /** qw_external_contact表主键 */
     private Long qwExternalContactId;
+
+    //医生会员搭销id
+    private Long doctorMemberSalesId;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/his/domain/FsStoreOrder.java

@@ -285,4 +285,7 @@ public class FsStoreOrder extends BaseEntity
 
     //ERP类型:1-聚水潭 2-兔灵
     private Integer erpType;
+
+    //是签收时通知 0否 1是
+    private Integer isReceiveNotice;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/his/mapper/FsDoctorMapper.java

@@ -214,4 +214,7 @@ public interface FsDoctorMapper
             "</script>"})
     List<FsDoctorVO> selectDocVOByNameAndPhone(@Param("param") FsDoctorParam param);
     String selectDoctorNameByIds(@Param("doctorIds") String doctorIds);
+
+    @Select("select doctor_id dictValue,doctor_name dictLabel from fs_doctor where doctor_type=1 and  is_audit=1 and status = 1")
+    List<OptionsVO> selectDoctorOptionsType1();
 }

+ 2 - 0
fs-service/src/main/java/com/fs/his/service/IFsDoctorService.java

@@ -109,4 +109,6 @@ public interface IFsDoctorService
     String selectDoctorByIds(String doctorId);
 
     List<FsDoctorVO> selectDocVOByNameAndPhone(FsDoctorParam param);
+
+    List<OptionsVO> selectDoctorOptionsType1();
 }

+ 5 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsDoctorServiceImpl.java

@@ -514,6 +514,11 @@ public class FsDoctorServiceImpl implements IFsDoctorService
         return fsDoctorMapper.selectDocVOByNameAndPhone(param);
     }
 
+    @Override
+    public List<OptionsVO> selectDoctorOptionsType1() {
+        return fsDoctorMapper.selectDoctorOptionsType1();
+    }
+
     public static BufferedImage convertCircular(BufferedImage bi1) throws IOException {
         // 透明底的图片
         BufferedImage bi2 = new BufferedImage(bi1.getWidth(), bi1.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);

+ 44 - 0
fs-service/src/main/java/com/fs/qw/domain/FsDoctorMemberSales.java

@@ -0,0 +1,44 @@
+package com.fs.qw.domain;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+import com.fs.common.core.domain.BaseEntity;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 医生会员搭销对象 fs_doctor_member_sales
+ *
+ * @author fs
+ * @date 2026-01-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsDoctorMemberSales extends BaseEntity{
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 企业外部联系人id */
+    @Excel(name = "企业外部联系人id")
+    private Long exId;
+
+    /** 会员id */
+    @Excel(name = "会员id")
+    private Long fsUserId;
+
+    /** 销售id */
+    @Excel(name = "销售id")
+    private Long companyUserId;
+
+    /** 销售公司 */
+    @Excel(name = "销售公司")
+    private Long companyId;
+
+    /** 医生id */
+    @Excel(name = "医生id")
+    private Long doctorId;
+
+
+}

+ 3 - 0
fs-service/src/main/java/com/fs/qw/domain/QwExternalContact.java

@@ -154,4 +154,7 @@ public class QwExternalContact extends BaseEntity
     //升单商品是否已购 1未购 2已购
     private Integer isUpsellProductBuy;
 
+    //是否已推送给医生 0否 1是
+    private Integer isPush;
+
 }

+ 61 - 0
fs-service/src/main/java/com/fs/qw/mapper/FsDoctorMemberSalesMapper.java

@@ -0,0 +1,61 @@
+package com.fs.qw.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.fs.qw.domain.FsDoctorMemberSales;
+
+/**
+ * 医生会员搭销Mapper接口
+ * 
+ * @author fs
+ * @date 2026-01-13
+ */
+public interface FsDoctorMemberSalesMapper extends BaseMapper<FsDoctorMemberSales>{
+    /**
+     * 查询医生会员搭销
+     * 
+     * @param id 医生会员搭销主键
+     * @return 医生会员搭销
+     */
+    FsDoctorMemberSales selectFsDoctorMemberSalesById(Long id);
+
+    /**
+     * 查询医生会员搭销列表
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 医生会员搭销集合
+     */
+    List<FsDoctorMemberSales> selectFsDoctorMemberSalesList(FsDoctorMemberSales fsDoctorMemberSales);
+
+    /**
+     * 新增医生会员搭销
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 结果
+     */
+    int insertFsDoctorMemberSales(FsDoctorMemberSales fsDoctorMemberSales);
+
+    /**
+     * 修改医生会员搭销
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 结果
+     */
+    int updateFsDoctorMemberSales(FsDoctorMemberSales fsDoctorMemberSales);
+
+    /**
+     * 删除医生会员搭销
+     * 
+     * @param id 医生会员搭销主键
+     * @return 结果
+     */
+    int deleteFsDoctorMemberSalesById(Long id);
+
+    /**
+     * 批量删除医生会员搭销
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsDoctorMemberSalesByIds(Long[] ids);
+}

+ 22 - 0
fs-service/src/main/java/com/fs/qw/param/MemberSalesParam.java

@@ -0,0 +1,22 @@
+package com.fs.qw.param;
+
+import lombok.Data;
+
+@Data
+public class MemberSalesParam {
+
+    //企业外部联系人id
+    private Long exId;
+
+    //医生id
+    private Long doctorId;
+
+    //销售公司id
+    private Long companyId;
+
+    //销售id
+    private Long companyUserId;
+
+    //会员id
+    private Long fsUserId;
+}

+ 70 - 0
fs-service/src/main/java/com/fs/qw/service/IFsDoctorMemberSalesService.java

@@ -0,0 +1,70 @@
+package com.fs.qw.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fs.common.core.domain.R;
+import com.fs.qw.domain.FsDoctorMemberSales;
+import com.fs.qw.param.MemberSalesParam;
+
+/**
+ * 医生会员搭销Service接口
+ * 
+ * @author fs
+ * @date 2026-01-13
+ */
+public interface IFsDoctorMemberSalesService extends IService<FsDoctorMemberSales>{
+
+
+    /**
+     * 推送搭销会员
+     */
+    R push(MemberSalesParam param);
+
+    /**
+     * 查询医生会员搭销
+     * 
+     * @param id 医生会员搭销主键
+     * @return 医生会员搭销
+     */
+    FsDoctorMemberSales selectFsDoctorMemberSalesById(Long id);
+
+    /**
+     * 查询医生会员搭销列表
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 医生会员搭销集合
+     */
+    List<FsDoctorMemberSales> selectFsDoctorMemberSalesList(FsDoctorMemberSales fsDoctorMemberSales);
+
+    /**
+     * 新增医生会员搭销
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 结果
+     */
+    int insertFsDoctorMemberSales(FsDoctorMemberSales fsDoctorMemberSales);
+
+    /**
+     * 修改医生会员搭销
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 结果
+     */
+    int updateFsDoctorMemberSales(FsDoctorMemberSales fsDoctorMemberSales);
+
+    /**
+     * 批量删除医生会员搭销
+     * 
+     * @param ids 需要删除的医生会员搭销主键集合
+     * @return 结果
+     */
+    int deleteFsDoctorMemberSalesByIds(Long[] ids);
+
+    /**
+     * 删除医生会员搭销信息
+     * 
+     * @param id 医生会员搭销主键
+     * @return 结果
+     */
+    int deleteFsDoctorMemberSalesById(Long id);
+}

+ 151 - 0
fs-service/src/main/java/com/fs/qw/service/impl/FsDoctorMemberSalesServiceImpl.java

@@ -0,0 +1,151 @@
+package com.fs.qw.service.impl;
+
+import java.util.List;
+
+import com.fs.common.core.domain.R;
+import com.fs.common.utils.DateUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.his.domain.FsSopDoctorTask;
+import com.fs.his.mapper.FsSopDoctorTaskMapper;
+import com.fs.qw.domain.QwExternalContact;
+import com.fs.qw.mapper.QwExternalContactMapper;
+import com.fs.qw.param.MemberSalesParam;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.fs.qw.mapper.FsDoctorMemberSalesMapper;
+import com.fs.qw.domain.FsDoctorMemberSales;
+import com.fs.qw.service.IFsDoctorMemberSalesService;
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * 医生会员搭销Service业务层处理
+ * 
+ * @author fs
+ * @date 2026-01-13
+ */
+@Service
+public class FsDoctorMemberSalesServiceImpl extends ServiceImpl<FsDoctorMemberSalesMapper, FsDoctorMemberSales> implements IFsDoctorMemberSalesService {
+
+    @Autowired
+    private FsDoctorMemberSalesMapper memberSalesMapper;
+
+    @Autowired
+    private FsSopDoctorTaskMapper sopDoctorTaskMapper;
+
+    @Autowired
+    private QwExternalContactMapper externalContactMapper;
+
+    @Override
+    public R push(MemberSalesParam param) {
+
+        QwExternalContact qwExternalContact = externalContactMapper.selectQwExternalContactById(param.getExId());
+        if (qwExternalContact == null) {
+            return R.error("没有外部联系信息");
+        }
+        if (qwExternalContact.getIsPush() == 1) {
+            return R.error("会员已推送,推送失败");
+        }
+
+        FsDoctorMemberSales memberSales = new FsDoctorMemberSales();
+        BeanUtils.copyProperties(param, memberSales);
+        memberSales.setCreateTime(DateUtils.getNowDate());
+
+        if(memberSalesMapper.insertFsDoctorMemberSales(memberSales) > 0){
+            //插入第一次推送时随访待处理
+            FsSopDoctorTask doctorTask = new FsSopDoctorTask();
+            doctorTask.setDoctorId(memberSales.getDoctorId());
+            doctorTask.setStatus(0);
+            doctorTask.setCreateTime(DateUtils.getNowDate());
+            doctorTask.setQwExternalContactId(memberSales.getExId());
+            doctorTask.setCompanyUserId(memberSales.getCompanyUserId());
+            doctorTask.setRemark("新推送会员,第一随访");
+            doctorTask.setUserId(memberSales.getFsUserId());
+            doctorTask.setDoctorMemberSalesId(memberSales.getId());
+            sopDoctorTaskMapper.insertFsSopDoctorTask(doctorTask);
+
+            //更新企业外部联系人推送状态
+            QwExternalContact map = new QwExternalContact();
+            map.setId(param.getExId());
+            map.setIsPush(1);
+            externalContactMapper.updateQwExternalContact(map);
+            return R.ok("推送成功");
+        }
+
+        return R.error("推送失败");
+    }
+
+    /**
+     * 查询医生会员搭销
+     * 
+     * @param id 医生会员搭销主键
+     * @return 医生会员搭销
+     */
+    @Override
+    public FsDoctorMemberSales selectFsDoctorMemberSalesById(Long id)
+    {
+        return baseMapper.selectFsDoctorMemberSalesById(id);
+    }
+
+    /**
+     * 查询医生会员搭销列表
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 医生会员搭销
+     */
+    @Override
+    public List<FsDoctorMemberSales> selectFsDoctorMemberSalesList(FsDoctorMemberSales fsDoctorMemberSales)
+    {
+        return baseMapper.selectFsDoctorMemberSalesList(fsDoctorMemberSales);
+    }
+
+    /**
+     * 新增医生会员搭销
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 结果
+     */
+    @Override
+    public int insertFsDoctorMemberSales(FsDoctorMemberSales fsDoctorMemberSales)
+    {
+        fsDoctorMemberSales.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsDoctorMemberSales(fsDoctorMemberSales);
+    }
+
+    /**
+     * 修改医生会员搭销
+     * 
+     * @param fsDoctorMemberSales 医生会员搭销
+     * @return 结果
+     */
+    @Override
+    public int updateFsDoctorMemberSales(FsDoctorMemberSales fsDoctorMemberSales)
+    {
+        fsDoctorMemberSales.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsDoctorMemberSales(fsDoctorMemberSales);
+    }
+
+    /**
+     * 批量删除医生会员搭销
+     * 
+     * @param ids 需要删除的医生会员搭销主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsDoctorMemberSalesByIds(Long[] ids)
+    {
+        return baseMapper.deleteFsDoctorMemberSalesByIds(ids);
+    }
+
+    /**
+     * 删除医生会员搭销信息
+     * 
+     * @param id 医生会员搭销主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsDoctorMemberSalesById(Long id)
+    {
+        return baseMapper.deleteFsDoctorMemberSalesById(id);
+    }
+}

+ 1 - 3
fs-service/src/main/java/com/fs/qw/service/impl/QwExternalContactServiceImpl.java

@@ -5868,9 +5868,7 @@ public class QwExternalContactServiceImpl extends ServiceImpl<QwExternalContactM
                         param.setCorpId(sop.getCorpId());
                         param.setUserIds(Lists.newArrayList(contact.getId()));
                         param.setTagIds(Lists.newArrayList(sop.getProductTag()));
-                        logger.info("param:{}",param);
-                        R r = addUserTag(param);
-                        logger.info("r:{}",r.getMsg());
+                        addUserTag(param);
 
                         //更新外部联系是否已购字段
                         QwExternalContact map = new QwExternalContact();

+ 3 - 0
fs-service/src/main/java/com/fs/qw/vo/QwExternalContactVO.java

@@ -124,4 +124,7 @@ public class QwExternalContactVO {
      * 是否回复
      */
     private Integer isReply;
+
+    //是否已推送 0否 1是
+    private Integer isPush;
 }

+ 2 - 0
fs-service/src/main/resources/mapper/his/FsSopDoctorTaskMapper.xml

@@ -131,6 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCode != null">order_code,</if>
             <if test="type != null">type,</if>
             <if test="qwExternalContactId != null">qw_external_contact_id,</if>
+            <if test="doctorMemberSalesId != null">doctor_member_sales_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="companyUserId != null">#{companyUserId},</if>
@@ -144,6 +145,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orderCode != null">#{orderCode},</if>
             <if test="type != null">#{type},</if>
             <if test="qwExternalContactId != null">#{qwExternalContactId},</if>
+            <if test="doctorMemberSalesId != null">#{doctorMemberSalesId},</if>
          </trim>
     </insert>
 

+ 1 - 0
fs-service/src/main/resources/mapper/his/FsStoreOrderMapper.xml

@@ -443,6 +443,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="zyyDivAmount != null and zyyDivAmount != ''">zyy_div_amount = #{zyyDivAmount},</if>
             <if test="tagNames != null and tagNames != ''">tag_names = #{tagNames},</if>
             <if test="erpType != null">erp_type = #{erpType},</if>
+            <if test="isReceiveNotice != null">is_receive_notice = #{isReceiveNotice},</if>
         </trim>
         where order_id = #{orderId}
     </update>

+ 86 - 0
fs-service/src/main/resources/mapper/qw/FsDoctorMemberSalesMapper.xml

@@ -0,0 +1,86 @@
+<?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.qw.mapper.FsDoctorMemberSalesMapper">
+    
+    <resultMap type="FsDoctorMemberSales" id="FsDoctorMemberSalesResult">
+        <result property="id"    column="id"    />
+        <result property="exId"    column="ex_id"    />
+        <result property="fsUserId"    column="fs_user_id"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="companyUserId"    column="company_user_id"    />
+        <result property="companyId"    column="company_id"    />
+        <result property="doctorId"    column="doctor_id"    />
+    </resultMap>
+
+    <sql id="selectFsDoctorMemberSalesVo">
+        select id, ex_id, fs_user_id, create_time, update_time, company_user_id, company_id, doctor_id from fs_doctor_member_sales
+    </sql>
+
+    <select id="selectFsDoctorMemberSalesList" parameterType="FsDoctorMemberSales" resultMap="FsDoctorMemberSalesResult">
+        <include refid="selectFsDoctorMemberSalesVo"/>
+        <where>  
+            <if test="exId != null "> and ex_id = #{exId}</if>
+            <if test="fsUserId != null "> and fs_user_id = #{fsUserId}</if>
+            <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
+            <if test="companyId != null "> and company_id = #{companyId}</if>
+            <if test="doctorId != null "> and doctor_id = #{doctorId}</if>
+        </where>
+    </select>
+    
+    <select id="selectFsDoctorMemberSalesById" parameterType="Long" resultMap="FsDoctorMemberSalesResult">
+        <include refid="selectFsDoctorMemberSalesVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertFsDoctorMemberSales" parameterType="FsDoctorMemberSales" useGeneratedKeys="true" keyProperty="id">
+        insert into fs_doctor_member_sales
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="exId != null">ex_id,</if>
+            <if test="fsUserId != null">fs_user_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="companyUserId != null">company_user_id,</if>
+            <if test="companyId != null">company_id,</if>
+            <if test="doctorId != null">doctor_id,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="exId != null">#{exId},</if>
+            <if test="fsUserId != null">#{fsUserId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="companyUserId != null">#{companyUserId},</if>
+            <if test="companyId != null">#{companyId},</if>
+            <if test="doctorId != null">#{doctorId},</if>
+         </trim>
+    </insert>
+
+    <update id="updateFsDoctorMemberSales" parameterType="FsDoctorMemberSales">
+        update fs_doctor_member_sales
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="exId != null">ex_id = #{exId},</if>
+            <if test="fsUserId != null">fs_user_id = #{fsUserId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
+            <if test="companyId != null">company_id = #{companyId},</if>
+            <if test="doctorId != null">doctor_id = #{doctorId},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFsDoctorMemberSalesById" parameterType="Long">
+        delete from fs_doctor_member_sales where id = #{id}
+    </delete>
+
+    <delete id="deleteFsDoctorMemberSalesByIds" parameterType="String">
+        delete from fs_doctor_member_sales where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 3 - 1
fs-service/src/main/resources/mapper/qw/QwExternalContactMapper.xml

@@ -44,10 +44,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="lastWatchTime"    column="last_watch_time"    />
         <result property="registerTime"    column="register_time"    />
         <result property="isReply"    column="is_reply"    />
+        <result property="isPush"    column="is_push"    />
     </resultMap>
 
     <sql id="selectQwExternalContactVo">
-        select id,qw_user_id,register_time,state,way_id,stage_status,first_time,open_id,is_interact,level, unionid, user_id,transfer_time,loss_time,del_time,transfer_num, external_user_id,transfer_status,status,create_time, name, avatar, type, gender, remark, description, tag_ids, remark_mobiles, remark_corp_name, add_way, oper_userid, corp_id, company_id, company_user_id, customer_id, fs_user_id,is_reply from qw_external_contact
+        select id,qw_user_id,register_time,state,way_id,stage_status,first_time,open_id,is_interact,level, unionid, user_id,transfer_time,loss_time,del_time,transfer_num, external_user_id,transfer_status,status,create_time, name, avatar, type, gender, remark, description, tag_ids, remark_mobiles, remark_corp_name, add_way, oper_userid, corp_id, company_id, company_user_id, customer_id, fs_user_id,is_reply,is_push from qw_external_contact
     </sql>
 
     <select id="selectQwExternalContactList" parameterType="QwExternalContact" resultMap="QwExternalContactResult">
@@ -350,6 +351,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="registerTime != null">register_time = #{registerTime},</if>
             <if test="isProductBuy != null">is_product_buy = #{isProductBuy},</if>
             <if test="isUpsellProductBuy != null">is_upsell_product_buy = #{isUpsellProductBuy},</if>
+            <if test="isPush != null">is_push = #{isPush},</if>
         </trim>
         where id = #{id}
     </update>