Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

zyp 4 napja
szülő
commit
d3dc1d2ac6
19 módosított fájl, 217 hozzáadás és 5 törlés
  1. 1 0
      fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreAfterSalesScrmController.java
  2. 1 0
      fs-admin/src/main/java/com/fs/live/controller/LiveAfterSalesController.java
  3. 13 2
      fs-company/src/main/java/com/fs/company/controller/live/LiveWatchLogController.java
  4. 6 0
      fs-service/src/main/java/com/fs/hisStore/domain/FsStoreAfterSalesScrm.java
  5. 4 1
      fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreAfterSalesScrmMapper.java
  6. 2 0
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreAfterSalesVO.java
  7. 3 0
      fs-service/src/main/java/com/fs/hisStore/vo/FsStoreOrderItemExportRefundZMVO.java
  8. 3 0
      fs-service/src/main/java/com/fs/live/mapper/LiveWatchLogMapper.java
  9. 8 0
      fs-service/src/main/java/com/fs/live/service/ILiveWatchLogService.java
  10. 10 0
      fs-service/src/main/java/com/fs/live/service/impl/LiveWatchLogServiceImpl.java
  11. 6 0
      fs-service/src/main/java/com/fs/live/vo/LiveAfterSalesVo.java
  12. 118 0
      fs-service/src/main/java/com/fs/live/vo/LiveWatchLogListVO.java
  13. 1 0
      fs-service/src/main/resources/application-config-dev-jnlzjk.yml
  14. 1 0
      fs-service/src/main/resources/application-config-druid-hsyy.yml
  15. 1 0
      fs-service/src/main/resources/application-config-druid-jnlzjk.yml
  16. 1 0
      fs-service/src/main/resources/application-config-druid-sxjz.yml
  17. 1 1
      fs-service/src/main/resources/application-druid-sxjz.yml
  18. 2 1
      fs-service/src/main/resources/mapper/live/LiveAfterSalesMapper.xml
  19. 35 0
      fs-service/src/main/resources/mapper/live/LiveWatchLogMapper.xml

+ 1 - 0
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreAfterSalesScrmController.java

