Browse Source

Merge remote-tracking branch 'origin/master'

songyh 4 năm trước cách đây
mục cha
commit
af6be1fdab
26 tập tin đã thay đổi với 1114 bổ sung65 xóa
  1. 29 4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java
  2. 2 0
      jeecg-boot-module-system/src/main/resources/application-dev.yml
  3. 2 0
      jeecg-boot-module-system/src/main/resources/application-jiaoyang.yml
  4. 2 0
      jeecg-boot-module-system/src/main/resources/application-prod.yml
  5. 2 0
      jeecg-boot-module-system/src/main/resources/application-prod2.yml
  6. 2 0
      jeecg-boot-module-system/src/main/resources/application-test.yml
  7. 2 1
      jeecg-boot-module-system/src/main/resources/application-wps.yml
  8. 56 28
      jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java
  9. 3 0
      module-common/src/main/java/cn/com/ctop/common/module/mapper/MaterialInfoMapper.java
  10. 6 0
      module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/MaterialInfoMapper.xml
  11. 3 0
      module-common/src/main/java/cn/com/ctop/common/module/service/IMaterialInfoService.java
  12. 5 0
      module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java
  13. 794 0
      module-common/src/main/java/cn/com/ctop/common/module/utils/ConverterUtils.java
  14. 9 4
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouAiCreativeJob.java
  15. 6 2
      module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouCreateUnitJob.java
  16. 5 0
      module-job-kuaishou/src/main/resources/application-dev.yml
  17. 5 1
      module-job-kuaishou/src/main/resources/application-jiaoyang.yml
  18. 3 1
      module-job-kuaishou/src/main/resources/application-prod.yml
  19. 4 0
      module-job-kuaishou/src/main/resources/application-test.yml
  20. 16 6
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouCreateCreativeServiceImpl.java
  21. 113 8
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java
  22. 7 0
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/KuaishouReportDailyAccount.java
  23. 6 1
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/KuaishouReportHourlyAccount.java
  24. 16 5
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAccountMapper.xml
  25. 8 2
      module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportHourlyAccountMapper.xml
  26. 8 2
      pom.xml

+ 29 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/TestController.java

@@ -25,6 +25,7 @@ import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouProjectDataService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouAudienceReportDailyService;
 import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportHourlyGroupService;
+import cn.com.ctop.manage.modules.material.service.IMaterialUploadService;
 import cn.com.ctop.toutiao.modules.link.service.IETLReportBytedanceVideoService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.material.service.IBytedanceEffectVideoInfoService;
