Просмотр исходного кода

Merge remote-tracking branch 'origin/V1.1.3' into V1.1.3

zhaoxian 4 лет назад
Родитель
Сommit
add6fdc0f5

+ 2 - 0
module-common/src/main/java/cn/com/ctop/common/module/mapper/SysUserMapper.java

@@ -170,4 +170,6 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
     List<SysUserVo> getAllSalesByCompanyId(@Param("companyId") String companyId);
 
     JSONObject selectUserByAccount(@Param("accountId") Long accountId);
+
+    SysUser getDesignerTeamLeaderBy(@Param("orgCode")String orgCode);
 }

+ 11 - 0
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/SysUserMapper.xml

@@ -260,4 +260,15 @@ SELECT
             where role.role_code in ('plane','plan','shot','clip','designTeamLeader')
             and user.status = 1
     </select>
+    <select id="getDesignerTeamLeaderBy" resultType="cn.com.ctop.common.module.entity.SysUser">
+        SELECT
+            user2.realname,user2.id
+        FROM sys_user user2
+        LEFT JOIN sys_user_role userRole ON user2.id = userRole.user_id
+        LEFT JOIN sys_role role ON userRole.role_id = role.id
+        WHERE
+            user2.org_code = #{orgCode}
+        AND
+            role.role_code = 'designTeamLeader'
+    </select>
 </mapper>

+ 1 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/ISysUserService.java

@@ -263,4 +263,5 @@ public interface ISysUserService extends IService<SysUser> {
 
     List<SysUser> getAllDesigner();
 
+    SysUser getDesignerTeamLeaderBy(String orgCode);
 }

+ 5 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/SysUserServiceImpl.java

@@ -278,6 +278,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
     }
 
     @Override
+    public SysUser getDesignerTeamLeaderBy(String orgCode) {
+        return userMapper.getDesignerTeamLeaderBy(orgCode);
+    }
+
+    @Override
     public Map<String, String> getDepNamesByUserIds(List<String> userIds) {
         List<SysUserDepVo> list = this.baseMapper.getDepNamesByUserIds(userIds);
         Map<String, String> res = new HashMap<String, String>();

+ 12 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/EtlKuaishouVideoInfoServiceImpl.java

@@ -1,8 +1,10 @@
 package cn.com.ctop.kuaishou.modules.material.service.impl;
 
 import cn.com.ctop.common.module.entity.MaterialAscription;
+import cn.com.ctop.common.module.entity.SysUser;
 import cn.com.ctop.common.module.entity.UserCompany;
 import cn.com.ctop.common.module.service.IMaterialAscriptionService;
+import cn.com.ctop.common.module.service.ISysUserService;
 import cn.com.ctop.common.module.service.IUserCompanyService;
 import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet;
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouVideoGetService;
@@ -37,6 +39,8 @@ public class EtlKuaishouVideoInfoServiceImpl extends ServiceImpl<EtlKuaishouVide
     private IMaterialAscriptionService ascriptionService;
     @Autowired
     private IUserCompanyService userCompanyService;
+    @Autowired
+    private ISysUserService sysUserService;
     @Override
     public void etlKuaishouVideoInfo(String date) {
         //1:查询当前日期内的所有存在md5码信息的视频数据
@@ -63,6 +67,13 @@ public class EtlKuaishouVideoInfoServiceImpl extends ServiceImpl<EtlKuaishouVide
                         if(null!=userCompany){
                             etlKuaishouVideoInfo.setCompanyName(userCompany.getCompanyName());
                         }
+                        //根据id查询剪辑所属的设计负责人
+                        SysUser user = sysUserService.getById(clipId);
+                        SysUser designTeamLeader = sysUserService.getDesignerTeamLeaderBy(user.getOrgCode());
+                        if(null!=designTeamLeader){
+                            etlKuaishouVideoInfo.setDesignTeamLeaderId(designTeamLeader.getId());
+                            etlKuaishouVideoInfo.setDesignTeamLeaderName(designTeamLeader.getRealname());
+                        }
                     }
                     String clipName = ascription.getString("clipName");
                     if(null!=clipName&&!clipName.trim().equals("")){
@@ -78,7 +89,7 @@ public class EtlKuaishouVideoInfoServiceImpl extends ServiceImpl<EtlKuaishouVide
                     }
                     String shotId = ascription.getString("shotId");
                     if(null!=shotId&&!shotId.trim().equals("")){
-                        etlKuaishouVideoInfo.setShotId(shotId.toString());
+                        etlKuaishouVideoInfo.setShotId(shotId);
                     }
                     String shotName = ascription.getString("shotName");
                     if(null!=shotName&&!shotName.trim().equals("")){

+ 7 - 7
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/EtlKuaishouReportVideoDaily.java

@@ -26,7 +26,7 @@ import org.jeecgframework.poi.excel.annotation.Excel;
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
 @ApiModel(value="ctop_etl_kuaishou_report_video_daily对象", description="快手视频分日报表信息")
-public class EtlKuaishouReportVideoDaily {
+public class  EtlKuaishouReportVideoDaily {
 
 	/**id*/
 	@TableId(type = IdType.AUTO)
@@ -49,15 +49,15 @@ public class EtlKuaishouReportVideoDaily {
 	/**曝光数*/
 	@Excel(name = "曝光数", width = 15)
     @ApiModelProperty(value = "曝光数")
-	private Integer photoShow;
+	private Long photoShow;
 	/**素材曝光数*/
 	@Excel(name = "素材曝光数", width = 15)
     @ApiModelProperty(value = "素材曝光数")
-	private Integer aclick;
+	private Long aclick;
 	/**行为数*/
 	@Excel(name = "行为数", width = 15)
     @ApiModelProperty(value = "行为数")
-	private Integer bclick;
+	private Long bclick;
 	/**分享数*/
 	@Excel(name = "分享数", width = 15)
     @ApiModelProperty(value = "分享数")
@@ -65,15 +65,15 @@ public class EtlKuaishouReportVideoDaily {
 	/**评论数*/
 	@Excel(name = "评论数", width = 15)
     @ApiModelProperty(value = "评论数")
-	private Integer photoComment;
+	private Long photoComment;
 	/**点赞数*/
 	@Excel(name = "点赞数", width = 15)
     @ApiModelProperty(value = "点赞数")
-	private Integer photoLike;
+	private Long photoLike;
 	/**新增关注数*/
 	@Excel(name = "新增关注数", width = 15)
     @ApiModelProperty(value = "新增关注数")
-	private Integer follow;
+	private Long follow;
 	/**取消关注数*/
 	@Excel(name = "取消关注数", width = 15)
     @ApiModelProperty(value = "取消关注数")

+ 2 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/EtlKuaishouReportVideoDailyServiceImpl.java

@@ -16,6 +16,7 @@ import org.springframework.stereotype.Service;
 public class EtlKuaishouReportVideoDailyServiceImpl extends ServiceImpl<EtlKuaishouReportVideoDailyMapper, EtlKuaishouReportVideoDaily> implements IEtlKuaishouReportVideoDailyService {
     @Override
     public void etlKuaishouVideoReportDaily(String date){
-        //1:根据日期查询当前
+        //1:根据日期查询当前素材消耗数据
+
     }
 }