Pārlūkot izejas kodu

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-boot

zhaoxian 4 gadi atpakaļ
vecāks
revīzija
bfaa95d35f

+ 5 - 4
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -389,11 +389,12 @@ public class SampleTest {
     private IKuaishouVideoEtlInfoService kuaishouVideoEtlInfoService;
     @Test
     public void etlKuaishouData(){
-        String dateString = "2020-01-01";
+        String dateString = "2020-08-29";
         Date startDate = DateUtils.parseDate(dateString,"yyyy-MM-dd");
-        for(int i=0;i<=365;i++){
+        for(int i=0;i<=185;i++){
             Date getDate = DateUtils.addDay(startDate,i);
             kuaishouVideoEtlInfoService.etlKuaishouVideoInfo(getDate);
+//            bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
         }
     }
 
@@ -401,9 +402,9 @@ public class SampleTest {
     private IBytedanceVideoEtlInfoService bytedanceVideoEtlInfoService;
     @Test
     public void etlBytedanceData(){
-        String dateString = "2020-01-01";
+        String dateString = "2020-03-01";
         Date startDate = DateUtils.parseDate(dateString,"yyyy-MM-dd");
-        for(int i=0;i<=365;i++){
+        for(int i=0;i<=310;i++){
             Date getDate = DateUtils.addDay(startDate,i);
             bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
             kuaishouVideoEtlInfoService.etlKuaishouVideoInfo(getDate);

+ 5 - 10
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/controller/MaterialRefuseController.java

@@ -47,9 +47,13 @@ public class MaterialRefuseController {
                                                              HttpServletRequest req) {
         Result<IPage<KuaiShouCreative>> result = new Result<>();
         try {
-
+            String creativeName = creative.getCreativeName();
+            creative.setCreativeName(null);
             QueryWrapper<KuaiShouCreative> queryWrapper = QueryGenerator.initQueryWrapper(creative, req.getParameterMap());
             queryWrapper.eq("status", 42);
+            if (!Check.isNull(creativeName)) {
+                queryWrapper.like("creative_name", creativeName);
+            }
             queryWrapper.orderByDesc("creative_create_time");
             Page<KuaiShouCreative> page = new Page<KuaiShouCreative>(pageNo, pageSize);
             IPage<KuaiShouCreative> pageList = creativeService.page(page, queryWrapper);
@@ -247,19 +251,14 @@ public class MaterialRefuseController {
                 newString = sMo.replace(';', ';');
             } else if (sMo.contains("!")) {
                 newString = sMo.replace("!", "!");
-
             } else if (sMo.contains("?")) {
                 newString = sMo.replace('?', '?');
-
             } else if (sMo.contains(":")) {
                 newString = sMo.replace(':', ':');
-
             } else if (sMo.contains("“")) {
                 newString = sMo.replace('“', '"');
-
             } else if (sMo.contains("”")) {
                 newString = sMo.replace('”', '"');
-
             } else if (sMo.contains("<")) {
                 newString = sMo.replace('>', '》').replace('<', '《');
             } else if (sMo.contains(",")) {
@@ -270,16 +269,12 @@ public class MaterialRefuseController {
                 newString = sMo.replace(';', ';');
             } else if (sMo.contains("!")) {
                 newString = sMo.replace("!", "!");
-
             } else if (sMo.contains("?")) {
                 newString = sMo.replace('?', '?');
-
             } else if (sMo.contains(":")) {
                 newString = sMo.replace(':', ':');
-
             } else if (sMo.contains(""")) {
                 newString = sMo.replace('"', '“');
-
             } else if (sMo.contains(""")) {
                 newString = sMo.replace('"', '”');
             } else if (sMo.contains("《")) {

+ 11 - 11
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/KuaishouVideoEtlInfoServiceImpl.java

@@ -39,7 +39,7 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
     private KuaishouVideoEtlInfoMapper kuaishouVideoEtlInfoMapper;
     @Autowired
     private IKuaiShouReportDailyMaterialService dailyMaterialService;
-    static ExecutorService executorService = Executors.newFixedThreadPool(50);
+    static ExecutorService executorService = Executors.newFixedThreadPool(100);
     @Override
     public void etlKuaishouVideoInfo(Date getDate) {
         String date = DateUtils.formatDate(getDate);
@@ -98,13 +98,13 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                                 }
                             }
                             //计算投放总天数
-                            if(days == 7){
+                            if(days <= 7){
                                 etlInfo.setSingleWeekCost(nowData.getCharge());
                             }
-                            if(days == 14){
+                            if(days <= 14){
                                 etlInfo.setTwoWeekCost(nowData.getCharge());
                             }
-                            if(days == 28){
+                            if(days <= 28){
                                 etlInfo.setFourWeekCost(nowData.getCharge());
                             }
                             //计算是否有效,爆款
@@ -115,8 +115,8 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                             }
                             if(totalCost.compareTo(new BigDecimal("100000"))>0){
                                 //此刻成为爆款
-                                etlInfo.setEffectDate(date);
-                                etlInfo.setEffectDayNum(days);
+                                etlInfo.setFaddishDate(date);
+                                etlInfo.setFaddishDayNum(days);
                             }
                             etlInfo.setCreateTime(new Date());
                             etlInfo.setUpdateTime(new Date());
@@ -131,13 +131,13 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                             etlInfo.setUpdateTime(new Date());
                             BigDecimal totalCost = etlInfo.getTotalCost();
                             //计算投放总天数
-                            if(days == 7){
+                            if(days <= 7){
                                 etlInfo.setSingleWeekCost(nowData.getCharge());
                             }
-                            if(days == 14){
+                            if(days <= 14){
                                 etlInfo.setTwoWeekCost(nowData.getCharge());
                             }
-                            if(days == 28){
+                            if(days <= 28){
                                 etlInfo.setFourWeekCost(nowData.getCharge());
                             }
                             if(null == etlInfo.getEffectDayNum()){
@@ -150,8 +150,8 @@ public class KuaishouVideoEtlInfoServiceImpl extends ServiceImpl<KuaishouVideoEt
                             if(null == etlInfo.getFaddishDayNum()){
                                 if(totalCost.compareTo(new BigDecimal("100000"))>0){
                                     //此刻成为爆款
-                                    etlInfo.setEffectDate(date);
-                                    etlInfo.setEffectDayNum(days);
+                                    etlInfo.setFaddishDate(date);
+                                    etlInfo.setFaddishDayNum(days);
                                 }
                             }
                             this.updateById(etlInfo);

+ 11 - 11
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/BytedanceVideoEtlInfoServiceImpl.java

@@ -35,7 +35,7 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
     private IBytedanceReportMaterialDailyService materialDailyService;
     @Autowired
     private UserAllocationMapper userAllocationMapper;
-    static ExecutorService executorService = Executors.newFixedThreadPool(50);
+    static ExecutorService executorService = Executors.newFixedThreadPool(100);
     @Autowired
     private IMaterialAscriptionService materialAscriptionService;
     @Override
@@ -95,13 +95,13 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
                                 }
                             }
                             //计算投放总天数
-                            if(days == 7){
+                            if(days <= 7){
                                 etlInfo.setSingleWeekCost(nowData.getTotalCost());
                             }
-                            if(days == 14){
+                            if(days <= 14){
                                 etlInfo.setTwoWeekCost(nowData.getTotalCost());
                             }
-                            if(days == 28){
+                            if(days <= 28){
                                 etlInfo.setFourWeekCost(nowData.getTotalCost());
                             }
                             //计算是否有效,爆款
@@ -112,8 +112,8 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
                             }
                             if(totalCost.compareTo(new BigDecimal("100000"))>0){
                                 //此刻成为爆款
-                                etlInfo.setEffectDate(date);
-                                etlInfo.setEffectDayNum(days);
+                                etlInfo.setFaddishDate(date);
+                                etlInfo.setFaddishDayNum(days);
                             }
                             etlInfo.setCreateTime(new Date());
                             etlInfo.setUpdateTime(new Date());
@@ -128,13 +128,13 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
                             etlInfo.setConvertNum(nowData.getConvertNum());
                             etlInfo.setUpdateTime(new Date());
                             //计算投放总天数
-                            if(days == 7){
+                            if(days <= 7){
                                 etlInfo.setSingleWeekCost(nowData.getTotalCost());
                             }
-                            if(days == 14){
+                            if(days <= 14){
                                 etlInfo.setTwoWeekCost(nowData.getTotalCost());
                             }
-                            if(days == 28){
+                            if(days <= 28){
                                 etlInfo.setFourWeekCost(nowData.getTotalCost());
                             }
                             if(null == etlInfo.getEffectDayNum()){
@@ -147,8 +147,8 @@ public class BytedanceVideoEtlInfoServiceImpl extends ServiceImpl<BytedanceVideo
                             if(null == etlInfo.getFaddishDayNum()){
                                 if(totalCost.compareTo(new BigDecimal("100000"))>0){
                                     //此刻成为爆款
-                                    etlInfo.setEffectDate(date);
-                                    etlInfo.setEffectDayNum(days);
+                                    etlInfo.setFaddishDate(date);
+                                    etlInfo.setFaddishDayNum(days);
                                 }
                             }
                             this.updateById(etlInfo);