@@ -106,6 +106,7 @@ public class FsStoreAfterSalesScrmController extends BaseController
                     .map(vo -> {
                         FsStoreOrderItemExportRefundZMVO zmvo = new FsStoreOrderItemExportRefundZMVO();
                         try {
+                            zmvo.setPayCode(vo.getPayCode());
                             zmvo.setOrderCode(vo.getOrderCode());
                             zmvo.setStatus(vo.getOrderStatus().toString());
                             zmvo.setUserId(vo.getUserId());

+ 1 - 0
fs-admin/src/main/java/com/fs/live/controller/LiveAfterSalesController.java

@@ -120,6 +120,7 @@ public class LiveAfterSalesController extends BaseController
                     .map(vo -> {
                         FsStoreOrderItemExportRefundZMVO zmvo = new FsStoreOrderItemExportRefundZMVO();
                         try {
+                            zmvo.setPayCode(vo.getPayCode());
                             zmvo.setOrderCode(vo.getOrderCode());
                             zmvo.setStatus(vo.getOrderStatus().toString());
                             zmvo.setUserId(vo.getUserId());

+ 13 - 2
fs-company/src/main/java/com/fs/company/controller/live/LiveWatchLogController.java

@@ -3,6 +3,10 @@ package com.fs.company.controller.live;
 import java.util.List;
 
 import com.fs.common.core.domain.R;
+import com.fs.common.utils.ServletUtils;
+import com.fs.framework.security.LoginUser;
+import com.fs.framework.service.TokenService;
+import com.fs.live.vo.LiveWatchLogListVO;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -34,7 +38,8 @@ public class LiveWatchLogController extends BaseController
 {
     @Autowired
     private ILiveWatchLogService liveWatchLogService;
-
+    @Autowired
+    private TokenService tokenService;
     /**
      * 查询直播看课记录列表
      */
@@ -43,7 +48,13 @@ public class LiveWatchLogController extends BaseController
     public TableDataInfo list(LiveWatchLog liveWatchLog)
     {
         startPage();
-        List<LiveWatchLog> list = liveWatchLogService.selectLiveWatchLogList(liveWatchLog);
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        if(null == loginUser) {
+           throw new RuntimeException("用户信息错误");
+        }
+        Long companyId = loginUser.getCompany().getCompanyId();
+        liveWatchLog.setCompanyId(companyId);
+        List<LiveWatchLogListVO> list = liveWatchLogService.selectLiveWatchLogListInfo(liveWatchLog);
         return getDataTable(list);
     }
 

+ 6 - 0
fs-service/src/main/java/com/fs/hisStore/domain/FsStoreAfterSalesScrm.java

@@ -144,4 +144,10 @@ public class FsStoreAfterSalesScrm extends BaseEntity
     @TableField(exist = false)
     private String productName;
 
+    /**
+     * 用于查询汇付订单号
+     */
+    @TableField(exist = false)
+    private String hfOrderCode;
+
 }

+ 4 - 1
fs-service/src/main/java/com/fs/hisStore/mapper/FsStoreAfterSalesScrmMapper.java

@@ -91,7 +91,7 @@ public interface FsStoreAfterSalesScrmMapper
             "cu.phonenumber as company_usere_phonenumber,o.pay_money,o.id as orderId,o.create_time as orderCreateTime,o.user_phone," +
             "o.real_name as userName,o.item_json,o.user_address,o.pay_time as orderPayTime,o.pay_price,o.total_postage," +
             "fsps.bank_serial_no,fsps.bank_transaction_id,o.delivery_id as orderDeliveryId,o.delivery_name as orderDeliveryName,o.delivery_sn as orderDeliverySn," +
-            "o.status as orderStatus " +
+            "o.status as orderStatus,fsps.pay_code as payCode " +
             " from fs_store_after_sales_scrm s " +
             " INNER join fs_store_order_scrm o on o.order_code=s.order_code " +
             " left join fs_user u on s.user_id=u.user_id " +
@@ -99,6 +99,9 @@ public interface FsStoreAfterSalesScrmMapper
             " left join company_user cu on cu.user_id=s.company_user_id " +
             " left join fs_store_payment_scrm fsps on fsps.business_order_id = o.id and fsps.status in (-1,1) " +
             " where 1=1 " +
+            "<if test =\"maps.hfOrderCode != null and  maps.hfOrderCode!='' \"> " +
+              "and fsps.pay_code = #{maps.hfOrderCode} " +
+            "</if>" +
             "<if test = 'maps.status != null    '> " +
             "and s.status = #{maps.status} " +
             "</if>" +

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreAfterSalesVO.java

@@ -143,4 +143,6 @@ public class FsStoreAfterSalesVO implements Serializable
     private String orderDeliverySn;
     private String orderDeliveryName;
     private String orderDeliveryId;
+
+    private String payCode;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/hisStore/vo/FsStoreOrderItemExportRefundZMVO.java

@@ -23,6 +23,9 @@ public class FsStoreOrderItemExportRefundZMVO implements Serializable  {
     @Excel(name = "订单号",sort = 1)
     private String orderCode;
 
+    @Excel(name = "支付单号",sort = 2)
+    private String payCode;
+
     @Excel(name = "订单状态", dictType = "store_order_status",sort = 10)
     private String status;
 

+ 3 - 0
fs-service/src/main/java/com/fs/live/mapper/LiveWatchLogMapper.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fs.common.annotation.DataSource;
 import com.fs.common.enums.DataSourceType;
 import com.fs.live.domain.LiveWatchLog;
+import com.fs.live.vo.LiveWatchLogListVO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -71,4 +72,6 @@ public interface LiveWatchLogMapper extends BaseMapper<LiveWatchLog> {
 
     List<LiveWatchLog> selectLiveWatchLogByLiveId(@Param("liveId")Long liveId);
 
+    List<LiveWatchLogListVO> selectLiveWatchLogListInfo(LiveWatchLog liveWatchLog);
+
 }

+ 8 - 0
fs-service/src/main/java/com/fs/live/service/ILiveWatchLogService.java

@@ -3,6 +3,7 @@ package com.fs.live.service;
 import java.util.List;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.fs.live.domain.LiveWatchLog;
+import com.fs.live.vo.LiveWatchLogListVO;
 
 /**
  * 直播看课记录Service接口
@@ -58,4 +59,11 @@ public interface ILiveWatchLogService extends IService<LiveWatchLog>{
      * @return 结果
      */
     int deleteLiveWatchLogByLogId(Long logId);
+
+    /**
+     * 查询列表信息
+     * @param liveWatchLog
+     * @return
+     */
+    List<LiveWatchLogListVO> selectLiveWatchLogListInfo(LiveWatchLog liveWatchLog);
 }

+ 10 - 0
fs-service/src/main/java/com/fs/live/service/impl/LiveWatchLogServiceImpl.java

@@ -3,6 +3,7 @@ package com.fs.live.service.impl;
 import java.util.List;
 import com.fs.common.utils.DateUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fs.live.vo.LiveWatchLogListVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.fs.live.mapper.LiveWatchLogMapper;
@@ -18,6 +19,9 @@ import com.fs.live.service.ILiveWatchLogService;
 @Service
 public class LiveWatchLogServiceImpl extends ServiceImpl<LiveWatchLogMapper, LiveWatchLog> implements ILiveWatchLogService {
 
+    @Autowired
+    private LiveWatchLogMapper liveWatchLogMapper;
+
     /**
      * 查询直播看课记录
      * 
@@ -42,6 +46,12 @@ public class LiveWatchLogServiceImpl extends ServiceImpl<LiveWatchLogMapper, Liv
         return baseMapper.selectLiveWatchLogList(liveWatchLog);
     }
 
+    @Override
+    public List<LiveWatchLogListVO> selectLiveWatchLogListInfo(LiveWatchLog liveWatchLog){
+
+        return liveWatchLogMapper.selectLiveWatchLogListInfo(liveWatchLog);
+    }
+
     /**
      * 新增直播看课记录
      * 

+ 6 - 0
fs-service/src/main/java/com/fs/live/vo/LiveAfterSalesVo.java

@@ -1,5 +1,6 @@
 package com.fs.live.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fs.common.annotation.Excel;
 import lombok.Data;
@@ -189,6 +190,11 @@ public class LiveAfterSalesVo {
     private String orderDeliverySn;
     private String orderDeliveryName;
     private String orderDeliveryId;
+    /**
+     * 用于查询汇付订单号
+     */
+    private String hfOrderCode;
 
+    private String payCode;
 
 }

+ 118 - 0
fs-service/src/main/java/com/fs/live/vo/LiveWatchLogListVO.java

@@ -0,0 +1,118 @@
+package com.fs.live.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fs.common.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * @author MixLiu
+ * @date 2025/12/15 下午3:40)
+ */
+
+@Data
+public class LiveWatchLogListVO {
+
+    /** 日志id */
+    private Long logId;
+
+    /** 用户userId */
+    @Excel(name = "用户userId")
+    private Long userId;
+
+    /** 直播间id */
+    @Excel(name = "直播间id")
+    private Long liveId;
+
+    /** 记录类型 1看课中 2完课 3待看课 4看课中断 */
+    @Excel(name = "记录类型 1看课中 2完课 3待看课 4看课中断")
+    private Integer logType;
+
+    /** 外部联系人id */
+    @Excel(name = "外部联系人id")
+    private Long externalContactId;
+
+    /** 销售id */
+    @Excel(name = "销售id")
+    private Long companyUserId;
+
+    /** 公司id */
+    @Excel(name = "公司id")
+    private Long companyId;
+
+    /** 完课时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "完课时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date finishTime;
+
+    /** sop最后创建时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "sop最后创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date sopCreateTime;
+
+    /** 发送小程序appid */
+    @Excel(name = "发送小程序appid")
+    private String sendAppId;
+
+    /** 日志创建来源:1、个人sop,2、群聊sop,3、一键群发 */
+    @Excel(name = "日志创建来源:1、个人sop,2、群聊sop,3、一键群发")
+    private Integer logSource;
+
+    /** 分享人企微id */
+    @Excel(name = "分享人企微id")
+    private String qwUserId;
+    /**
+     * 查看直播类型:1、直播,2、回放
+     */
+    private Integer watchType;
+
+    /**
+     * 企微主体id
+     */
+    private String corpId;
+
+    /**
+     * 直播购买
+     */
+    private Integer liveBuy;
+
+    /**
+     * 回放购买
+     */
+    private Integer replayBuy;
+
+    /**
+     * 会员昵称
+     */
+    private String userName;
+    /**
+     * 会员头像
+     */
+    private String userAvatar;
+
+    /**
+     * 外部联系人名称
+     */
+    private String qwExternalName;
+
+    /**
+     * 外部联系人头像
+     */
+    private String qwExternalAvatar;
+
+    /**
+     * 直播间名称
+     */
+    private String liveName;
+
+    /**
+     * 所属销售
+     */
+    private String companyUserName;
+
+    /**
+     * 企微用户
+     */
+    private String qwUserName;
+}

+ 1 - 0
fs-service/src/main/resources/application-config-dev-jnlzjk.yml

@@ -87,6 +87,7 @@ cloud_host:
   company_name: 济南联志健康
   projectCode: LZJK
   spaceName:
+  volcengineUrl: https://jnlzvolcengine.ylrztop.com
 headerImg:
   imgUrl:
 

+ 1 - 0
fs-service/src/main/resources/application-config-druid-hsyy.yml

@@ -83,6 +83,7 @@ cloud_host:
   company_name: 河山医院
   projectCode: heshanyy
   spaceName:
+  volcengineUrl:
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://hsyy-1348049832.cos.ap-chongqing.myqcloud.com/hsyy.jpg

+ 1 - 0
fs-service/src/main/resources/application-config-druid-jnlzjk.yml

@@ -88,6 +88,7 @@ cloud_host:
   company_name: 济南联志健康
   projectCode: LZJK
   spaceName:
+  volcengineUrl: https://jnlzvolcengine.ylrztop.com
 headerImg:
   imgUrl:
 

+ 1 - 0
fs-service/src/main/resources/application-config-druid-sxjz.yml

@@ -88,6 +88,7 @@ cloud_host:
   company_name: 今正科技
   projectCode: SXJZ
   spaceName:
+  volcengineUrl:
 #看课授权时显示的头像
 headerImg:
   imgUrl: https://jz-cos-1356808054.cos.ap-chengdu.myqcloud.com/fs/20250515/0877754b59814ea8a428fa3697b20e68.png

+ 1 - 1
fs-service/src/main/resources/application-druid-sxjz.yml

@@ -164,7 +164,7 @@ token:
 openIM:
     secret: openIM123
     userID: imAdmin
-    url: https://web.im.fbylive.com/api
+    url: https://web.im.xianhthj.cn/api
 #是否使用新im
 im:
     type: NONE

+ 2 - 1
fs-service/src/main/resources/mapper/live/LiveAfterSalesMapper.xml

@@ -68,7 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         las.order_status, las.create_time, las.is_del, las.user_id, las.consignee, las.phone_number, las.address, las.company_id, las.company_user_id, las.dept_id,
         cu.nick_name as company_user_nick_name, c.company_name,lo.order_id,lo.order_code,lo.user_phone,las.user_id,lo.item_json,lo.pay_time as orderPayTime,
         lo.user_address,lo.user_name,lo.pay_price,lo.total_postage,lop.bank_serial_no,lo.delivery_sn as orderDeliveryId,lo.delivery_name as orderDeliveryName,
-        lo.delivery_code as orderDeliverySn,lo.status as orderStatus,lop.bank_transaction_id,lo.pay_money
+        lo.delivery_code as orderDeliverySn,lo.status as orderStatus,lop.bank_transaction_id,lo.pay_money,lop.pay_code as payCode
         from live_after_sales las
         left join live_order lo on lo.order_id = las.order_id
         left join company_user cu on cu.user_id = las.company_user_id
@@ -79,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
 
         <where>
+            <if test="hfOrderCode != null and hfOrderCode != ''"> and lop.pay_code = #{hfOrderCode}</if>
             <if test="liveId != null and liveId != ''"> and las.live_id = #{liveId}</if>
             <if test="companyUserNickName != null and companyUserNickName != ''"> and cu.nick_name like concat(#{companyUserNickName},'%')</if>
             <if test="storeId != null and storeId != ''"> and las.store_id = #{storeId}</if>

+ 35 - 0
fs-service/src/main/resources/mapper/live/LiveWatchLogMapper.xml

@@ -210,4 +210,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectLiveWatchLogByLiveId" resultType="com.fs.live.domain.LiveWatchLog">
         select * from live_watch_log where live_id = #{liveId}
     </select>
+
+    <select id="selectLiveWatchLogListInfo"   parameterType="LiveWatchLog" resultType="com.fs.live.vo.LiveWatchLogListVO">
+        select
+        t2.nick_name as userName,
+        t2.avatar as userAvatar,
+        t3.live_name,
+        t4.name as qwExternalName,
+        t4.avatar as qwExternalAvatar,
+        t5.nick_name as companyUserName,
+        t6.qw_user_name,
+        t1.*
+        from live_watch_log t1
+        left join fs_user t2 on t1.user_id = t2.user_id
+        left join live t3 on t3.live_id = t1.live_id
+        left join qw_external_contact t4 on t4.id = t1.external_contact_id
+        left join company_user t5 on t5.user_id = t1.company_user_id
+        left join qw_user t6 on t6.id = t1.qw_user_id
+        <where>
+            <if test="userId != null "> and t1.user_id = #{userId}</if>
+            <if test="liveId != null "> and t1.live_id = #{liveId}</if>
+            <if test="logType != null "> and t1.log_type = #{logType}</if>
+            <if test="externalContactId != null "> and t1.external_contact_id = #{externalContactId}</if>
+            <if test="companyId != null "> and t1.company_id = #{companyId}</if>
+            <if test="companyUserId != null "> and t1.company_user_id = #{companyUserId}</if>
+            <if test="finishTime != null "> and t1.finish_time = #{finishTime}</if>
+            <if test="sopCreateTime != null "> and t1.sop_create_time = #{sopCreateTime}</if>
+            <if test="sendAppId != null  and sendAppId != ''"> and t1.send_app_id = #{sendAppId}</if>
+            <if test="logSource != null "> and t1.log_source = #{logSource}</if>
+            <if test="qwUserId != null  and qwUserId != ''"> and t1.qw_user_id = #{qwUserId}</if>
+            <if test="watchType != null">and t1.watch_type = #{watchType} </if>
+            <if test="corpId != null">and t1.corp_id = #{corpId} </if>
+            <if test="liveBuy != null">and t1.live_buy = #{liveBuy} </if>
+            <if test="replayBuy != null">and t1.replay_buy = #{replayBuy} </if>
+        </where>
+    </select>
 </mapper>