Browse Source

Merge branch 'openImAndLive' of http://1.14.104.71:10880/root/ylrz_his_scrm_java into openImAndLive

caoliqin 2 days ago
parent
commit
39a25570e6

+ 2 - 0
fs-service/src/main/java/com/fs/company/domain/Company.java

@@ -135,5 +135,7 @@ public class Company extends BaseEntity
     private Integer maxPadNum;
     /** 所属部门id */
     private Long deptId;
+    /**经销售归属*/
+    private String companyBelongOwner;
 
 }

+ 2 - 0
fs-service/src/main/java/com/fs/company/vo/CompanyVO.java

@@ -95,4 +95,6 @@ public class CompanyVO implements Serializable
     private Integer usedNum;
     /** 所属部门id */
     private Long deptId;
+    /**经销售归属*/
+    private String companyBelongOwner;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/course/domain/FsUserWatchCourseStatistics.java

@@ -136,4 +136,7 @@ public class FsUserWatchCourseStatistics extends BaseEntity{
     @JsonFormat(pattern = "yyyy-MM-dd")
     private Date periodLine;
 
+    /** 经销售归属 */
+    private String companyBelongOwner;
+
 }

+ 3 - 0
fs-service/src/main/java/com/fs/course/domain/FsUserWatchStatistics.java

@@ -74,4 +74,7 @@ public class FsUserWatchStatistics extends BaseEntity{
     @Excel(name = "完播率")
     private String completeWatchRatePercent;
 
+    /** 经销售归属 */
+    private String companyBelongOwner;
+
 }

+ 1 - 0
fs-service/src/main/java/com/fs/course/service/impl/FsUserWatchStatisticsServiceImpl.java

@@ -161,6 +161,7 @@ public class FsUserWatchStatisticsServiceImpl extends ServiceImpl<FsUserWatchSta
                                 fsUserWatchStatistics.setPeriodStartingTime(item.getPeriodLine() != null ? item.getPeriodLine() : Date.from(zonedDateTime.toInstant()));
                                 fsUserWatchStatistics.setCompanyId(companyIdStr.trim());
                                 fsUserWatchStatistics.setCompanyName(company != null ? company.getCompanyName() : null);
+                                fsUserWatchStatistics.setCompanyBelongOwner(company != null ? company.getCompanyBelongOwner() : null);
                                 if (Objects.nonNull(userTotalMap)){
                                     FsUserWatchStatistics userTotalData = userTotalMap.get(fsUserWatchStatistics.getCompanyId());
                                     if(userTotalData != null){

+ 3 - 0
fs-service/src/main/resources/mapper/company/CompanyMapper.xml

@@ -122,6 +122,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="groupName != null">group_name,</if>
             <if test="maxPadNum != null">max_pad_num,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="companyBelongOwner != null">company_belong_owner,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="companyName != null">#{companyName},</if>
@@ -158,6 +159,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="groupName != null">#{groupName},</if>
             <if test="maxPadNum != null">#{maxPadNum},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="companyBelongOwner != null">#{companyBelongOwner},</if>
          </trim>
     </insert>
 
@@ -200,6 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="groupName != null">group_name = #{groupName},</if>
             <if test="maxPadNum != null">max_pad_num = #{maxPadNum},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="companyBelongOwner != null">company_belong_owner = #{companyBelongOwner},</if>
         </trim>
         where company_id = #{companyId}
     </update>

+ 1 - 1
fs-service/src/main/resources/mapper/course/FsUserCoursePeriodDaysMapper.xml

@@ -225,7 +225,7 @@
              ,b.course_name
              ,c.title as videoTitle
              ,period.period_name,period.period_starting_time,period.period_line
-             ,company.company_id,company.company_name
+             ,company.company_id,company.company_name,company.company_belong_owner
              ,company_user.user_id as companyUserId, company_user.nick_name as companyUserName
         FROM
             fs_user_course_period_days a

+ 6 - 2
fs-service/src/main/resources/mapper/course/FsUserWatchCourseStatisticsMapper.xml

@@ -29,10 +29,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="answerRightRate"    column="answer_right_rate"    />
         <result property="redPacketNum"    column="red_packet_num"    />
         <result property="redPacketAmount"    column="red_packet_amount"    />
+        <result property="companyBelongOwner"    column="company_belong_owner"    />
     </resultMap>
 
     <sql id="selectFsUserWatchCourseStatisticsVo">
-        select id, period_id, period_name, course_id, course_name, video_id, video_title, company_id, company_name, company_user_id, course_start_date_time, company_user_name, period_starting_time, new_user_num, user_num, watch_num, complete_watch_num, online_rate, complete_watch_rate, answer_num, answer_right_num, answer_right_rate, red_packet_num, red_packet_amount from fs_user_watch_course_statistics
+        select id, period_id, period_name, course_id, course_name, video_id, video_title, company_id, company_name, company_user_id, course_start_date_time, company_user_name, period_starting_time, new_user_num, user_num, watch_num, complete_watch_num, online_rate, complete_watch_rate, answer_num, answer_right_num, answer_right_rate, red_packet_num, red_packet_amount,company_belong_owner from fs_user_watch_course_statistics
     </sql>
 
     <select id="selectFsUserWatchCourseStatisticsList" parameterType="FsUserWatchCourseStatistics" resultMap="FsUserWatchCourseStatisticsResult">
@@ -93,7 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         ), 0
         ) as complete_watch_rate,
         sum(red_packet_num) as red_packet_num,
