|
@@ -37,7 +37,7 @@ import java.util.stream.Collectors;
|
|
|
public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverViewV2Service {
|
|
|
|
|
|
@Autowired
|
|
|
- private MaterialReportOverViewV3Mapper viewMapper;
|
|
|
+ private MaterialReportOverViewV3Mapper materialReportOverViewV3Mapper;
|
|
|
|
|
|
@Autowired
|
|
|
private ISysRoleService roleService;
|
|
@@ -46,7 +46,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
public Set<String> recursiveQuerySubordinate(String userId) {
|
|
|
Set<String> result;
|
|
|
//查询当前用户是否存在下级
|
|
|
- Set<String> subordinate = viewMapper.recursiveQuerySubordinateByLeader(userId);
|
|
|
+ Set<String> subordinate = materialReportOverViewV3Mapper.recursiveQuerySubordinateByLeader(userId);
|
|
|
if (subordinate.isEmpty()) {
|
|
|
subordinate.add(userId);
|
|
|
return subordinate;
|
|
@@ -63,7 +63,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
@Override
|
|
|
public List<JSONObject> getDesignTeamList(String userId, int mediaId) {
|
|
|
|
|
|
- List<JSONObject> designTeamList = viewMapper.getDesignTeamList(mediaId);
|
|
|
+ List<JSONObject> designTeamList = materialReportOverViewV3Mapper.getDesignTeamList(mediaId);
|
|
|
if (designTeamList != null && !designTeamList.isEmpty()) {
|
|
|
//判断是否默认选中
|
|
|
for (JSONObject jsonObject : designTeamList) {
|
|
@@ -88,7 +88,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
mediaIds.add(2);
|
|
|
mediaIds.add(4);
|
|
|
}
|
|
|
- return viewMapper.queryProjectBy(userIds, mediaIds);
|
|
|
+ return materialReportOverViewV3Mapper.queryProjectBy(userIds, mediaIds);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -101,7 +101,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
mediaIds.add(2);
|
|
|
mediaIds.add(4);
|
|
|
}
|
|
|
- return viewMapper.queryProjectIdBy(userIds, mediaIds);
|
|
|
+ return materialReportOverViewV3Mapper.queryProjectIdBy(userIds, mediaIds);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -116,35 +116,35 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
projects = getProjectsByCurrentUser(mediaId);
|
|
|
}
|
|
|
//根据userID查询公司id
|
|
|
- String companyId = viewMapper.getCompanyId(userId);
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(userId);
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
//总消耗
|
|
|
- BigDecimal cost = viewMapper.queryBytedanceCost(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ BigDecimal cost = materialReportOverViewV3Mapper.queryBytedanceCost(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
//上阶段消耗
|
|
|
- BigDecimal lastCost = viewMapper.queryBytedanceCost(Long.parseLong(DateUtils.addDayParse(startDate, -DateUtils.dateDiffParse(startDate, endDate) - 1)), Long.parseLong(DateUtils.addDayParse(startDate, -1)), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ BigDecimal lastCost = materialReportOverViewV3Mapper.queryBytedanceCost(Long.parseLong(DateUtils.addDayParse(startDate, -DateUtils.dateDiffParse(startDate, endDate) - 1)), Long.parseLong(DateUtils.addDayParse(startDate, -1)), projects, dimension, leaderId, designerId, companyId);
|
|
|
result.put("costTotal", cost);
|
|
|
//同比 (本阶段截止昨天消耗-上一个阶段截止和昨天对应日期的消耗)/上一个阶段截止和昨天对应日期的消耗 X 100%
|
|
|
result.put("yearOnYearCompare", countLink(cost, lastCost));
|
|
|
//昨日消耗
|
|
|
- BigDecimal yesterdayCost = viewMapper.queryBytedanceCost(Long.parseLong(DateUtils.addDayParse(nowData, -1)), Long.parseLong(DateUtils.addDayParse(nowData, -1)), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ BigDecimal yesterdayCost = materialReportOverViewV3Mapper.queryBytedanceCost(Long.parseLong(DateUtils.addDayParse(nowData, -1)), Long.parseLong(DateUtils.addDayParse(nowData, -1)), projects, dimension, leaderId, designerId, companyId);
|
|
|
//前天消耗
|
|
|
- BigDecimal beforeYesterdayCost = viewMapper.queryBytedanceCost(Long.parseLong(DateUtils.addDayParse(nowData, -2)), Long.parseLong(DateUtils.addDayParse(nowData, -2)), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ BigDecimal beforeYesterdayCost = materialReportOverViewV3Mapper.queryBytedanceCost(Long.parseLong(DateUtils.addDayParse(nowData, -2)), Long.parseLong(DateUtils.addDayParse(nowData, -2)), projects, dimension, leaderId, designerId, companyId);
|
|
|
result.put("yesterdayCost", yesterdayCost);
|
|
|
//环比 (昨日消耗-前日消耗)/前日消耗 X 100%
|
|
|
result.put("chainCompare", countLink(yesterdayCost, beforeYesterdayCost));
|
|
|
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
//总消耗
|
|
|
- BigDecimal cost = viewMapper.queryKuaishouCost(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ BigDecimal cost = materialReportOverViewV3Mapper.queryKuaishouCost(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
//上阶段
|
|
|
- BigDecimal lastCost = viewMapper.queryKuaishouCost(Long.parseLong(DateUtils.addDayParse(startDate, -DateUtils.dateDiffParse(startDate, endDate) - 1)), Long.parseLong(DateUtils.addDayParse(startDate, -1)), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ BigDecimal lastCost = materialReportOverViewV3Mapper.queryKuaishouCost(Long.parseLong(DateUtils.addDayParse(startDate, -DateUtils.dateDiffParse(startDate, endDate) - 1)), Long.parseLong(DateUtils.addDayParse(startDate, -1)), projects, dimension, leaderId, designerId, companyId);
|
|
|
result.put("costTotal", cost);
|
|
|
//同比 (本阶段截止昨天消耗-上一个阶段截止和昨天对应日期的消耗)/上一个阶段截止和昨天对应日期的消耗 X 100%
|
|
|
result.put("yearOnYearCompare", countLink(cost, lastCost));
|
|
|
//昨日消耗
|
|
|
- BigDecimal yesterdayCost = viewMapper.queryKuaishouCost(Long.parseLong(DateUtils.addDayParse(nowData, -1)), Long.parseLong(DateUtils.addDayParse(nowData, -1)), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ BigDecimal yesterdayCost = materialReportOverViewV3Mapper.queryKuaishouCost(Long.parseLong(DateUtils.addDayParse(nowData, -1)), Long.parseLong(DateUtils.addDayParse(nowData, -1)), projects, dimension, leaderId, designerId, companyId);
|
|
|
//前天消耗
|
|
|
- BigDecimal beforeYesterdayCost = viewMapper.queryKuaishouCost(Long.parseLong(DateUtils.addDayParse(nowData, -2)), Long.parseLong(DateUtils.addDayParse(nowData, -2)), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ BigDecimal beforeYesterdayCost = materialReportOverViewV3Mapper.queryKuaishouCost(Long.parseLong(DateUtils.addDayParse(nowData, -2)), Long.parseLong(DateUtils.addDayParse(nowData, -2)), projects, dimension, leaderId, designerId, companyId);
|
|
|
result.put("yesterdayCost", yesterdayCost);
|
|
|
//日环比 (昨日消耗-前日消耗)/前日消耗 X 100%
|
|
|
result.put("chainCompare", countLink(yesterdayCost, beforeYesterdayCost));
|
|
@@ -160,20 +160,20 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
projects = getProjectsByCurrentUser(mediaId);
|
|
|
}
|
|
|
//根据userID查询公司id
|
|
|
- String companyId = viewMapper.getCompanyId(userId);
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(userId);
|
|
|
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
//视频上新
|
|
|
- List<Map<String, String>> videoList = viewMapper.queryMaterialCountList(startDate + " 00:00:00", endDate + " 23:59:59", projects, dimension, leaderId, designerId, companyId);
|
|
|
+ List<Map<String, String>> videoList = materialReportOverViewV3Mapper.queryMaterialCountList(startDate + " 00:00:00", endDate + " 23:59:59", projects, dimension, leaderId, designerId, companyId);
|
|
|
//总数
|
|
|
long videoTotal = videoList.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
result.put("videoList", videoList);
|
|
|
result.put("videoTotal", videoTotal);
|
|
|
//素材使用率 = 有消耗的素材 / 总数 * 100%
|
|
|
- long videoCost = viewMapper.queryMaterialCostList(startDate + " 00:00:00", endDate + " 23:59:59", projects, dimension, leaderId, designerId, companyId);
|
|
|
+ long videoCost = materialReportOverViewV3Mapper.queryMaterialCostList(startDate + " 00:00:00", endDate + " 23:59:59", projects, dimension, leaderId, designerId, companyId);
|
|
|
result.put("useCompare", Check.isNull(videoCost) ? 0 : new BigDecimal(videoCost).divide(new BigDecimal(videoTotal), 4, RoundingMode.HALF_UP));
|
|
|
//有效视频
|
|
|
- List<Map<String, String>> effectiveList = viewMapper.selectEffectiveMaterialVideoBytedance(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ List<Map<String, String>> effectiveList = materialReportOverViewV3Mapper.selectEffectiveMaterialVideoBytedance(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), projects, dimension, leaderId, designerId, companyId);
|
|
|
//总数
|
|
|
long effectiveTotal = effectiveList.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
result.put("effectiveList", effectiveList);
|
|
@@ -184,16 +184,16 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
|
|
|
//视频上新
|
|
|
- List<Map<String, String>> videoList = viewMapper.queryMaterialCountListKs(startDate + " 00:00:00", endDate + " 23:59:59", projects, dimension, leaderId, designerId, companyId);
|
|
|
+ List<Map<String, String>> videoList = materialReportOverViewV3Mapper.queryMaterialCountListKs(startDate + " 00:00:00", endDate + " 23:59:59", projects, dimension, leaderId, designerId, companyId);
|
|
|
//总数
|
|
|
long videoTotal = videoList.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
result.put("videoList", videoList);
|
|
|
result.put("videoTotal", videoTotal);
|
|
|
//素材使用率 = 有消耗的素材 / 总数 * 100%
|
|
|
- long videoCost = viewMapper.queryMaterialCostListKs(startDate + " 00:00:00", endDate + " 23:59:59", projects, dimension, leaderId, designerId, companyId);
|
|
|
+ long videoCost = materialReportOverViewV3Mapper.queryMaterialCostListKs(startDate + " 00:00:00", endDate + " 23:59:59", projects, dimension, leaderId, designerId, companyId);
|
|
|
result.put("useCompare", Check.isNull(videoCost) ? 0 : new BigDecimal(videoCost).divide(new BigDecimal(videoTotal), 4, RoundingMode.HALF_UP));
|
|
|
//有效视频
|
|
|
- List<Map<String, String>> effectiveList = viewMapper.selectEffectiveMaterialVideoKs(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ List<Map<String, String>> effectiveList = materialReportOverViewV3Mapper.selectEffectiveMaterialVideoKs(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), projects, dimension, leaderId, designerId, companyId);
|
|
|
//总数
|
|
|
long effectiveTotal = effectiveList.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
result.put("effectiveList", effectiveList);
|
|
@@ -215,25 +215,25 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
projects = getProjectsByCurrentUser(mediaId);
|
|
|
}
|
|
|
//根据userID查询公司id
|
|
|
- String companyId = viewMapper.getCompanyId(userId);
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(userId);
|
|
|
startDate = startDate.replace("-", "");
|
|
|
endDate = endDate.replace("-", "");
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
//爆款视频
|
|
|
- List<Map<String, String>> hotList = viewMapper.selectHotMaterialVideoBytedance(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
+ List<Map<String, String>> hotList = materialReportOverViewV3Mapper.selectHotMaterialVideoBytedance(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
//总数
|
|
|
long hotTotal = hotList.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
result.put("hotList", hotList);
|
|
|
result.put("hotTotal", hotTotal);
|
|
|
//上阶段
|
|
|
- List<Map<String, String>> lastHostList = viewMapper.selectHotMaterialVideoBytedance(Long.parseLong(DateUtils.addDayParse(startDate, -DateUtils.dateDiffParse(startDate, endDate) - 1)), Long.parseLong(DateUtils.addDayParse(startDate, -1)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
+ List<Map<String, String>> lastHostList = materialReportOverViewV3Mapper.selectHotMaterialVideoBytedance(Long.parseLong(DateUtils.addDayParse(startDate, -DateUtils.dateDiffParse(startDate, endDate) - 1)), Long.parseLong(DateUtils.addDayParse(startDate, -1)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
long lastHotTotal = lastHostList.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
//同比 (本阶段截止昨天的爆款视频数量-上一个阶段截止和昨天对应日期的爆款视频数量)/上一个阶段截止和昨天对应日期的爆款视频数量X 100%
|
|
|
result.put("hotYearOnYearCompare", countLink(new BigDecimal(hotTotal), new BigDecimal(lastHotTotal)));
|
|
|
//昨日消耗
|
|
|
- List<Map<String, String>> yesterdayHost = viewMapper.selectHotMaterialVideoBytedance(Long.parseLong(DateUtils.addDayParse(nowData, -1)), Long.parseLong(DateUtils.addDayParse(nowData, -1)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
+ List<Map<String, String>> yesterdayHost = materialReportOverViewV3Mapper.selectHotMaterialVideoBytedance(Long.parseLong(DateUtils.addDayParse(nowData, -1)), Long.parseLong(DateUtils.addDayParse(nowData, -1)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
//前天消耗
|
|
|
- List<Map<String, String>> beforeYesterdayHost = viewMapper.selectHotMaterialVideoBytedance(Long.parseLong(DateUtils.addDayParse(nowData, -2)), Long.parseLong(DateUtils.addDayParse(nowData, -2)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
+ List<Map<String, String>> beforeYesterdayHost = materialReportOverViewV3Mapper.selectHotMaterialVideoBytedance(Long.parseLong(DateUtils.addDayParse(nowData, -2)), Long.parseLong(DateUtils.addDayParse(nowData, -2)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
long yesterday = yesterdayHost.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
long before = beforeYesterdayHost.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
//日环比 (昨日-前日)/前日消耗 X 100%
|
|
@@ -241,20 +241,20 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
//爆款视频
|
|
|
- List<Map<String, String>> hotList = viewMapper.selectHotMaterialVideoKs(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
+ List<Map<String, String>> hotList = materialReportOverViewV3Mapper.selectHotMaterialVideoKs(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
//总数
|
|
|
long hotTotal = hotList.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
result.put("hotList", hotList);
|
|
|
result.put("hotTotal", hotTotal);
|
|
|
//上阶段
|
|
|
- List<Map<String, String>> lastHostList = viewMapper.selectHotMaterialVideoKs(Long.parseLong(DateUtils.addDayParse(startDate, -DateUtils.dateDiffParse(startDate, endDate) - 1)), Long.parseLong(DateUtils.addDayParse(startDate, -1)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
+ List<Map<String, String>> lastHostList = materialReportOverViewV3Mapper.selectHotMaterialVideoKs(Long.parseLong(DateUtils.addDayParse(startDate, -DateUtils.dateDiffParse(startDate, endDate) - 1)), Long.parseLong(DateUtils.addDayParse(startDate, -1)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
long lastHotTotal = lastHostList.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
//同比 (本阶段截止昨天的爆款视频数量-上一个阶段截止和昨天对应日期的爆款视频数量)/上一个阶段截止和昨天对应日期的爆款视频数量X 100%
|
|
|
result.put("hotYearOnYearCompare", countLink(new BigDecimal(hotTotal), new BigDecimal(lastHotTotal)));
|
|
|
//昨日消耗
|
|
|
- List<Map<String, String>> yesterdayHost = viewMapper.selectHotMaterialVideoKs(Long.parseLong(DateUtils.addDayParse(nowData, -1)), Long.parseLong(DateUtils.addDayParse(nowData, -1)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
+ List<Map<String, String>> yesterdayHost = materialReportOverViewV3Mapper.selectHotMaterialVideoKs(Long.parseLong(DateUtils.addDayParse(nowData, -1)), Long.parseLong(DateUtils.addDayParse(nowData, -1)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
//前天消耗
|
|
|
- List<Map<String, String>> beforeYesterdayHost = viewMapper.selectHotMaterialVideoKs(Long.parseLong(DateUtils.addDayParse(nowData, -2)), Long.parseLong(DateUtils.addDayParse(nowData, -2)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
+ List<Map<String, String>> beforeYesterdayHost = materialReportOverViewV3Mapper.selectHotMaterialVideoKs(Long.parseLong(DateUtils.addDayParse(nowData, -2)), Long.parseLong(DateUtils.addDayParse(nowData, -2)), projects, dimension, leaderId, designerId, companyId, type);
|
|
|
long yesterday = yesterdayHost.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
long before = beforeYesterdayHost.stream().collect(Collectors.summarizingInt(s -> Integer.valueOf(String.valueOf(s.get("count"))))).getSum();
|
|
|
//日环比 (昨日-前日)/前日消耗 X 100%
|
|
@@ -271,21 +271,21 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
projects = getProjectsByCurrentUser(mediaId);
|
|
|
}
|
|
|
//根据userID查询公司id
|
|
|
- String companyId = viewMapper.getCompanyId(userId);
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(userId);
|
|
|
startDate = startDate.replace("-", "");
|
|
|
endDate = endDate.replace("-", "");
|
|
|
try {
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
if (DateUtils.isMoreSixMonthParse(startDate, endDate)) {
|
|
|
- result = viewMapper.queryBytedanceChatGroupMonth(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ result = materialReportOverViewV3Mapper.queryBytedanceChatGroupMonth(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
} else {
|
|
|
- result = viewMapper.queryBytedanceChat(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ result = materialReportOverViewV3Mapper.queryBytedanceChat(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
}
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
if (DateUtils.isMoreSixMonthParse(startDate, endDate)) {
|
|
|
- result = viewMapper.queryKuaishouChatGroupMonth(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ result = materialReportOverViewV3Mapper.queryKuaishouChatGroupMonth(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
} else {
|
|
|
- result = viewMapper.queryKuaishouChat(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ result = materialReportOverViewV3Mapper.queryKuaishouChat(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
}
|
|
|
}
|
|
|
} catch (ParseException e) {
|
|
@@ -303,7 +303,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
public List<JSONObject> getTopMaterialList(int mediaId, String startDate, String endDate, JSONArray projects, String dimension, String leaderId, String designerId, String userId, Integer channelType) {
|
|
|
List<JSONObject> result = new ArrayList<>();
|
|
|
//根据userID查询公司id
|
|
|
- String companyId = viewMapper.getCompanyId(userId);
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(userId);
|
|
|
startDate = startDate.replace("-", "");
|
|
|
endDate = endDate.replace("-", "");
|
|
|
if (projects != null && projects.isEmpty()) {
|
|
@@ -311,10 +311,10 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
}
|
|
|
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
- result = viewMapper.queryBytedanceTopMaterial(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
+ result = materialReportOverViewV3Mapper.queryBytedanceTopMaterial(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId);
|
|
|
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
- result = viewMapper.queryKuaishouTopMaterial(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId, channelType);
|
|
|
+ result = materialReportOverViewV3Mapper.queryKuaishouTopMaterial(Long.parseLong(startDate), Long.parseLong(endDate), projects, dimension, leaderId, designerId, companyId, channelType);
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
@@ -326,18 +326,18 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
projects = getProjectsByCurrentUser(mediaId);
|
|
|
}
|
|
|
//根据userID查询公司id
|
|
|
- String companyId = viewMapper.getCompanyId(userId);
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(userId);
|
|
|
startDate = startDate.replace("-", "");
|
|
|
endDate = endDate.replace("-", "");
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.getDicMapByVideoNew());
|
|
|
PageHelper.startPage(pageNo, pageSize);
|
|
|
- List<JSONObject> list = viewMapper.queryBytedanceMaterialReport(filedAll, Long.parseLong(startDate), Long.parseLong(endDate), projects, md5, dimension, leaderId, designerId, materialQuality, materialType, innovative, target, order, companyId);
|
|
|
+ List<JSONObject> list = materialReportOverViewV3Mapper.queryBytedanceMaterialReport(filedAll, Long.parseLong(startDate), Long.parseLong(endDate), projects, md5, dimension, leaderId, designerId, materialQuality, materialType, innovative, target, order, companyId);
|
|
|
result = new PageInfo(list);
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.getKuaishouVideoReportMapNew());
|
|
|
PageHelper.startPage(pageNo, pageSize);
|
|
|
- List<JSONObject> list = viewMapper.queryKuaishouMaterialReport(filedAll, Long.parseLong(startDate), Long.parseLong(endDate), projects, md5, dimension, leaderId, designerId, materialQuality, materialType, innovative, target, order, companyId);
|
|
|
+ List<JSONObject> list = materialReportOverViewV3Mapper.queryKuaishouMaterialReport(filedAll, Long.parseLong(startDate), Long.parseLong(endDate), projects, md5, dimension, leaderId, designerId, materialQuality, materialType, innovative, target, order, companyId);
|
|
|
result = new PageInfo(list);
|
|
|
}
|
|
|
return result;
|
|
@@ -365,8 +365,8 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
columns.add(1, "url");
|
|
|
columns.add(2, "materialName");
|
|
|
columns.add(3, "projectName");
|
|
|
- String companyId = viewMapper.getCompanyId(requestBody.getString("userId"));
|
|
|
- List<JSONObject> excelData = viewMapper.queryBytedanceMaterialReport(filed,
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(requestBody.getString("userId"));
|
|
|
+ List<JSONObject> excelData = materialReportOverViewV3Mapper.queryBytedanceMaterialReport(filed,
|
|
|
Long.parseLong(requestBody.getString("startDate").replace("-", "")),
|
|
|
Long.parseLong(requestBody.getString("endDate").replace("-", "")),
|
|
|
requestBody.getJSONArray("projects"),
|
|
@@ -423,8 +423,8 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
}
|
|
|
List<String> titles = getfileIds(AccountReportConstants.getKuaishouVideoReportDict(), columns2);
|
|
|
String filedAll = JsonResourceUtil.joinAllFiled(AccountReportConstants.getKuaishouVideoReportMap());
|
|
|
- String companyId = viewMapper.getCompanyId(requestBody.getString("userId"));
|
|
|
- List<JSONObject> excelData = viewMapper.queryKuaishouMaterialReport(filedAll,
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(requestBody.getString("userId"));
|
|
|
+ List<JSONObject> excelData = materialReportOverViewV3Mapper.queryKuaishouMaterialReport(filedAll,
|
|
|
Long.parseLong(requestBody.getString("startDate").replace("-", "")),
|
|
|
Long.parseLong(requestBody.getString("endDate").replace("-", "")),
|
|
|
requestBody.getJSONArray("projects"),
|
|
@@ -475,10 +475,10 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
List<JSONObject> result = new ArrayList<>();
|
|
|
PageHelper.startPage(pageNumber, pageSize);
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
- result = viewMapper.queryBytedanceTopDesign(Long.parseLong(startDate), Long.parseLong(endDate), type);
|
|
|
+ result = materialReportOverViewV3Mapper.queryBytedanceTopDesign(Long.parseLong(startDate), Long.parseLong(endDate), type);
|
|
|
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
- result = viewMapper.queryKuaishouTopDesign(Long.parseLong(startDate), Long.parseLong(endDate), type);
|
|
|
+ result = materialReportOverViewV3Mapper.queryKuaishouTopDesign(Long.parseLong(startDate), Long.parseLong(endDate), type);
|
|
|
}
|
|
|
PageInfo info = new PageInfo(result);
|
|
|
return info;
|
|
@@ -488,9 +488,9 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
public JSONObject getMaterialDetailInfo(int mediaId, String md5) {
|
|
|
JSONObject result = new JSONObject();
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
- result = viewMapper.queryBytedanceVideoDetail(md5);
|
|
|
+ result = materialReportOverViewV3Mapper.queryBytedanceVideoDetail(md5);
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
- result = viewMapper.queryKuaishouVideoDetail(md5);
|
|
|
+ result = materialReportOverViewV3Mapper.queryKuaishouVideoDetail(md5);
|
|
|
|
|
|
}
|
|
|
return result;
|
|
@@ -500,24 +500,24 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
public Map<String, Object> materialDetailAnalyse(int mediaId, String md5) {
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
- Long projectId = viewMapper.queryBytedanceProjectIdByMd5(md5);
|
|
|
- result.put("cost", viewMapper.queryBytedanceCostByMd5(md5, projectId));
|
|
|
- result.put("click", viewMapper.queryBytedanceClickByMd5(md5, projectId));
|
|
|
- result.put("materialShow", viewMapper.queryBytedanceMaterialShowByMd5(md5, projectId));
|
|
|
- result.put("play100Rate", viewMapper.queryBytedancePlay100RateByMd5(md5, projectId));
|
|
|
- result.put("likeMaterial", viewMapper.queryBytedanceLikeMaterialByMd5(md5, projectId));
|
|
|
- result.put("commentMaterial", viewMapper.queryBytedanceCommentMaterialByMd5(md5, projectId));
|
|
|
- result.put("shareMaterial", viewMapper.queryBytedanceShareMaterialByMd5(md5, projectId));
|
|
|
- result.put("follow", viewMapper.queryBytedanceFollowByMd5(md5, projectId));
|
|
|
+ Long projectId = materialReportOverViewV3Mapper.queryBytedanceProjectIdByMd5(md5);
|
|
|
+ result.put("cost", materialReportOverViewV3Mapper.queryBytedanceCostByMd5(md5, projectId));
|
|
|
+ result.put("click", materialReportOverViewV3Mapper.queryBytedanceClickByMd5(md5, projectId));
|
|
|
+ result.put("materialShow", materialReportOverViewV3Mapper.queryBytedanceMaterialShowByMd5(md5, projectId));
|
|
|
+ result.put("play100Rate", materialReportOverViewV3Mapper.queryBytedancePlay100RateByMd5(md5, projectId));
|
|
|
+ result.put("likeMaterial", materialReportOverViewV3Mapper.queryBytedanceLikeMaterialByMd5(md5, projectId));
|
|
|
+ result.put("commentMaterial", materialReportOverViewV3Mapper.queryBytedanceCommentMaterialByMd5(md5, projectId));
|
|
|
+ result.put("shareMaterial", materialReportOverViewV3Mapper.queryBytedanceShareMaterialByMd5(md5, projectId));
|
|
|
+ result.put("follow", materialReportOverViewV3Mapper.queryBytedanceFollowByMd5(md5, projectId));
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
- Long projectId = viewMapper.queryKuaishouProjectIdByMd5(md5);
|
|
|
- result.put("charge", viewMapper.queryKuaishouChargeByMd5(md5, projectId));
|
|
|
- result.put("photoShow", viewMapper.queryKuaishouPhotoShowByMd5(md5, projectId));
|
|
|
- result.put("photoClick", viewMapper.queryKuaishouPhotoClickByMd5(md5, projectId));
|
|
|
- result.put("aclick", viewMapper.queryKuaishouAClickByMd5(md5, projectId));
|
|
|
- result.put("bclick", viewMapper.queryKuaishouBClickByMd5(md5, projectId));
|
|
|
- result.put("activation", viewMapper.queryKuaishouActivationByMd5(md5, projectId));
|
|
|
- result.put("play3sRate", viewMapper.queryKuaishouPlay3sRateByMd5(md5, projectId));
|
|
|
+ Long projectId = materialReportOverViewV3Mapper.queryKuaishouProjectIdByMd5(md5);
|
|
|
+ result.put("charge", materialReportOverViewV3Mapper.queryKuaishouChargeByMd5(md5, projectId));
|
|
|
+ result.put("photoShow", materialReportOverViewV3Mapper.queryKuaishouPhotoShowByMd5(md5, projectId));
|
|
|
+ result.put("photoClick", materialReportOverViewV3Mapper.queryKuaishouPhotoClickByMd5(md5, projectId));
|
|
|
+ result.put("aclick", materialReportOverViewV3Mapper.queryKuaishouAClickByMd5(md5, projectId));
|
|
|
+ result.put("bclick", materialReportOverViewV3Mapper.queryKuaishouBClickByMd5(md5, projectId));
|
|
|
+ result.put("activation", materialReportOverViewV3Mapper.queryKuaishouActivationByMd5(md5, projectId));
|
|
|
+ result.put("play3sRate", materialReportOverViewV3Mapper.queryKuaishouPlay3sRateByMd5(md5, projectId));
|
|
|
}
|
|
|
return result;
|
|
|
}
|
|
@@ -530,9 +530,9 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
Map<String, JSONObject> map = new HashMap<>();
|
|
|
try {
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
- result = viewMapper.queryBytedanceVideoChat(md5);
|
|
|
+ result = materialReportOverViewV3Mapper.queryBytedanceVideoChat(md5);
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
- result = viewMapper.queryKuaishouVideoChat(md5);
|
|
|
+ result = materialReportOverViewV3Mapper.queryKuaishouVideoChat(md5);
|
|
|
}
|
|
|
//获取最小日期和最大日期 计算中间无数据日期 填充0
|
|
|
if (result != null && result.size() > 0) {
|
|
@@ -604,11 +604,11 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
Result result = new Result<>();
|
|
|
Map resultMap = new HashMap();
|
|
|
try {
|
|
|
- List<Map> list = viewMapper.populationAnalysisList(signature);
|
|
|
+ List<Map> list = materialReportOverViewV3Mapper.populationAnalysisList(signature);
|
|
|
//查询点击率
|
|
|
- String actionRatio = viewMapper.getActualProb(signature, "action_ratio");
|
|
|
+ String actionRatio = materialReportOverViewV3Mapper.getActualProb(signature, "action_ratio");
|
|
|
//查询转化率
|
|
|
- String convertRatio = viewMapper.getActualProb(signature, "convert_ratio");
|
|
|
+ String convertRatio = materialReportOverViewV3Mapper.getActualProb(signature, "convert_ratio");
|
|
|
resultMap.put("dataList", list);
|
|
|
resultMap.put("actionRatio", actionRatio);
|
|
|
resultMap.put("convertRatio", convertRatio);
|
|
@@ -631,7 +631,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
public Result populationAnalysisChart(String signature) {
|
|
|
Result result = new Result<>();
|
|
|
try {
|
|
|
- List<Map> list = viewMapper.populationAnalysisChart(signature);
|
|
|
+ List<Map> list = materialReportOverViewV3Mapper.populationAnalysisChart(signature);
|
|
|
result.setResult(list);
|
|
|
} catch (Exception e) {
|
|
|
log.info("查询错误:{}", e.toString());
|
|
@@ -652,9 +652,9 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
Map<String, String> map = new HashMap();
|
|
|
try {
|
|
|
//最优转化率组合
|
|
|
- Map<String, String> convertRatio = viewMapper.optimalCombination(signature, "convert_ratio");
|
|
|
+ Map<String, String> convertRatio = materialReportOverViewV3Mapper.optimalCombination(signature, "convert_ratio");
|
|
|
//最优点击率组合
|
|
|
- Map<String, String> actionRatio = viewMapper.optimalCombination(signature, "action_ratio");
|
|
|
+ Map<String, String> actionRatio = materialReportOverViewV3Mapper.optimalCombination(signature, "action_ratio");
|
|
|
if (convertRatio != null) {
|
|
|
map.put("convertRatio", convertRatio.get("gender") + "/" + convertRatio.get("age"));
|
|
|
} else {
|
|
@@ -684,7 +684,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
public Result similarMaterial(String signature) {
|
|
|
Result result = new Result<>();
|
|
|
List<Map> resultMap = new ArrayList<>();
|
|
|
- Map<String, String> map = viewMapper.getSimilarMaterialList(signature);
|
|
|
+ Map<String, String> map = materialReportOverViewV3Mapper.getSimilarMaterialList(signature);
|
|
|
if (map != null) {
|
|
|
String signature1 = map.get("s1");
|
|
|
String signature2 = map.get("s2");
|
|
@@ -692,31 +692,31 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
String signature4 = map.get("s4");
|
|
|
String signature5 = map.get("s5");
|
|
|
if (signature1 != null && !signature1.equals("")) {
|
|
|
- Map info = viewMapper.similarMaterialInfo(signature1);
|
|
|
+ Map info = materialReportOverViewV3Mapper.similarMaterialInfo(signature1);
|
|
|
if (info.get("signature") != null && !info.get("signature").equals("")) {
|
|
|
resultMap.add(info);
|
|
|
}
|
|
|
}
|
|
|
if (signature2 != null && !signature2.equals("")) {
|
|
|
- Map info = viewMapper.similarMaterialInfo(signature2);
|
|
|
+ Map info = materialReportOverViewV3Mapper.similarMaterialInfo(signature2);
|
|
|
if (info.get("signature") != null && !info.get("signature").equals("")) {
|
|
|
resultMap.add(info);
|
|
|
}
|
|
|
}
|
|
|
if (signature3 != null && !signature3.equals("")) {
|
|
|
- Map info = viewMapper.similarMaterialInfo(signature3);
|
|
|
+ Map info = materialReportOverViewV3Mapper.similarMaterialInfo(signature3);
|
|
|
if (info.get("signature") != null && !info.get("signature").equals("")) {
|
|
|
resultMap.add(info);
|
|
|
}
|
|
|
}
|
|
|
if (signature4 != null && !signature4.equals("")) {
|
|
|
- Map info = viewMapper.similarMaterialInfo(signature4);
|
|
|
+ Map info = materialReportOverViewV3Mapper.similarMaterialInfo(signature4);
|
|
|
if (info.get("signature") != null && !info.get("signature").equals("")) {
|
|
|
resultMap.add(info);
|
|
|
}
|
|
|
}
|
|
|
if (signature5 != null && !signature5.equals("")) {
|
|
|
- Map info = viewMapper.similarMaterialInfo(signature5);
|
|
|
+ Map info = materialReportOverViewV3Mapper.similarMaterialInfo(signature5);
|
|
|
if (info.get("signature") != null && !info.get("signature").equals("")) {
|
|
|
resultMap.add(info);
|
|
|
}
|
|
@@ -733,18 +733,18 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
@Override
|
|
|
public Map<String, Object> getDesignerAvgData(Integer mediaId, String startDate, String endDate, String userId, String leaderId) {
|
|
|
//根据userID查询公司id
|
|
|
- String companyId = viewMapper.getCompanyId(userId);
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(userId);
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
if (mediaId == CtopAdConstant.PLATFORM_TYPE_BYTEDANCE_INT) {
|
|
|
//头条
|
|
|
//组内人均消耗
|
|
|
- BigDecimal sumCost = viewMapper.getBytedanceDesignTeamAvgCost(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId, companyId);
|
|
|
+ BigDecimal sumCost = materialReportOverViewV3Mapper.getBytedanceDesignTeamAvgCost(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId, companyId);
|
|
|
//组人效
|
|
|
- BigDecimal groupWork = viewMapper.getBytedanceDesignTeamGroupWork(startDate, endDate, leaderId);
|
|
|
+ BigDecimal groupWork = materialReportOverViewV3Mapper.getBytedanceDesignTeamGroupWork(startDate, endDate, leaderId);
|
|
|
//创新视频数
|
|
|
- int innovativeVideoCount = viewMapper.getBytedanceDesignTeaminnovativeVideoCount(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId);
|
|
|
+ int innovativeVideoCount = materialReportOverViewV3Mapper.getBytedanceDesignTeaminnovativeVideoCount(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId);
|
|
|
//素材平均消耗
|
|
|
- BigDecimal avgCost = viewMapper.getBytedanceMaterialCost(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId, companyId);
|
|
|
+ BigDecimal avgCost = materialReportOverViewV3Mapper.getBytedanceMaterialCost(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId, companyId);
|
|
|
|
|
|
result.put("avgCost", sumCost);
|
|
|
result.put("peopleWork", groupWork);
|
|
@@ -753,13 +753,13 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
|
//快手
|
|
|
//组内人均消耗
|
|
|
- BigDecimal sumCost = viewMapper.getKuaishouDesignTeamAvgCost(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId, companyId);
|
|
|
+ BigDecimal sumCost = materialReportOverViewV3Mapper.getKuaishouDesignTeamAvgCost(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId, companyId);
|
|
|
//组人效
|
|
|
- BigDecimal groupWork = viewMapper.getKuaishouDesignTeamGroupWork(startDate, endDate, leaderId);
|
|
|
+ BigDecimal groupWork = materialReportOverViewV3Mapper.getKuaishouDesignTeamGroupWork(startDate, endDate, leaderId);
|
|
|
//创新视频数
|
|
|
- int innovativeVideoCount = viewMapper.getKuaishouDesignTeaminnovativeVideoCount(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId);
|
|
|
+ int innovativeVideoCount = materialReportOverViewV3Mapper.getKuaishouDesignTeaminnovativeVideoCount(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId);
|
|
|
//创新视频消耗
|
|
|
- BigDecimal innovativeVideoCost = viewMapper.getKuaishouDesignTeaminnovativeVideoCost(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId, companyId);
|
|
|
+ BigDecimal innovativeVideoCost = materialReportOverViewV3Mapper.getKuaishouDesignTeaminnovativeVideoCost(Long.parseLong(startDate.replace("-", "")), Long.parseLong(endDate.replace("-", "")), leaderId, companyId);
|
|
|
result.put("avgCost", sumCost);
|
|
|
result.put("peopleWork", groupWork);
|
|
|
result.put("innovativeVideoCount", innovativeVideoCount);
|
|
@@ -774,7 +774,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
@Override
|
|
|
public JSONObject labelRatio(Integer mediaId, String startDate, String endDate, JSONArray projects, String dimension, String leaderId, String designerId, String userId, int type) {
|
|
|
//根据userID查询公司id
|
|
|
- String companyId = viewMapper.getCompanyId(userId);
|
|
|
+ String companyId = materialReportOverViewV3Mapper.getCompanyId(userId);
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
JSONObject object = new JSONObject();
|
|
|
if (projects != null && projects.isEmpty()) {
|
|
@@ -785,12 +785,12 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
if (type == 0) {
|
|
|
//素材数
|
|
|
//获取真人 制作 其他 数量
|
|
|
- object = viewMapper.getBytedanceMaterialCountByLable(startDate, endDate, projects, dimension, leaderId, designerId, companyId);
|
|
|
+ object = materialReportOverViewV3Mapper.getBytedanceMaterialCountByLable(startDate, endDate, projects, dimension, leaderId, designerId, companyId);
|
|
|
|
|
|
} else if (type == 1) {
|
|
|
//消耗
|
|
|
//获取真人 制作 其他 数量
|
|
|
- object = viewMapper.getBytedanceMaterialCountByCost(startDate, endDate, projects, dimension, leaderId, designerId, companyId);
|
|
|
+ object = materialReportOverViewV3Mapper.getBytedanceMaterialCountByCost(startDate, endDate, projects, dimension, leaderId, designerId, companyId);
|
|
|
}
|
|
|
|
|
|
} else if (mediaId == CtopAdConstant.PLATFORM_TYPE_KUAISHOU_INT) {
|
|
@@ -798,11 +798,11 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
if (type == 0) {
|
|
|
//素材数
|
|
|
//获取真人 制作 其他 数量
|
|
|
- object = viewMapper.getKuaishouMaterialCountByLable(startDate, endDate, projects, dimension, leaderId, designerId, companyId);
|
|
|
+ object = materialReportOverViewV3Mapper.getKuaishouMaterialCountByLable(startDate, endDate, projects, dimension, leaderId, designerId, companyId);
|
|
|
} else if (type == 1) {
|
|
|
//消耗
|
|
|
//获取真人 制作 其他 数量
|
|
|
- object = viewMapper.getKuaishouMaterialCountByCost(startDate, endDate, projects, dimension, leaderId, designerId, companyId);
|
|
|
+ object = materialReportOverViewV3Mapper.getKuaishouMaterialCountByCost(startDate, endDate, projects, dimension, leaderId, designerId, companyId);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -836,7 +836,7 @@ public class MaterialReportOverViewV2ServiceImpl implements IMaterialReportOverV
|
|
|
if (leaderIds.isEmpty()) {
|
|
|
return result;
|
|
|
}
|
|
|
- Set<String> temp = viewMapper.recursiveQuerySubordinateByLeaders(leaderIds);
|
|
|
+ Set<String> temp = materialReportOverViewV3Mapper.recursiveQuerySubordinateByLeaders(leaderIds);
|
|
|
result.addAll(temp);
|
|
|
querySubordinate(temp, result);
|
|
|
return result;
|