Bläddra i källkod

北京卓美视频小黄车关联销售

luolinsong 1 vecka sedan
förälder
incheckning
3acac5bccb

+ 4 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreOrderScrm.java

@@ -366,4 +366,8 @@ public class FsStoreOrderScrm extends BaseEntity
 
     // 线下支付金额
     private BigDecimal offlinePayAmount;
+    //视频ID
+    private Integer videoId;
+    //课程ID
+    private Integer courseId;
 }

+ 5 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderCreateParam.java

@@ -56,4 +56,9 @@ public class FsStoreOrderCreateParam implements Serializable
     private Integer orderMedium; //媒体来源
 
     private Boolean isUserApp = true;
+
+    //视频ID
+    private Integer videoId;
+    //课程ID
+    private Integer courseId;
 }

+ 7 - 0
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -134,6 +134,7 @@ import org.springframework.aop.framework.AopContext;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.ApplicationEventPublisher;
 import org.springframework.context.annotation.EnableAspectJAutoProxy;
 import org.springframework.context.annotation.Lazy;
@@ -408,6 +409,8 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
     @Autowired
     private FsUserCompanyPackageScrmMapper fsUserCompanyPackageScrmMapper;
 
+    @Value("${cloud_host.company_name}")
+    private String companyName;
     @PostConstruct
     public void initErpServiceMap() {
         erpServiceMap = new HashMap<>();
@@ -897,6 +900,10 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService {
             storeOrder.setCompanyId(param.getCompanyId());
             storeOrder.setCompanyUserId(param.getCompanyUserId());
 
+            if ("北京卓美".equals(companyName) && param.getVideoId()!=null){
+                storeOrder.setVideoId(param.getVideoId());
+                storeOrder.setCourseId(param.getCourseId());
+            }
             String json = configService.selectConfigByKey("store.config");
             StoreConfig config= JSONUtil.toBean(json, StoreConfig.class);
             //绑定销售

+ 9 - 0
fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

@@ -155,6 +155,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deliveryImportTime != null "> and delivery_import_time = #{deliveryImportTime}</if>
             <if test="backendEditProductType != null "> and backend_edit_product_type = #{backendEditProductType}</if>
             <if test="remark != null and remark != ''"> and remark = #{remark}</if>
+            <if test="videoId != null and videoId != ''"> and video_id = #{videoId}</if>
+            <if test="courseId != null and courseId != ''"> and course_id = #{courseId}</if>
         </where>
     </select>
 
@@ -260,6 +262,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="followDoctorId != null">follow_doctor_id,</if>
             <if test="cycle != null">cycle,</if>
             <if test="backendEditProductType != null">backend_edit_product_type,</if>
+            <if test="videoId != null">video_id,</if>
+            <if test="courseId != null" >course_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="orderCode != null and orderCode != ''">#{orderCode},</if>
@@ -347,6 +351,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="followDoctorId != null">#{followDoctorId},</if>
             <if test="cycle != null">#{cycle},</if>
             <if test="backendEditProductType != null">#{backendEditProductType},</if>
+            <if test="videoId != null">#{videoId},</if>
+            <if test="courseId != null" >#{courseId},</if>
          </trim>
     </insert>
 
@@ -441,6 +447,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="cycle != null">cycle = #{cycle},</if>
             <if test="orderRemark != null">order_remark = #{orderRemark},</if>
             <if test="backendEditProductType != null">backend_edit_product_type = #{backendEditProductType},</if>
+            <if test="videoId != null">video_id = #{videoId},</if>
+            <if test="courseId != null">course_id = #{courseId},</if>
+
         </trim>
         where id = #{id}
     </update>