-        sum(red_packet_amount) as red_packet_amount
+        sum(red_packet_amount) as red_packet_amount,
+        company_belong_owner
         from fs_user_watch_course_statistics
         <where>
             <if test="periodId != null "> and period_id = #{periodId}</if>
@@ -250,6 +252,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="redPacketNum != null">red_packet_num,</if>
             <if test="redPacketAmount != null">red_packet_amount,</if>
             <if test="createTime != null">create_time,</if>
+            <if test="companyBelongOwner != null">company_belong_owner,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="periodId != null">#{periodId},</if>
@@ -276,6 +279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="redPacketNum != null">#{redPacketNum},</if>
             <if test="redPacketAmount != null">#{redPacketAmount},</if>
             <if test="createTime != null">#{createTime},</if>
+            <if test="companyBelongOwner != null">#{companyBelongOwner},</if>
         </trim>
         on duplicate key update
         <trim suffixOverrides=",">

+ 4 - 1
fs-service/src/main/resources/mapper/course/FsUserWatchStatisticsMapper.xml

@@ -17,10 +17,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="completeWatchNum"    column="complete_watch_num"    />
         <result property="onlineRate"    column="online_rate"    />
         <result property="completeWatchRate"    column="complete_watch_rate"    />
+        <result property="companyBelongOwner"    column="company_belong_owner"    />
     </resultMap>
 
     <sql id="selectFsUserWatchStatisticsVo">
-        select id, period_id, period_name, period_starting_time, new_user_num, user_num, watch_num, complete_watch_num, online_rate, complete_watch_rate, company_id, company_name from fs_user_watch_statistics
+        select id, period_id, period_name, period_starting_time, new_user_num, user_num, watch_num, complete_watch_num, online_rate, complete_watch_rate, company_id, company_name,company_belong_owner from fs_user_watch_statistics
     </sql>
 
     <select id="selectFsUserWatchStatisticsList" parameterType="FsUserWatchStatistics" resultMap="FsUserWatchStatisticsResult">
@@ -142,6 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="completeWatchRate != null">complete_watch_rate,</if>
             <if test="onlineRate != null">online_rate,</if>
             <if test="createTime != null">create_time,</if>
+            <if test="companyBelongOwner != null">company_belong_owner,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="periodId != null">#{periodId},</if>
@@ -156,6 +158,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="onlineRate != null">#{onlineRate},</if>
             <if test="completeWatchRate != null">#{completeWatchRate},</if>
             <if test="createTime != null">#{createTime},</if>
+            <if test="companyBelongOwner != null">#{companyBelongOwner},</if>
         </trim>
         on duplicate key update
         <trim suffixOverrides=",">