@@ -39,6 +40,7 @@ import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.util.DateUtils;
 import org.quartz.JobExecutionException;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -132,6 +134,30 @@ public class TestController {
     @Autowired
     private IBatchService batchService;
     static ExecutorService videoService = Executors.newFixedThreadPool(3);
+    @Autowired
+    private IMaterialUploadService materialUploadService;
+
+    @Value("${xxl-job.requestUrl}")
+    private String jobUrl;
+
+    @GetMapping("/uploadVideo")
+    public String uploadVideo(Long projectId) {
+
+        System.err.println(jobUrl + "/jeecg-boot/ai/create/customCreativeLimit");
+
+        //  832
+        JSONArray idList = materialInfoService.getIdListByProject(832L);
+        JSONArray accountArray = new JSONArray();
+
+        accountArray.add(9549277L);
+        accountArray.add(9635234L);
+        accountArray.add(9767697L);
+        accountArray.add(9825207L);
+
+
+        materialUploadService.uploadAccount("2", idList, accountArray, "2e3b982046a44b5faadaa77a7c0da114", true);
+        return "success";
+    }
 
 
     @GetMapping(value = "/getProgramCreative")
@@ -1040,17 +1066,16 @@ public class TestController {
 
 
     @GetMapping(value = "/getHistoryDataByAccountId")
-    public String getHistoryDataByAccountId(Long accountId) {
+    public String getHistoryDataByAccountId(Long accountId, String startDte, String endDate) {
         Result<String> result = new Result<>();
         try {
-            String endDateStr = DateUtils.getDate("yyyy-MM-dd");
-            String startDate = DateUtils.addMonth(endDateStr, -6);
+
             QueryWrapper<CtopOauthToken> tokenQueryWrapper = new QueryWrapper<>();
             tokenQueryWrapper.eq("media_id", 2);
             tokenQueryWrapper.eq("account_id", accountId);
             CtopOauthToken ctopOauthTokens = tokenMapper.selectOne(tokenQueryWrapper);
             if (!Check.isNull(ctopOauthTokens)) {
-                historyReportTaskService.createTask(ctopOauthTokens.getAccountId(), ctopOauthTokens.getAccessToken(), startDate, endDateStr, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
+                historyReportTaskService.createTask(ctopOauthTokens.getAccountId(), ctopOauthTokens.getAccessToken(), startDte, endDate, CtopAdConstant.KUAISHOU_LOAD_JOB_TYPE_HISTORY);
 
             }
         } catch (Exception e) {

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-dev.yml

@@ -290,3 +290,5 @@ ai:
   callback:
     callback-unit-url: http://192.168.1.193:31012/ai_callback_add_group
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://jiaoyangapi.shyouteng.com.cn

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-jiaoyang.yml

@@ -261,3 +261,5 @@ ai:
   callback:
     callback-unit-url: http://139.186.27.96:31012/ai_callback_add_group
     callback-creative-url: http://139.186.27.96:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://jiaoyangapi.shyouteng.com.cn

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-prod.yml

@@ -261,3 +261,5 @@ ai:
   callback:
     callback-unit-url: http://139.186.27.96:31012/ai_callback_add_group
     callback-creative-url: http://139.186.27.96:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://api.tjyourong.com.cn

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-prod2.yml

@@ -253,3 +253,5 @@ ai:
   callback:
     callback-unit-url: http://139.186.27.96:31012/ai_callback_add_group
     callback-creative-url: http://139.186.27.96:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://api.tjyourong.com.cn

+ 2 - 0
jeecg-boot-module-system/src/main/resources/application-test.yml

@@ -250,3 +250,5 @@ ai:
   callback:
     callback-unit-url: http://192.168.1.193:31012/ai_callback_add_group
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
+xxl-job:
+  requestUrl: http://jiaoyangapi.shyouteng.com.cn

+ 2 - 1
jeecg-boot-module-system/src/main/resources/application-wps.yml

@@ -248,4 +248,5 @@ ai:
   callback:
     callback-unit-url: http://192.168.1.193:31012/ai_callback_add_group
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
-
+xxl-job:
+  requestUrl: http://jiaoyangapi.shyouteng.com.cn

+ 56 - 28
jeecg-boot-module-system/src/test/java/org/jeecg/SampleTest.java

@@ -2,24 +2,18 @@ package org.jeecg;
 
 import cn.com.ctop.common.module.entity.BindAccountLogin;
 import cn.com.ctop.common.module.entity.CtopOauthToken;
-import cn.com.ctop.common.module.entity.UserAllocation;
 import cn.com.ctop.common.module.service.IBindAccountLoginService;
 import cn.com.ctop.common.module.service.ICtopOauthTokenService;
-import cn.com.ctop.common.module.service.IUserAllocationService;
 import cn.com.ctop.common.module.utils.CtopAdConstant;
-import cn.com.ctop.kuaishou.modules.batch.service.*;
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
 import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
-import cn.com.ctop.kuaishou.modules.material.service.IEtlKuaishouVideoInfoService;
 import cn.com.ctop.kuaishou.modules.report.mapper.EtlKuaishouAccountMaterialReportDailyMapper;
-import cn.com.ctop.kuaishou.modules.report.service.*;
-import cn.com.ctop.oa.modules.service.IWechatCheckinDataService;
+import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyImageService;
 import cn.com.ctop.oa.modules.service.IWechatNoListService;
-import cn.com.ctop.oa.modules.service.IWechatUserListService;
 import cn.com.ctop.toutiao.modules.link.service.IETLReportBytedanceVideoService;
-import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
 import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
-import cn.com.ctop.toutiao.modules.report.entity.BytedanceAccountReportTaskRecord;
 import cn.com.ctop.toutiao.modules.report.service.*;
+import com.csvreader.CsvReader;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.junit.Test;
@@ -30,8 +24,10 @@ import org.springframework.test.context.ActiveProfiles;
 import org.springframework.test.context.junit4.SpringRunner;
 
 import javax.annotation.Resource;
+import java.io.IOException;
+import java.nio.charset.Charset;
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -39,8 +35,6 @@ import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
-import static org.jeecg.common.util.DateUtils.getAnotherDay;
-
 @RunWith(SpringRunner.class)
 @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
 @ActiveProfiles("wps")
@@ -52,19 +46,47 @@ public class SampleTest {
     private IBindAccountLoginService bindAccountLoginService;
     @Autowired
     private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
+    @Autowired
+    private IKuaishouInterfaceService kuaishouInterfaceService;
 
     @Test
-    public void loadKuaishouCookie() {
-        List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY, 1);
-        if (list != null && !list.isEmpty()) {
-            int i = 0;
-            for (BindAccountLogin login : list) {
-                if (null == login.getCookie() || "".equals(login.getCookie().trim())) {
-                    kuaishouWebInterfaceService.getkuaishouWebLoginCookie(login);
-                    i++;
-                }
+    public void loadKuaishouCookie() throws ParseException {
+
+
+        try {
+            // 用来保存数据
+            ArrayList<String[]> csvFileList = new ArrayList<String[]>();
+            // 定义一个CSV路径
+            String csvFilePath = "D:\\test\\123.csv";
+            // 创建CSV读对象 例如:CsvReader(文件路径,分隔符,编码格式);
+            CsvReader reader = new CsvReader(csvFilePath, ',', Charset.forName("UTF-8"));
+            // 跳过表头 如果需要表头的话,这句可以忽略
+            reader.readHeaders();
+            // 逐行读入除表头的数据
+            while (reader.readRecord()) {
+                System.out.println(reader.getRawRecord());
+                csvFileList.add(reader.getValues());
+            }
+            reader.close();
+
+            // 遍历读取的CSV文件
+            for (int row = 0; row < csvFileList.size(); row++) {
+                // 取得第row行第0列的数据
+                String cell = csvFileList.get(row)[0];
+                System.out.println("------------>" + cell);
             }
+        } catch (IOException e) {
+            e.printStackTrace();
         }
+
+
+
+
+
+       /* CtopOauthToken tokenByAccountId = tokenService.getTokenByAccountId(9792526L);
+        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date parse = dateFormat.parse("2021-04-02");
+        kuaishouInterfaceService.getAdvertiserReportDaily(tokenByAccountId, parse, parse, null);*/
     }
 
 
@@ -96,6 +118,7 @@ public class SampleTest {
             log.info("快手删评论所用时长:{}毫秒", end - start);
         }
     }
+
     @Autowired
     private IBytedanceReportService bytedanceReportService;
 
@@ -106,7 +129,7 @@ public class SampleTest {
         List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
         Long start = System.currentTimeMillis();
 
-        tokens.forEach(token->{
+        tokens.forEach(token -> {
             bytedanceReportService.bytedanceVideoMaterialReport(token, startDate, endDate);
         });
         Long end = System.currentTimeMillis();
@@ -117,11 +140,12 @@ public class SampleTest {
     private IWechatNoListService wechatNoListService;
     @Autowired
     private IETLReportBytedanceVideoService bytedanceVideoService;
+
     @Test
-    public void etlBytedanceVideoInfo(){
+    public void etlBytedanceVideoInfo() {
         String startDate = "2021-02-01";
-        for(int i=0;i<100;i++){
-            bytedanceVideoService.cleanData(DateUtils.addDay(startDate,i));
+        for (int i = 0; i < 100; i++) {
+            bytedanceVideoService.cleanData(DateUtils.addDay(startDate, i));
         }
     }
 
@@ -162,6 +186,7 @@ public class SampleTest {
     IKuaishouReportDailyImageService kuaishouReportDailyImageService;
     @Autowired
     IRuleByteDanceAccountService ruleByteDanceAccountService;
+
     @Test
     public void loadBDAccoutData() {
         Date startDate = DateUtils.addDay(new Date(), -2000);
@@ -170,6 +195,7 @@ public class SampleTest {
             bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
         }
     }
+
     @Resource
     private EtlKuaishouAccountMaterialReportDailyMapper etlKuaishouAccountMaterialReportDailyMapper;
 
@@ -177,12 +203,14 @@ public class SampleTest {
     public void etlKuaishouVideoInfo() {
         etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouAccountMaterialReportDailyData(DateUtils.formatDate());
     }
+
     @Autowired
     private IByteDanceCampaignService campaignService;
+
     @Test
-    public void testLoadBytedanceCampaign(){
-        List<CtopOauthToken>tokens = tokenService.selectToutiaoToken();
-        for(CtopOauthToken token :tokens){
+    public void testLoadBytedanceCampaign() {
+        List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
+        for (CtopOauthToken token : tokens) {
             campaignService.getAdvertiserCampaign(token, null, null);
         }
     }

+ 3 - 0
module-common/src/main/java/cn/com/ctop/common/module/mapper/MaterialInfoMapper.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.common.module.mapper;
 
 import cn.com.ctop.common.module.entity.MaterialInfo;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import org.apache.ibatis.annotations.Param;
@@ -36,4 +37,6 @@ public interface MaterialInfoMapper extends BaseMapper<MaterialInfo> {
     List<MaterialInfo> getListByDate(@Param("startDate") String startDate,@Param("endDate") String endDate);
 
     List<MaterialInfo> getListByParams(@Param("tagCode")String tagCode,@Param("type")String type, @Param("status")Integer status, @Param("projectIds")List<Long> projectIds, @Param("materialName")String materialName, @Param("code")String code, @Param("startDate")String startDate, @Param("endDate")String endDate, @Param("userId")String userId);
+
+    JSONArray getIdListByProject(Long projectId);
 }

+ 6 - 0
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/MaterialInfoMapper.xml

@@ -134,6 +134,12 @@
         and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= #{startDate}
         and DATE_FORMAT(create_time,'%Y-%m-%d') &lt;= #{endDate}
     </select>
+    <select id="getIdListByProject" resultType="java.lang.String">
+        select id  from  ctop_material_info
+        where project_id = #{projectId}
+        and status != 2
+        and DATE_FORMAT(create_time,'%Y-%m-%d') &gt;= '2021-04-28'
 
+    </select>
 
 </mapper>

+ 3 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/IMaterialInfoService.java

@@ -1,6 +1,7 @@
 package cn.com.ctop.common.module.service;
 
 import cn.com.ctop.common.module.entity.MaterialInfo;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.extension.service.IService;
 import org.apache.ibatis.annotations.Param;
@@ -78,4 +79,6 @@ public interface IMaterialInfoService extends IService<MaterialInfo> {
     List<MaterialInfo> getListByDate(String startDate, String endDate);
 
     Map<String, Object> getListByParams(String tagCode, String type, Integer status, List<Long> projectIds, String materialName, String code, String startDate, String endDate, String userId, Integer pageNo, Integer pageSize);
+
+    JSONArray getIdListByProject(Long projectId);
 }

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

@@ -818,6 +818,11 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
         ResultMapUtils.setResultMap(result, StatusCode.COMMON_SUCCESS);
         return result;
     }
+
+    @Override
+    public JSONArray getIdListByProject(Long projectId) {
+        return materialInfoMapper.getIdListByProject(projectId);
+    }
 }
 
 

+ 794 - 0
module-common/src/main/java/cn/com/ctop/common/module/utils/ConverterUtils.java

@@ -0,0 +1,794 @@
+package cn.com.ctop.common.module.utils;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.text.NumberFormat;
+import java.text.ParseException;
+
+/**
+ * A simple object converter
+ * <br>
+ * 一个简单的数据类型转换工具类
+ */
+public class ConverterUtils {
+
+    public static void main(String[] args) {
+        Long asLong = ConverterUtils.getAsLong("12121.3444");
+        System.err.println(asLong);
+    }
+
+
+    /**
+     * Gets a String from a Object in a null-safe manner.
+     * <p>
+     * The String is obtained via <code>toString</code>.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a String, <code>null</code> if null object input
+     */
+    public static String getAsString(final Object obj) {
+        if (obj != null) {
+            return obj.toString();
+        }
+        return null;
+    }
+
+    /**
+     * Gets a String from a Object in a null-safe manner.
+     * <p>
+     * The String is obtained via <code>toString</code>.
+     *
+     * @param obj          the object to use
+     * @param defaultValue what to return if the value is null or if the conversion fails
+     * @return the value of the Object as a String, <code>defaultValue</code> if null object input
+     */
+    public static String getAsString(final Object obj, final String defaultValue) {
+        String answer = getAsString(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return answer;
+    }
+
+    /**
+     * Gets a Number from a Object in a null-safe manner.
+     * <p>
+     * If the value is a <code>Number</code> it is returned directly.
+     * If the value is a <code>String</code> it is converted using
+     * {@link NumberFormat#parse(String)} on the system default formatter
+     * returning <code>null</code> if the conversion fails.
+     * Otherwise, <code>null</code> is returned.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a Number, <code>null</code> if null object input
+     */
+    public static Number getAsNumber(final Object obj) {
+        if (obj != null) {
+            if (obj instanceof Number) {
+                return (Number) obj;
+            } else if (obj instanceof Boolean) {
+                return ((Boolean) obj) ? 1 : 0;
+            } else if (obj instanceof String) {
+                try {
+                    return NumberFormat.getInstance().parse((String) obj);
+                } catch (final ParseException e) {
+                    throw new NumberFormatException("For input string: \"" + obj + "\"");
+                }
+            } else {
+                throw new UnsupportedOperationException();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Converting the Object into a number,
+     * using the default value if the the conversion fails.
+     *
+     * @param obj          the object to use
+     * @param defaultValue what to return if the value is null or if the conversion fails
+     * @return the value of the object as a number, or defaultValue if the
+     * original value is null, the object is null or the number conversion
+     * fails
+     */
+    @SuppressWarnings("unchecked")
+    public static <R extends Number> R getAsNumber(final Object obj, R defaultValue) {
+        Number answer = getAsNumber(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return (R) answer;
+    }
+
+    /**
+     * Gets a Boolean from a Object in a null-safe manner.
+     * <p>
+     * If the value is a <code>Boolean</code> it is returned directly.
+     * If the value is a <code>String</code> and it equals 'true' ignoring case
+     * then <code>true</code> is returned, otherwise <code>false</code>.
+     * If the value is a <code>Number</code> an integer zero value returns
+     * <code>false</code> and non-zero returns <code>true</code>.
+     * Otherwise, <code>null</code> is returned.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a Boolean, <code>null</code> if null object input
+     */
+    public static Boolean getAsBoolean(final Object obj) {
+        if (obj != null) {
+            if (obj instanceof Boolean) {
+                return (Boolean) obj;
+            } else if (obj instanceof String) {
+                return Boolean.valueOf((String) obj);
+            } else if (obj instanceof Number) {
+                final Number n = (Number) obj;
+                return (n.intValue() != 0) ? Boolean.TRUE : Boolean.FALSE;
+            } else {
+                throw new UnsupportedOperationException();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Gets a Boolean from a Object in a null-safe manner.
+     * <p>
+     * If the value is a <code>Boolean</code> it is returned directly.
+     * If the value is a <code>String</code> and it equals 'true' ignoring case
+     * then <code>true</code> is returned, otherwise <code>false</code>.
+     * If the value is a <code>Number</code> an integer zero value returns
+     * <code>false</code> and non-zero returns <code>true</code>.
+     * Otherwise, <code>null</code> is returned.
+     *
+     * @param obj          the object to use
+     * @param defaultValue what to return if the value is null or if the conversion fails
+     * @return the value of the Object as a Boolean, <code>defaultValue</code> if null object input
+     */
+    public static Boolean getAsBoolean(final Object obj, final Boolean defaultValue) {
+        Boolean answer = getAsBoolean(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return answer;
+    }
+
+    /**
+     * Gets a boolean from a Object in a null-safe manner.
+     * <p>
+     * If the value is a <code>Boolean</code> its value is returned.
+     * If the value is a <code>String</code> and it equals 'true' ignoring case
+     * then <code>true</code> is returned, otherwise <code>false</code>.
+     * If the value is a <code>Number</code> an integer zero value returns
+     * <code>false</code> and non-zero returns <code>true</code>.
+     * Otherwise, <code>false</code> is returned.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a Boolean, <code>false</code> if null object input
+     */
+    public static boolean getAsBooleanValue(final Object obj) {
+        final Boolean booleanObject = getAsBoolean(obj);
+        if (booleanObject == null) {
+            return false;
+        }
+        return booleanObject.booleanValue();
+    }
+
+    /**
+     * Gets a boolean from a Object in a null-safe manner.
+     * <p>
+     * If the value is a <code>Boolean</code> its value is returned.
+     * If the value is a <code>String</code> and it equals 'true' ignoring case
+     * then <code>true</code> is returned, otherwise <code>false</code>.
+     * If the value is a <code>Number</code> an integer zero value returns
+     * <code>false</code> and non-zero returns <code>true</code>.
+     * Otherwise, <code>false</code> is returned.
+     *
+     * @param obj          the object to use
+     * @param defaultValue what to return if the value is null or if the conversion fails
+     * @return the value in the Map as a Boolean, <code>defaultValue</code> if null object input
+     */
+    public static boolean getAsBooleanValue(final Object obj, final boolean defaultValue) {
+        final Boolean booleanObject = getAsBoolean(obj);
+        if (booleanObject == null) {
+            return defaultValue;
+        }
+        return booleanObject.booleanValue();
+    }
+
+    /**
+     * Gets a Byte from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The Byte is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of Object as a Byte, <code>null</code> if null object input
+     */
+    public static Byte getAsByte(final Object obj) {
+        final Number answer = getAsNumber(obj);
+        if (answer == null) {
+            return null;
+        } else if (answer instanceof Byte) {
+            return (Byte) answer;
+        }
+        return Byte.valueOf(answer.byteValue());
+    }
+
+    /**
+     * Gets a Byte from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The Byte is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a Byte, <code>defaultValue</code> if null object input
+     */
+    public static Byte getAsByte(final Object obj, final Byte defaultValue) {
+        Byte answer = getAsByte(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return answer;
+    }
+
+    /**
+     * Gets a byte from a Object in a null-safe manner.
+     * <p>
+     * The byte is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a byte, <code>0</code> if null object input
+     */
+    public static byte getAsByteValue(final Object obj) {
+        final Byte byteObject = getAsByte(obj);
+        if (byteObject == null) {
+            return 0;
+        }
+        return byteObject.byteValue();
+    }
+
+    /**
+     * Gets a byte from a Object in a null-safe manner.
+     * <p>
+     * The byte is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of the Object as a byte, <code>defaultValue</code> if null object input
+     */
+    public static byte getAsByteValue(final Object obj, final byte defaultValue) {
+        final Byte byteObject = getAsByte(obj);
+        if (byteObject == null) {
+            return defaultValue;
+        }
+        return byteObject.byteValue();
+    }
+
+    /**
+     * Gets a Short from a Object in a null-safe manner.
+     * <p>
+     * The Short is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a Short, <code>null</code> if null object input
+     */
+    public static Short getAsShort(final Object obj) {
+        final Number answer = getAsNumber(obj);
+        if (answer == null) {
+            return null;
+        } else if (answer instanceof Short) {
+            return (Short) answer;
+        }
+        return Short.valueOf(answer.shortValue());
+    }
+
+    /**
+     * Gets a Short from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The Short is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a Short, <code>defaultValue</code> if null object input
+     */
+    public static Short getAsShort(final Object obj, final Short defaultValue) {
+        Short answer = getAsShort(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return answer;
+    }
+
+    /**
+     * Gets a short from a Object in a null-safe manner.
+     * <p>
+     * The short is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a short, <code>0</code> if null object input
+     */
+    public static short getAsShortValue(final Object obj) {
+        final Short shortObject = getAsShort(obj);
+        if (shortObject == null) {
+            return 0;
+        }
+        return shortObject.shortValue();
+    }
+
+    /**
+     * Gets a short from a Object in a null-safe manner.
+     * <p>
+     * The short is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of the Object as a short, <code>defaultValue</code> if null object input
+     */
+    public static short getAsShortValue(final Object obj, final short defaultValue) {
+        final Short shortObject = getAsShort(obj);
+        if (shortObject == null) {
+            return defaultValue;
+        }
+        return shortObject.shortValue();
+    }
+
+    /**
+     * Gets a Integer from a Object in a null-safe manner.
+     * <p>
+     * The Integer is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a Integer, <code>null</code> if null object input
+     */
+    public static Integer getAsInteger(final Object obj) {
+        final Number answer = getAsNumber(obj);
+        if (answer == null) {
+            return null;
+        } else if (answer instanceof Integer) {
+            return (Integer) answer;
+        }
+        return Integer.valueOf(answer.intValue());
+    }
+
+    /**
+     * Gets a Integer from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The Integer is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a Integer, <code>defaultValue</code> if null object input
+     */
+    public static Integer getAsInteger(final Object obj, final Integer defaultValue) {
+        Integer answer = getAsInteger(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return answer;
+    }
+
+    /**
+     * Gets a int from a Object in a null-safe manner.
+     * <p>
+     * The int is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a int, <code>0</code> if null object input
+     */
+    public static int getAsIntValue(final Object obj) {
+        final Integer integerObject = getAsInteger(obj);
+        if (integerObject == null) {
+            return 0;
+        }
+        return integerObject.intValue();
+    }
+
+    /**
+     * Gets a int from a Object in a null-safe manner.
+     * <p>
+     * The int is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of the Object as a int, <code>defaultValue</code> if null object input
+     */
+    public static int getAsIntValue(final Object obj, final int defaultValue) {
+        final Integer integerObject = getAsInteger(obj);
+        if (integerObject == null) {
+            return defaultValue;
+        }
+        return integerObject.intValue();
+    }
+
+    /**
+     * Gets a Long from a Object in a null-safe manner.
+     * <p>
+     * The Long is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a Long, <code>null</code> if null object input
+     */
+    public static Long getAsLong(final Object obj) {
+        final Number answer = getAsNumber(obj);
+        if (Check.isNull(answer)) {
+            return null;
+        } else if (answer instanceof Long) {
+            return (Long) answer;
+        }
+        return Long.valueOf(answer.longValue());
+    }
+
+    /**
+     * Gets a Long from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The Long is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a Long, <code>defaultValue</code> if null object input
+     */
+    public static Long getAsLong(final Object obj, final Long defaultValue) {
+        Long answer = getAsLong(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return answer;
+    }
+
+    /**
+     * Gets a long from a Object in a null-safe manner.
+     * <p>
+     * The long is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a long, <code>0L</code> if null object input
+     */
+    public static long getAsLongValue(final Object obj) {
+        final Long longObject = getAsLong(obj);
+        if (longObject == null) {
+            return 0L;
+        }
+        return longObject.longValue();
+    }
+
+    /**
+     * Gets a long from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The long is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a long, <code>defaultValue</code> if null object input
+     */
+    public static long getAsLongValue(final Object obj, final long defaultValue) {
+        final Long longObject = getAsLong(obj);
+        if (longObject == null) {
+            return defaultValue;
+        }
+        return longObject.longValue();
+    }
+
+    /**
+     * Gets a Float from a Object in a null-safe manner.
+     * <p>
+     * The Float is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a Float, <code>null</code> if null object input
+     */
+    public static Float getAsFloat(final Object obj) {
+        final Number answer = getAsNumber(obj);
+        if (answer == null) {
+            return null;
+        } else if (answer instanceof Float) {
+            return (Float) answer;
+        }
+        return Float.valueOf(answer.floatValue());
+    }
+
+    /**
+     * Gets a Float from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The Float is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a Float, <code>defaultValue</code> if null object input
+     */
+    public static Float getAsFloat(final Object obj, final Float defaultValue) {
+        Float answer = getAsFloat(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return answer;
+    }
+
+    /**
+     * Gets a float from a Object in a null-safe manner.
+     * <p>
+     * The float is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of Object as a float, <code>0.0F</code> if null object input
+     */
+    public static float getAsFloatValue(final Object obj) {
+        final Float floatObject = getAsFloat(obj);
+        if (floatObject == null) {
+            return 0f;
+        }
+        return floatObject.floatValue();
+    }
+
+    /**
+     * Gets a float from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The float is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a float, <code>defaultValue</code> if null object input
+     */
+    public static float getAsFloatValue(final Object obj, final float defaultValue) {
+        final Float floatObject = getAsFloat(obj);
+        if (floatObject == null) {
+            return defaultValue;
+        }
+        return floatObject.floatValue();
+    }
+
+    /**
+     * Gets a Double from a Object in a null-safe manner.
+     * <p>
+     * The Double is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of the Object as a Double, <code>null</code> if null object input
+     */
+    public static Double getAsDouble(final Object obj) {
+        final Number answer = getAsNumber(obj);
+        if (Check.isNull(answer)) {
+            return null;
+        } else if (answer instanceof Double) {
+            return (Double) answer;
+        }
+        return Double.valueOf(answer.doubleValue());
+    }
+
+    /**
+     * Gets a Double from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The Double is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a Double, <code>defaultValue</code> if null object input
+     */
+    public static Double getAsDouble(final Object obj, final Double defaultValue) {
+        Double answer = getAsDouble(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return answer;
+    }
+
+    /**
+     * Gets a double from a Object in a null-safe manner.
+     * <p>
+     * The double is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of Object as a double, <code>0.0</code> if null object input
+     */
+    public static double getAsDoubleValue(final Object obj) {
+        final Double doubleObject = getAsDouble(obj);
+        if (doubleObject == null) {
+            return 0d;
+        }
+        return doubleObject.doubleValue();
+    }
+
+    /**
+     * Gets a double from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The double is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a double, <code>defaultValue</code> if null object input
+     */
+    public static double getAsDoubleValue(final Object obj, final double defaultValue) {
+        final Double doubleObject = getAsDouble(obj);
+        if (doubleObject == null) {
+            return defaultValue;
+        }
+        return doubleObject.doubleValue();
+    }
+
+    /**
+     * Gets a BigInteger from a Object in a null-safe manner.
+     * <p>
+     * The BigInteger is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of Object as a BigInteger, <code>0</code> if null object input
+     */
+    public static BigInteger getAsBigInteger(final Object obj) {
+        if (obj != null) {
+            if (obj instanceof BigInteger) {
+                return (BigInteger) obj;
+            } else if (obj instanceof String) {
+                return new BigInteger((String) obj);
+            } else if (obj instanceof Number || obj instanceof Boolean) {
+                final Number answer = getAsNumber(obj);
+                if (answer != null) {
+                    return BigInteger.valueOf(answer.longValue());
+                }
+            } else {
+                throw new UnsupportedOperationException();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Gets a BigInteger from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The BigInteger is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a BigInteger, <code>defaultValue</code> if null object input
+     */
+    @SuppressWarnings("unchecked")
+    public static <R extends BigInteger> R getAsBigInteger(final Object obj, final R defaultValue) {
+        BigInteger answer = getAsBigInteger(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return (R) answer;
+    }
+
+    /**
+     * Gets a BigDecimal from a Object in a null-safe manner.
+     * <p>
+     * The BigDecimal is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj the object to use
+     * @return the value of Object as a BigDecimal, <code>0</code> if null object input
+     */
+    public static BigDecimal getAsBigDecimal(final Object obj) {
+        if (!Check.isNull(obj)) {
+            if (obj instanceof BigDecimal) {
+                return (BigDecimal) obj;
+            } else if (obj instanceof String) {
+                return new BigDecimal((String) obj);
+            } else if (obj instanceof Number || obj instanceof Boolean) {
+                final Number answer = getAsNumber(obj);
+                if (answer != null) {
+                    return BigDecimal.valueOf(answer.doubleValue());
+                }
+            } else {
+                throw new UnsupportedOperationException();
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Gets a BigDecimal from a Object in a null-safe manner,
+     * using the default value if the the conversion fails.
+     * <p>
+     * The BigDecimal is obtained from the results of {@link #getAsNumber(Object)}.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return the value of Object as a BigDecimal, <code>defaultValue</code> if null object input
+     */
+    @SuppressWarnings("unchecked")
+    public static <R extends BigDecimal> R getAsBigDecimal(final Object obj, final R defaultValue) {
+        BigDecimal answer = getAsBigDecimal(obj);
+        if (answer == null) {
+            answer = defaultValue;
+        }
+        return (R) answer;
+    }
+
+    /**
+     * This method is mainly used to provide data type conversion services.
+     *
+     * @param obj the object to use
+     * @param clz the type for conversion
+     * @return
+     */
+    @SuppressWarnings("unchecked")
+    public static <R> R cast(final Object obj, final Class<R> clz) {
+        if (obj == null) {
+            throw new IllegalArgumentException("'obj' must not be null");
+        }
+        if (clz == null) {
+            throw new IllegalArgumentException("'clz' must not be null");
+        }
+        R result = null;
+        if (Boolean.class.equals(clz) || boolean.class.equals(clz)) {
+            result = (R) getAsBoolean(obj);
+        } else if (Byte.class.equals(clz) || byte.class.equals(clz)) {
+            result = (R) getAsByte(obj);
+        } else if (Short.class.equals(clz) || short.class.equals(clz)) {
+            result = (R) getAsShort(obj);
+        } else if (Integer.class.equals(clz) || int.class.equals(clz)) {
+            result = (R) getAsInteger(obj);
+        } else if (Long.class.equals(clz) || long.class.equals(clz)) {
+            result = (R) getAsLong(obj);
+        } else if (Float.class.equals(clz) || float.class.equals(clz)) {
+            result = (R) getAsFloat(obj);
+        } else if (Double.class.equals(clz) || double.class.equals(clz)) {
+            result = (R) getAsDouble(obj);
+        } else if (String.class.equals(clz)) {
+            result = (R) getAsString(obj);
+        } else if (BigInteger.class.isAssignableFrom(clz)) {
+            result = (R) getAsBigInteger(obj);
+        } else if (BigDecimal.class.isAssignableFrom(clz)) {
+            result = (R) getAsBigDecimal(obj);
+        } else if (Number.class.isAssignableFrom(clz)) {
+            result = (R) getAsNumber(obj);
+        } else {
+            throw new UnsupportedOperationException();
+        }
+        return result;
+    }
+
+    /**
+     * This method is mainly used to provide data type conversion services.
+     *
+     * @param obj          the object to use
+     * @param defaultValue return if the value is null or if the conversion fails
+     * @return
+     */
+    @SuppressWarnings("unchecked")
+    public static <R> R cast(final Object obj, final R defaultValue) {
+        if (obj == null) {
+            throw new IllegalArgumentException("'obj' must not be null");
+        }
+        if (defaultValue == null) {
+            throw new IllegalArgumentException("'defaultValue' must not be null");
+        }
+        R result = null;
+        final Class<?> clz = defaultValue.getClass();
+        if (Boolean.class.equals(clz) || boolean.class.equals(clz)) {
+            result = (R) getAsBoolean(obj, (Boolean) defaultValue);
+        } else if (Byte.class.equals(clz) || byte.class.equals(clz)) {
+            result = (R) getAsByte(obj, (Byte) defaultValue);
+        } else if (Short.class.equals(clz) || short.class.equals(clz)) {
+            result = (R) getAsShort(obj, (Short) defaultValue);
+        } else if (Integer.class.equals(clz) || int.class.equals(clz)) {
+            result = (R) getAsInteger(obj, (Integer) defaultValue);
+        } else if (Long.class.equals(clz) || long.class.equals(clz)) {
+            result = (R) getAsLong(obj, (Long) defaultValue);
+        } else if (Float.class.equals(clz) || float.class.equals(clz)) {
+            result = (R) getAsFloat(obj, (Float) defaultValue);
+        } else if (Double.class.equals(clz) || double.class.equals(clz)) {
+            result = (R) getAsDouble(obj, (Double) defaultValue);
+        } else if (String.class.equals(clz)) {
+            result = (R) getAsString(obj, (String) defaultValue);
+        } else if (BigInteger.class.isAssignableFrom(clz)) {
+            result = (R) getAsBigInteger(obj, (BigInteger) defaultValue);
+        } else if (BigDecimal.class.isAssignableFrom(clz)) {
+            result = (R) getAsBigDecimal(obj, (BigDecimal) defaultValue);
+        } else if (Number.class.isAssignableFrom(clz)) {
+            result = (R) getAsNumber(obj, (Number) defaultValue);
+        } else {
+            throw new UnsupportedOperationException();
+        }
+        return result;
+    }
+
+}

+ 9 - 4
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouAiCreativeJob.java

@@ -9,6 +9,7 @@ import com.xxl.job.core.handler.annotation.XxlJob;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 import java.text.ParseException;
@@ -23,6 +24,10 @@ import java.util.Map;
 @Component
 @Slf4j
 public class KuaishouAiCreativeJob {
+
+    @Value("${xxl-job.requestUrl}")
+    private String jobUrl;
+
     @Autowired
     private IAiKuaishouAdvertiserStrategyService strategyService;
 
@@ -35,7 +40,7 @@ public class KuaishouAiCreativeJob {
         if (null == strategies || strategies.isEmpty()) {
             return;
         }
-        String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/customCreativeLimit";
+        String url = jobUrl + "/jeecg-boot/ai/create/customCreativeLimit";
         for (AiKuaishouAdvertiserStrategy strategy : strategies) {
             if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 1) {
                 Map<String, Object> requestMap = new HashMap<>();
@@ -68,7 +73,7 @@ public class KuaishouAiCreativeJob {
             return;
         }
         try {
-            String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/kuaishouCustomCreativeSupplement";
+            String url = jobUrl + "/jeecg-boot/ai/create/kuaishouCustomCreativeSupplement";
             int hour = DateUtils.getNowHour();
             for (AiKuaishouAdvertiserStrategy strategy : strategies) {
                 if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 1) {
@@ -105,7 +110,7 @@ public class KuaishouAiCreativeJob {
         if (null == strategies || strategies.isEmpty()) {
             return;
         }
-        String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/kuaishouProgramCreativeAuto";
+        String url = jobUrl + "/jeecg-boot/ai/create/kuaishouProgramCreativeAuto";
         for (AiKuaishouAdvertiserStrategy strategy : strategies) {
             if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 0) {
                 long videoCnt = strategy.getProgramUnitCnt() * 5 / 2;
@@ -141,7 +146,7 @@ public class KuaishouAiCreativeJob {
         if (null == strategies || strategies.isEmpty()) {
             return;
         }
-        String url = "http://api.tjyourong.com.cn/jeecg-boot/ai/create/autoCreateProgramHistoryTopCreative";
+        String url = jobUrl + "/jeecg-boot/ai/create/autoCreateProgramHistoryTopCreative";
         for (AiKuaishouAdvertiserStrategy strategy : strategies) {
             if (null != strategy.getOpenProgramCreate() && strategy.getOpenProgramCreate() != 0) {
                 long videoCnt = strategy.getProgramUnitCnt() * 5 / 2;

+ 6 - 2
module-job-kuaishou/src/main/java/cn/com/ctop/job/kuaishou/handler/KuaishouCreateUnitJob.java

@@ -6,6 +6,7 @@ import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupTemplateService;
 import com.xxl.job.core.context.XxlJobHelper;
 import com.xxl.job.core.handler.annotation.XxlJob;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 import java.util.HashMap;
@@ -18,16 +19,19 @@ public class KuaishouCreateUnitJob {
 
     @Autowired
     private IKuaiShouGroupTemplateService groupTemplateService;
+    @Value("${xxl-job.requestUrl}")
+    private String jobUrl;
 
     @XxlJob("kuaihouCreateUnit")
     public void execute() {
-
+        String url = jobUrl + "/jeecg-boot/batch/kuaiShouGroupTemplate/createUnit";
+        System.err.println("请求地址:" + url);
         List<Long> idList = groupTemplateService.getIdList();
         if (Check.isNull(idList)) {
             XxlJobHelper.log("批量2.0暂时没有未创建的组");
             return;
         }
-        String url = "http://api.tjyourong.com.cn/jeecg-boot/batch/kuaiShouGroupTemplate/createUnit";
+    //    String url = jobUrl + "/jeecg-boot/batch/kuaiShouGroupTemplate/createUnit";
         for (int i = 0; i < idList.size(); i++) {
             Long id = idList.get(i);
             Map<String, Object> requestMap = new HashMap<>();

+ 5 - 0
module-job-kuaishou/src/main/resources/application-dev.yml

@@ -183,6 +183,7 @@ bytedance:
     ad-report-get: /2/report/ad/get/
     ad-creative-get: /2/report/creative/get/
     advertiser-fund-daily-stat: /2/advertiser/fund/daily_stat/
+
 xxl:
   job:
     accessToken:
@@ -194,4 +195,8 @@ xxl:
       logretentiondays: 30
     admin:
       addresses: 127.0.0.1:8090/xxl-job-admin/
+xxl-job:
+  requestUrl: http://localhost:8080
+
+
 

+ 5 - 1
module-job-kuaishou/src/main/resources/application-jiaoyang.yml

@@ -234,4 +234,8 @@ ai:
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
 zip:
   local:
-    download-path: /data/unzip/
+    download-path: /data/unzip/
+xxl-job:
+    requestUrl: http://jiaoyangapi.shyouteng.com.cn
+
+

+ 3 - 1
module-job-kuaishou/src/main/resources/application-prod.yml

@@ -234,4 +234,6 @@ ai:
     callback-creative-url: http://192.168.1.193:31012/ai_callback_add_creative
 zip:
   local:
-    download-path: /data/unzip/
+    download-path: /data/unzip/
+xxl-job:
+  requestUrl: http://api.tjyourong.com.cn

+ 4 - 0
module-job-kuaishou/src/main/resources/application-test.yml

@@ -212,3 +212,7 @@ xxl:
       logretentiondays: 30
     admin:
       addresses: http://127.0.0.1:8090/xxl-job-admin
+xxl-job:
+  requestUrl:
+
+

+ 16 - 6
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouCreateCreativeServiceImpl.java

@@ -127,7 +127,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                         unitCnt++;
                         //开始创建组+创意
                         String timestamp = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
-                        String unitName = getName(strategy.getGroupName(), strategy, createType, appInfo, timestamp, unitCnt);
+                        String unitName = getName(strategy.getGroupName(), strategy, createType, appInfo, timestamp, unitCnt, videoItem.getPhotoName());
                         JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appInfo.getAppId());
                         Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
                         Integer unitCode = (Integer) unitCreateResult.get("code");
@@ -185,7 +185,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                 }
                 unitCnt++;
                 String timestamp = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
-                String unitName = getName(strategy.getGroupName(), strategy, createType, null, timestamp, unitCnt);
+                String unitName = getName(strategy.getGroupName(), strategy, createType, null, timestamp, unitCnt, videoItem.getPhotoName());
 
                 Long appId = null;
                 if (strategy.getCampaignType() == 2 || strategy.getCampaignType() == 7) {
@@ -295,7 +295,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                     for (int j = 1; j < splitVideos.size() + 1; j++) {
                         //创建组
                         String timestamp = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
-                        String unitName = getName(strategy.getGroupName(), strategy, createType, appInfo, timestamp, null);
+                        String unitName = getName(strategy.getGroupName(), strategy, createType, appInfo, timestamp, null, null);
                         JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appInfo.getAppId());
                         Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
                         Integer unitCode = (Integer) unitCreateResult.get("code");
@@ -338,7 +338,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
             for (int j = 1; j < splitVideos.size() + 1; j++) {
                 //创建组
                 String timestamp = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
-                String unitName = getName(strategy.getGroupName(), strategy, createType, null, timestamp, null);
+                String unitName = getName(strategy.getGroupName(), strategy, createType, null, timestamp, null, null);
                 String appIdString = strategy.getAppIdArray();
                 Long appId = null;
                 if (strategy.getCampaignType() == 2 || strategy.getCampaignType() == 7) {
@@ -612,6 +612,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
         }
     }
 
+
     private Long getCampaignId(AiKuaishouAdvertiserStrategy strategy, CtopOauthToken token, String replaceString, String checkType, Integer createType, AiKuaiShouAppInfo appInfo, String uuid) {
         //  JSONArray campaignList;
         String timestamp = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss");
@@ -644,7 +645,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
         // 不存在“上新”计划,则创建一个计划
         JSONObject campaignParams = new JSONObject();
         campaignParams.put("advertiser_id", token.getAccountId());
-        String campaignName = getName(strategy.getCampaignName(), strategy, createType, appInfo, timestamp, null);
+        String campaignName = getName(strategy.getCampaignName(), strategy, createType, appInfo, timestamp, null, null);
         campaignParams.put("campaign_name", campaignName);
         campaignParams.put("type", strategy.getCampaignType());
         if (null != strategy.getCampaignDayBudget() && strategy.getCampaignDayBudget() != 0) {
@@ -1186,7 +1187,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
      * @param strategy 账户id
      * @return
      */
-    private String getName(String wildcard, AiKuaishouAdvertiserStrategy strategy, Integer createType, AiKuaiShouAppInfo appInfo, String timestamp, Integer cnt) {
+    private String getName(String wildcard, AiKuaishouAdvertiserStrategy strategy, Integer createType, AiKuaiShouAppInfo appInfo, String timestamp, Integer cnt, String materialName) {
         if (wildcard.contains("{{应用包名}}")) {
             String appName = "";
             if (null != appInfo) {
@@ -1207,6 +1208,15 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
             String adsence = getAdSenceByParams(strategy.getSceneId());
             wildcard = wildcard.replace("{{广告位置}}", adsence);
         }
+
+        if (wildcard.contains("{{素材名称}}")) {
+            if (Check.isNull(materialName)) {
+                wildcard = wildcard.replace("{{素材名称}}", "");
+            } else {
+                wildcard = wildcard.replace("{{素材名称}}", materialName);
+            }
+
+        }
         if (!wildcard.contains("{{自定义}}")) {
             wildcard = wildcard + "{{自定义}}";
         }

+ 113 - 8
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouHistoryReportTaskServiceImpl.java

@@ -11,17 +11,21 @@ import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskServic
 import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterial;
 import cn.com.ctop.kuaishou.modules.report.entity.KuaiShouReportDailyMaterialVo;
+import cn.com.ctop.kuaishou.modules.report.entity.KuaishouReportDailyAccount;
 import cn.com.ctop.kuaishou.modules.report.entity.VideoGetvo;
 import cn.com.ctop.kuaishou.modules.report.mapper.*;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.csvreader.CsvReader;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
+import java.io.IOException;
+import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -213,7 +217,89 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
             requestMap.put("advertiser_id", task.getAccountId());
             requestMap.put("task_id", task.getTaskId());
             String localPath = LoadFileUtil.downloadByUrl(requestMap, downloadPath, url, token, fileName);
-            if (!Check.isNull(localPath)) {
+            ArrayList<String[]> reportList = getReportList(localPath);
+
+
+            if (task.getViewType() == 1) {
+                List<KuaishouReportDailyAccount> reportDailyAccounts = new ArrayList<>();
+                for (int row = 0; row < reportList.size(); row++) {
+                    if (Check.isNull(row)) {
+                        continue;
+                    }
+                    KuaishouReportDailyAccount reportDailyAccount = new KuaishouReportDailyAccount();
+                    reportDailyAccount.setAccountId(task.getAccountId());
+                    reportDailyAccount.setCharge(ConverterUtils.getAsBigDecimal(reportList.get(row)[1]));
+                    reportDailyAccount.setAdScene(reportList.get(row)[0]);
+                    reportDailyAccount.setPhotoShow(ConverterUtils.getAsLong(reportList.get(row)[2]));
+                    reportDailyAccount.setAclick(ConverterUtils.getAsLong(reportList.get(row)[3]));
+                    reportDailyAccount.setBclick(ConverterUtils.getAsLong(reportList.get(row)[4]));
+                    reportDailyAccount.setPhotoShare(ConverterUtils.getAsLong(reportList.get(row)[5]));
+                    reportDailyAccount.setPhotoComment(ConverterUtils.getAsLong(reportList.get(row)[6]));
+                    reportDailyAccount.setPhotoLike(ConverterUtils.getAsLong(reportList.get(row)[7]));
+                    reportDailyAccount.setFollow(ConverterUtils.getAsLong(reportList.get(row)[8]));
+                    reportDailyAccount.setCancelFollow(ConverterUtils.getAsLong(reportList.get(row)[9]));
+                    reportDailyAccount.setReport(ConverterUtils.getAsLong(reportList.get(row)[10]));
+                    reportDailyAccount.setBlock(ConverterUtils.getAsLong(reportList.get(row)[11]));
+                    reportDailyAccount.setNegative(ConverterUtils.getAsLong(reportList.get(row)[12]));
+                    reportDailyAccount.setDownloadStarted(ConverterUtils.getAsLong(reportList.get(row)[13]));
+                    reportDailyAccount.setDownloadCompleted(ConverterUtils.getAsLong(reportList.get(row)[14]));
+                    reportDailyAccount.setActivation(ConverterUtils.getAsLong(reportList.get(row)[15]));
+                    reportDailyAccount.setSubmit(ConverterUtils.getAsLong(reportList.get(row)[16]));
+                    reportDailyAccount.setStatDate(reportList.get(row)[17]);
+                    reportDailyAccount.setPhotoClick(ConverterUtils.getAsLong(reportList.get(row)[19]));
+                    reportDailyAccount.setPhotoClickRatio(ConverterUtils.getAsDouble(reportList.get(row)[20]));
+                    reportDailyAccount.setActionRatio(ConverterUtils.getAsDouble(reportList.get(row)[21]));
+                    reportDailyAccount.setImpression1kCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[22]));
+                    reportDailyAccount.setPhotoClickCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[23]));
+                    reportDailyAccount.setActionCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[25]));
+                    reportDailyAccount.setEventPayFirstDay(ConverterUtils.getAsLong(reportList.get(row)[26]));
+                    reportDailyAccount.setEventPayPurchaseAmountFirstDay(ConverterUtils.getAsBigDecimal(reportList.get(row)[27]));
+                    reportDailyAccount.setEventPayFirstDayRoi(ConverterUtils.getAsDouble(reportList.get(row)[28]));
+                    reportDailyAccount.setEventPay(ConverterUtils.getAsLong(reportList.get(row)[29]));
+                    reportDailyAccount.setEventPayPurchaseAmount(ConverterUtils.getAsBigDecimal(reportList.get(row)[30]));
+                    reportDailyAccount.setEventPayRoi(ConverterUtils.getAsDouble(reportList.get(row)[31]));
+                    reportDailyAccount.setEventRegister(ConverterUtils.getAsLong(reportList.get(row)[32]));
+                    reportDailyAccount.setEventRegisterCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[33]));
+                    reportDailyAccount.setEventRegisterRatio(ConverterUtils.getAsDouble(reportList.get(row)[34]));
+                    reportDailyAccount.setEventJinJianApp(ConverterUtils.getAsLong(reportList.get(row)[35]));
+                    reportDailyAccount.setEventJinJianAppCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[36]));
+                    reportDailyAccount.setEventCreditGrantApp(ConverterUtils.getAsLong(reportList.get(row)[37]));
+                    reportDailyAccount.setEventCreditGrantAppCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[38]));
+                    reportDailyAccount.setEventCreditGrantAppRatio(ConverterUtils.getAsDouble(reportList.get(row)[39]));
+                    reportDailyAccount.setEventOrderPaid(ConverterUtils.getAsLong(reportList.get(row)[40]));
+                    reportDailyAccount.setEventOrderPaidPurchaseAmount(ConverterUtils.getAsBigDecimal(reportList.get(row)[41]));
+                    reportDailyAccount.setEventOrderPaidCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[42]));
+                    reportDailyAccount.setFormCount(ConverterUtils.getAsLong(reportList.get(row)[43]));
+                    reportDailyAccount.setFormCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[44]));
+                    reportDailyAccount.setFormActionRatio(ConverterUtils.getAsDouble(reportList.get(row)[45]));
+                    reportDailyAccount.setEventJinJianLandingPage(ConverterUtils.getAsLong(reportList.get(row)[46]));
+                    reportDailyAccount.setEventJinJianLandingPageCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[47]));
+                    reportDailyAccount.setEventCreditGrantLandingPage(ConverterUtils.getAsLong(reportList.get(row)[48]));
+                    reportDailyAccount.setEventCreditGrantLandingPageCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[49]));
+                    reportDailyAccount.setEventCreditGrantLandingRatio(ConverterUtils.getAsDouble(reportList.get(row)[50]));
+                    reportDailyAccount.setEventNextDayStayCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[51]));
+                    reportDailyAccount.setEventNextDayStayRatio(ConverterUtils.getAsBigDecimal(reportList.get(row)[52]));
+                    reportDailyAccount.setEventNextDayStay(ConverterUtils.getAsLong(reportList.get(row)[53]));
+                    reportDailyAccount.setPlay3sRatio(ConverterUtils.getAsDouble(reportList.get(row)[54]));
+                    reportDailyAccount.setEventNewUserPay(ConverterUtils.getAsLong(reportList.get(row)[63]));
+                    reportDailyAccount.setEventNewUserPayCost(ConverterUtils.getAsBigDecimal(reportList.get(row)[64]));
+                    reportDailyAccount.setEventNewUserPayRatio(ConverterUtils.getAsBigDecimal(reportList.get(row)[65]));
+                    reportDailyAccounts.add(reportDailyAccount);
+
+                }
+
+                if (!Check.isNull(reportDailyAccounts)) {
+                    reportDailyAccountMapper.replaceBatch(reportDailyAccounts);
+                }
+
+
+            } else if (task.getViewType() == 5) {
+
+            }
+
+
+            //   System.err.println(reportList);
+          /*  if (!Check.isNull(localPath)) {
                 Map<String, Object> deleteMap = new HashMap<>();
                 deleteMap.put("account_id", task.getAccountId());
 
@@ -263,7 +349,7 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
                 }
 
 
-            }
+            }*/
             task.setTaskStatus(4);
 
         } catch (Exception e) {
@@ -274,6 +360,25 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
 
     }
 
+
+    private ArrayList<String[]> getReportList(String localPath) throws IOException {
+        ArrayList<String[]> csvFileList = new ArrayList<String[]>();
+        // 定义一个CSV路径
+
+        // 创建CSV读对象 例如:CsvReader(文件路径,分隔符,编码格式);
+        CsvReader reader = new CsvReader(localPath, ',', Charset.forName("UTF-8"));
+        // 跳过表头 如果需要表头的话,这句可以忽略
+        reader.readHeaders();
+        // 逐行读入除表头的数据
+        while (reader.readRecord()) {
+            System.out.println(reader.getRawRecord());
+            csvFileList.add(reader.getValues());
+        }
+        reader.close();
+        return csvFileList;
+
+    }
+
     @Autowired
     private KuaishouReportDailyImageMapper kuaishouReportDailyImageMapper;
 
@@ -282,12 +387,12 @@ public class KuaiShouHistoryReportTaskServiceImpl extends ServiceImpl<KuaiShouHi
 
         historyTypeList = new ArrayList<>();
         historyTypeList.add(1);
-        historyTypeList.add(2);
-        historyTypeList.add(3);
-        historyTypeList.add(4);
-        historyTypeList.add(5);
-        historyTypeList.add(7);
-        historyTypeList.add(10);
+      /*  historyTypeList.add(2);
+        historyTypeList.add(3);*/
+        // historyTypeList.add(4);
+        //    historyTypeList.add(5);
+        // historyTypeList.add(7);
+        //  historyTypeList.add(10);
 
 
     }

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

@@ -182,5 +182,12 @@ public class KuaishouReportDailyAccount implements Serializable {
     private Date createTime;
 
     private Date updateTime;
+
+    /**新增付费人数*/
+    private Long eventNewUserPay;
+    /**新增付费人数成本*/
+    private BigDecimal eventNewUserPayCost;
+    /**新增付费人数率*/
+    private BigDecimal eventNewUserPayRatio;
 }
 

+ 6 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/entity/KuaishouReportHourlyAccount.java

@@ -126,7 +126,12 @@ public class KuaishouReportHourlyAccount implements Serializable {
     private Long negative;
     @JsonProperty
     private Long eventAppInvoked;
-
+    /**新增付费人数*/
+    private Long eventNewUserPay;
+    /**新增付费人数成本*/
+    private BigDecimal eventNewUserPayCost;
+    /**新增付费人数率*/
+    private BigDecimal eventNewUserPayRatio;
     @JsonProperty
     private Date createTime;
     @JsonProperty

+ 16 - 5
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportDailyAccountMapper.xml

@@ -139,8 +139,10 @@
         form_cost,
         form_count,
         play_3s_ratio,
-        event_app_invoked
-
+        event_app_invoked,
+        event_new_user_pay,
+        event_new_user_pay_cost,
+        event_new_user_pay_ratio
         )
         values
         <foreach collection="addList" item="add" separator=",">
@@ -199,7 +201,10 @@
             #{add.formCost},
             #{add.formCount},
             #{add.play3sRatio},
-            #{add.eventAppInvoked}
+            #{add.eventAppInvoked},
+            #{add.eventNewUserPay},
+            #{add.eventNewUserPayCost},
+            #{add.eventNewUserPayRatio}
             )
         </foreach>
 
@@ -262,7 +267,10 @@
         form_cost,
         form_count,
         play_3s_ratio,
-        event_app_invoked
+        event_app_invoked,
+        event_new_user_pay,
+        event_new_user_pay_cost,
+        event_new_user_pay_ratio
 
         )
         values
@@ -322,7 +330,10 @@
             #{add.formCost},
             #{add.formCount},
             #{add.play3sRatio},
-            #{add.eventAppInvoked}
+            #{add.eventAppInvoked},
+            #{add.eventNewUserPay},
+            #{add.eventNewUserPayCost},
+            #{add.eventNewUserPayRatio}
 
             )
         </foreach>

+ 8 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/mapper/xml/KuaishouReportHourlyAccountMapper.xml

@@ -54,7 +54,10 @@
         form_cost,
         form_count,
         play_3s_ratio,
-        event_app_invoked
+        event_app_invoked,
+        event_new_user_pay,
+        event_new_user_pay_cost,
+        event_new_user_pay_ratio
         )
         values
         <foreach collection="addList" item="add" separator=",">
@@ -110,7 +113,10 @@
             #{add.formCost},
             #{add.formCount},
             #{add.play3sRatio},
-            #{add.eventAppInvoked}
+            #{add.eventAppInvoked},
+            #{add.eventNewUserPay},
+            #{add.eventNewUserPayCost},
+            #{add.eventNewUserPayRatio}
             )
         </foreach>
 

+ 8 - 2
pom.xml

@@ -43,10 +43,10 @@
     </distributionManagement>
 
     <repositories>
-        <repository>
+       <!-- <repository>
             <id>bintray-americanexpress-maven</id>
             <url>https://dl.bintray.com/americanexpress/maven</url>
-        </repository>
+        </repository>-->
         <repository>
             <id>aliyun</id>
             <name>aliyun Repository</name>
@@ -150,6 +150,12 @@
             <artifactId>commons-lang</artifactId>
             <version>${commons.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>net.sourceforge.javacsv</groupId>
+            <artifactId>javacsv</artifactId>
+            <version>2.0</version>
+        </dependency>
         <dependency>
             <groupId>com.google.guava</groupId>
             <artifactId>guava</artifactId>