|
@@ -50,16 +50,23 @@ public class KuaishouPlanCreateServiceImpl extends ServiceImpl<KuaishouPlanCreat
|
|
create.setNewUnit(newUnitCount);
|
|
create.setNewUnit(newUnitCount);
|
|
Integer autoUnitCount = planCreateMapper.getAutoUnit(accountId, startDate, endDate);
|
|
Integer autoUnitCount = planCreateMapper.getAutoUnit(accountId, startDate, endDate);
|
|
create.setAutoUnit(autoUnitCount);
|
|
create.setAutoUnit(autoUnitCount);
|
|
- if (newUnitCount != 0) {
|
|
|
|
- Integer manualUnit = newUnitCount - autoUnitCount;
|
|
|
|
- if (manualUnit > 0) {
|
|
|
|
- create.setManualUnit(manualUnit);
|
|
|
|
- } else {
|
|
|
|
- create.setManualUnit(0);
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ // 智能托管新建计划数(助手)
|
|
|
|
+ Integer hostPlan = planCreateMapper.getHostPlan(accountId, startDate, endDate);
|
|
|
|
+ create.setHostingPlans(hostPlan);
|
|
|
|
+
|
|
|
|
+ // 批量工具创建组数量
|
|
|
|
+ Integer batch = planCreateMapper.getBatchUnit(accountId, startDate, endDate);
|
|
|
|
+ if (batch != 0) {
|
|
|
|
+ Integer batchCount = batch - autoUnitCount;
|
|
|
|
+ create.setBatchUnit(batchCount);
|
|
} else {
|
|
} else {
|
|
- create.setManualUnit(0);
|
|
|
|
|
|
+ create.setBatchUnit(0);
|
|
}
|
|
}
|
|
|
|
+ // 媒体后台创建组数量 (不包含助手智能托管组)
|
|
|
|
+ Integer mediaCount = planCreateMapper.getMediaCount(accountId, startDate, endDate);
|
|
|
|
+ create.setMediaUnit(mediaCount);
|
|
|
|
+
|
|
Integer effectiveUnitCount = planCreateMapper.getEffectiveUnit(accountId, startDate, endDate);
|
|
Integer effectiveUnitCount = planCreateMapper.getEffectiveUnit(accountId, startDate, endDate);
|
|
create.setEffectiveUnit(effectiveUnitCount);
|
|
create.setEffectiveUnit(effectiveUnitCount);
|
|
int insert = planCreateMapper.insert(create);
|
|
int insert = planCreateMapper.insert(create);
|