yumeng hai 1 ano
pai
achega
bca85dfbf2

+ 19 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/controller/BytedanceController.java

@@ -55,6 +55,25 @@ public class BytedanceController {
     @Autowired
     private IBytedanceMaterialReportService bytedanceMaterialReportService;
 
+    @Autowired
+    private IClTaskStatusService clTaskStatusService;
+
+
+    @GetMapping("/getCLTaskStatus")
+    public void getCLTaskStatus() {
+       List<JSONObject> taskList =  clTaskStatusService.getClTaskListByStatus("0");
+       if(!Check.isNull(taskList)){
+           for (int i = 0; i < taskList.size(); i++) {
+               JSONObject jsonObject = taskList.get(i);
+               Long materialId = jsonObject.getLong("material_id");
+               String batchId = jsonObject.getString("batch_id");
+               clTaskStatusService.downLoadTaskResult(materialId,batchId);
+           }
+       }
+
+    }
+
+
 
     @GetMapping("/agentData")
     public void agentData() {

+ 162 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/entity/ClMaterialTaskInfo.java

@@ -0,0 +1,162 @@
+package cn.com.ctop.job.bytedance.data.entity;
+
+public class ClMaterialTaskInfo {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 管家账户ID
+     */
+    private Long materialId;
+
+    /**
+     * adx源文件地址
+     */
+    private String adxUrl;
+
+    /**
+     * 批次标识
+     */
+    private String batchId;
+
+    /**
+     * 任务状态(init:初始化 queueing:排队中 processing:执行中 success:上传成功 error:任务异常)
+     */
+    private String taskStatus;
+
+    /**
+     * 任务详情
+     */
+    private String taskMessage;
+
+    /**
+     * 创量存储地址
+     */
+    private String fileUrl;
+
+    /**
+     * 创量素材id
+     */
+    private Long clMaterialId;
+
+    /**
+     * 文件md5
+     */
+    private String fileMd5;
+
+    /**
+     * 短剧ID
+     */
+    private Long playletId;
+
+    /**
+     * 文件夹ID
+     */
+    private Long folderId;
+
+    private Integer isExist;
+
+    public Long getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(Long materialId) {
+        this.materialId = materialId;
+    }
+
+    public String getAdxUrl() {
+        return adxUrl;
+    }
+
+    public void setAdxUrl(String adxUrl) {
+        this.adxUrl = adxUrl;
+    }
+
+    public String getBatchId() {
+        return batchId;
+    }
+
+    public void setBatchId(String batchId) {
+        this.batchId = batchId;
+    }
+
+    public String getTaskStatus() {
+        return taskStatus;
+    }
+
+    public void setTaskStatus(String taskStatus) {
+        this.taskStatus = taskStatus;
+    }
+
+    public String getTaskMessage() {
+        return taskMessage;
+    }
+
+    public void setTaskMessage(String taskMessage) {
+        this.taskMessage = taskMessage;
+    }
+
+    public String getFileUrl() {
+        return fileUrl;
+    }
+
+    public void setFileUrl(String fileUrl) {
+        this.fileUrl = fileUrl;
+    }
+
+    public Long getClMaterialId() {
+        return clMaterialId;
+    }
+
+    public void setClMaterialId(Long clMaterialId) {
+        this.clMaterialId = clMaterialId;
+    }
+
+    public String getFileMd5() {
+        return fileMd5;
+    }
+
+    public void setFileMd5(String fileMd5) {
+        this.fileMd5 = fileMd5;
+    }
+
+    public Long getPlayletId() {
+        return playletId;
+    }
+
+    public void setPlayletId(Long playletId) {
+        this.playletId = playletId;
+    }
+
+    public Long getFolderId() {
+        return folderId;
+    }
+
+    public void setFolderId(Long folderId) {
+        this.folderId = folderId;
+    }
+
+    public Integer getIsExist() {
+        return isExist;
+    }
+
+    public void setIsExist(Integer isExist) {
+        this.isExist = isExist;
+    }
+
+    @Override
+    public String toString() {
+        return "ClMaterialTaskInfo{" +
+                "materialId=" + materialId +
+                ", adxUrl='" + adxUrl + '\'' +
+                ", batchId='" + batchId + '\'' +
+                ", taskStatus='" + taskStatus + '\'' +
+                ", taskMessage='" + taskMessage + '\'' +
+                ", fileUrl='" + fileUrl + '\'' +
+                ", clMaterialId=" + clMaterialId +
+                ", fileMd5='" + fileMd5 + '\'' +
+                ", playletId=" + playletId +
+                ", folderId=" + folderId +
+                ", isExist=" + isExist +
+                '}';
+    }
+}

+ 13 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/mapper/ClTaskStatusMapper.java

@@ -0,0 +1,13 @@
+package cn.com.ctop.job.bytedance.data.mapper;
+
+import cn.com.ctop.job.bytedance.data.entity.ClMaterialTaskInfo;
+import com.alibaba.fastjson.JSONObject;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ClTaskStatusMapper {
+    List<JSONObject> getClTaskListByStatus(@Param("status") String status);
+
+    void updateClMaterialTaskInfo(ClMaterialTaskInfo update);
+}

+ 29 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/mapper/xml/ClTaskStatusMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="cn.com.ctop.job.bytedance.data.mapper.ClTaskStatusMapper">
+    <update id="updateClMaterialTaskInfo">
+        update deepthink.cl_material_task_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="adxUrl != null">adx_url = #{adxUrl},</if>
+            <if test="batchId != null">batch_id = #{batchId},</if>
+            <if test="taskStatus != null">task_status = #{taskStatus},</if>
+            <if test="taskMessage != null">task_message = #{taskMessage},</if>
+            <if test="fileUrl != null">file_url = #{fileUrl},</if>
+            <if test="clMaterialId != null">cl_material_id = #{clMaterialId},</if>
+            <if test="fileMd5 != null">file_md5 = #{fileMd5},</if>
+            <if test="playletId != null">playlet_id = #{playletId},</if>
+            <if test="folderId != null">folder_id = #{folderId},</if>
+            <if test="isExist != null">is_exist = #{isExist},</if>
+
+        </trim>
+        where material_id = #{materialId}
+    </update>
+
+
+    <select id="getClTaskListByStatus" resultType="com.alibaba.fastjson.JSONObject">
+        select material_id, batch_id
+        from deepthink.cl_material_task_info
+        where task_status = #{status}
+        order by create_time limit 60
+    </select>
+</mapper>

+ 11 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/IClTaskStatusService.java

@@ -0,0 +1,11 @@
+package cn.com.ctop.job.bytedance.data.service;
+
+import com.alibaba.fastjson.JSONObject;
+
+import java.util.List;
+
+public interface IClTaskStatusService {
+    List<JSONObject> getClTaskListByStatus(String status);
+
+    void downLoadTaskResult(Long materialId,String batchId);
+}

+ 124 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/service/impl/ClTaskStatusServiceImpl.java

@@ -0,0 +1,124 @@
+package cn.com.ctop.job.bytedance.data.service.impl;
+
+import cn.com.ctop.job.bytedance.data.entity.ClMaterialTaskInfo;
+import cn.com.ctop.job.bytedance.data.mapper.ClTaskStatusMapper;
+import cn.com.ctop.job.bytedance.data.service.IClTaskStatusService;
+import cn.com.ctop.job.bytedance.data.utils.Check;
+import cn.com.ctop.job.bytedance.data.utils.Signature;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+import org.springframework.web.servlet.View;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import static cn.com.ctop.job.bytedance.data.utils.Signature.unicodeToString;
+
+@Slf4j
+@Service
+public class ClTaskStatusServiceImpl implements IClTaskStatusService {
+
+    private static String secret = "302424a82b378320e5dc7008a916e2ab";
+    private static String email = "yuyang2@hrcentury.cn";
+    @Autowired
+    private ClTaskStatusMapper taskStatusMapper;
+    @Autowired
+    private View error;
+
+    @Override
+    public List<JSONObject> getClTaskListByStatus(String status) {
+        return taskStatusMapper.getClTaskListByStatus(status);
+    }
+
+    @Override
+    public void downLoadTaskResult(Long materialId, String batchId) {
+        try {
+            System.err.println(materialId);
+            String url = "https://openapi.mobgi.com/api/material/downLoadTaskResult";
+            JSONObject jsonObject = new JSONObject();
+            jsonObject.put("batch_id", batchId);
+            JSONObject clJson = this.httpRequest(url, jsonObject);
+            if (!Check.isNull(clJson)) {
+                Integer code = clJson.getInteger("code");
+                if (code == 0) {
+                    JSONObject data = clJson.getJSONObject("data");
+                    if (!Check.isNull(data)) {
+                        JSONArray list = data.getJSONArray("list");
+                        if (!Check.isNull(list)) {
+                            for (int i = 0; i < list.size(); i++) {
+                                JSONObject detail = list.getJSONObject(i);
+                                String status = detail.getString("status");
+                                String taskMessage = detail.getString("error_msg");
+                                String fileUrl = detail.getString("file_url");
+                                Long clMaterialId = detail.getLong("material_id");
+                                Integer isExist = detail.getInteger("is_exist");
+                                ClMaterialTaskInfo update = new ClMaterialTaskInfo();
+                                update.setMaterialId(materialId);
+                                update.setTaskStatus(status);
+                                update.setTaskMessage(taskMessage);
+                                update.setFileUrl(fileUrl);
+                                update.setClMaterialId(clMaterialId);
+                                update.setIsExist(isExist);
+                                log.info("素材ID:{},推送状态:{}", materialId, status);
+                                taskStatusMapper.updateClMaterialTaskInfo(update);
+                            }
+
+                        }
+
+                    }
+
+
+                }else {
+                    log.error("获取推送接口错误,materialId:{},返回信息:{}",materialId,clJson);
+                }
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+
+        }
+
+
+    }
+
+
+    public JSONObject httpRequest(String url, JSONObject requestJson) throws Exception {
+        long timestamp = System.currentTimeMillis() / 1000;
+        ObjectMapper objectMapper = new ObjectMapper();
+        Map<String, Object> params = objectMapper.readValue(requestJson.toString(), new TypeReference<Map<String, Object>>() {
+        });
+        Signature signature = new Signature(secret);
+        String signStr = signature.buildSignature(timestamp, params);
+        //设置header
+        HttpHeaders headers = new HttpHeaders();
+        headers.setContentType(MediaType.parseMediaType("application/json; charset=UTF-8"));
+        headers.add("email", email);
+        headers.add("timestamp", String.valueOf(timestamp));
+        headers.add("signature", signStr);
+        //接口请求
+        HttpEntity<Map<String, Object>> entity = new HttpEntity<>(params, headers);
+        RestTemplate restTemplate = new RestTemplate();
+        ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, entity, String.class);
+
+        JSONObject returnJson = new JSONObject();
+        //获得响应
+        String body = responseEntity.getBody();
+        if (!Check.isNull(body)) {
+            returnJson = JSONObject.parseObject(unicodeToString(body));
+        }
+        return returnJson;
+    }
+
+
+}

+ 266 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/data/utils/Signature.java

@@ -0,0 +1,266 @@
+package cn.com.ctop.job.bytedance.data.utils;
+
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.util.DigestUtils;
+import org.springframework.web.client.RestTemplate;
+
+import java.security.NoSuchAlgorithmException;
+import java.util.*;
+
+import static java.net.URLEncoder.encode;
+
+public class Signature {
+
+    private String secret = "302424a82b378320e5dc7008a916e2ab";
+
+    public static void main(String[] args) throws Exception {
+        System.out.println("=====参数是hashmap的签名demo=====");
+        test_hashmap();
+
+        System.out.println("=====参数为json字符串的签名demo=====");
+        test_json();
+
+        System.out.println("=====请求接口demo=====");
+        test_request();
+
+    }
+
+    //参数是hashmap的签名demo
+    public static void test_hashmap() throws Exception {
+        String secret = "302424a82b378320e5dc7008a916e2ab";
+
+        Map<String,Object> param =new HashMap<>();
+        param.put("param1","aaaa哈哈哈");
+        param.put("param2","qweqwe");
+        param.put("param3[0]","1");
+
+        long timestamp = 1646899307;
+
+        Signature signature = new Signature(secret);
+        String signStr = signature.buildSignature(timestamp, param);
+        System.out.println(signStr);
+        //System.out.println(signature.http_build_query(param));
+    }
+
+    //参数为json字符串的签名demo
+    public static void test_json() throws Exception {
+        String secret = "302424a82b378320e5dc7008a916e2ab";
+
+        String jsonStr = "{" +
+                "        \"items\": [" +
+                "                {" +
+                "                        \"creative_user_id\": 10064255535," +
+                "                        \"designer_id\": 10064255535," +
+                "                        \"folder_id\": 12002122805," +
+                "                        \"album_id\": 12000018105," +
+                "                        \"material_name\": \"牵爱30402一组勤阿喵限制0216成片01.mp4\"," +
+                "                        \"file_md5\": \"abf422e18234919979d9c0bff5cde80d\"," +
+                "                        \"url\": \"https://chuxin-gz.oss-cn-shenzhen.aliyuncs.com/cxai/2023/02/牵爱30402一组勤阿喵限制0216成片01.mp4\"" +
+                "                }," +
+                "                {" +
+                "                        \"album_id\": 12000018105," +
+                "                        \"creative_user_id\": 10064255535," +
+                "                        \"designer_id\": 10064255535," +
+                "                        \"file_md5\": \"a3f445511a5b58ff75cd33d79f29a658\"," +
+                "                        \"folder_id\": 12002122805," +
+                "                        \"material_name\": \"牵爱30402一组勤阿喵限制0216成片02.mp4\"," +
+                "                        \"url\": \"https://chuxin-gz.oss-cn-shenzhen.aliyuncs.com/cxai/2023/02/牵爱30402一组勤阿喵限制0216成片02.mp4\"" +
+                "                }," +
+                "                {" +
+                "                        \"album_id\": 12000018105," +
+                "                        \"creative_user_id\": 10064255535," +
+                "                        \"file_md5\": \"b5a179f0e3b5aae42c4fd69ffb1772b2\"," +
+                "                        \"folder_id\": 12002122805," +
+                "                        \"designer_id\": 10064255535," +
+                "                        \"material_name\": \"牵爱30402一组勤阿喵限制0216成片03.mp4\"," +
+                "                        \"url\": \"https://chuxin-gz.oss-cn-shenzhen.aliyuncs.com/cxai/2023/02/牵爱30402一组勤阿喵限制0216成片03.mp4\"" +
+                "                }" +
+                "        ]" +
+                "}";
+        ObjectMapper objectMapper = new ObjectMapper();
+        Map<String, Object> param = objectMapper.readValue(jsonStr, new TypeReference<Map<String, Object>>() {});
+
+        long timestamp = 1676616009;
+
+        Signature signature = new Signature(secret);
+        String signStr = signature.buildSignature(timestamp, param);
+        System.out.println(signStr);
+        //System.out.println(signature.http_build_query(param));
+    }
+
+    //请求接口demo
+    public static void test_request() throws Exception {
+        String url = "https://openapi2.mobgi.com/api/AdMaterial/report";
+
+        String secret = "302424a82b378320e5dc7008a916e2ab";
+        String email = "yuyang2@hrcentury.cn";
+        long timestamp = System.currentTimeMillis()/1000;
+
+        //请求参数
+        String jsonStr = " {\n" +
+                "        \"media_type\": \"toutiao_upgrade\",\n" +
+                "        \"page\": \"1\",\n" +
+                "        \"page_size\": \"1\",\n" +
+                "        \"start_date\": \"2024-05-22\",\n" +
+                "        \"end_date\": \"2024-05-22\",\n" +
+                "        \"time_dim\": \"days\",\n" +
+                "        \"kpis\": [\"stat_cost\"]\n" +
+                "}";
+        ObjectMapper objectMapper = new ObjectMapper();
+        Map<String, Object> params = objectMapper.readValue(jsonStr, new TypeReference<Map<String, Object>>() {});
+
+        //获得到签名
+        Signature signature = new Signature(secret);
+        String signStr = signature.buildSignature(timestamp, params);
+
+        //设置header
+        HttpHeaders headers = new HttpHeaders();
+        headers.setContentType(MediaType.parseMediaType("application/json; charset=UTF-8"));
+        headers.add("email",email);
+        headers.add("timestamp",String.valueOf(timestamp));
+        headers.add("signature",signStr);
+
+        System.out.println(params);
+        System.out.println("===============");
+        System.out.println(headers);
+
+        //接口请求
+        HttpEntity<Map<String, Object>> entity = new HttpEntity<>(params, headers);
+        RestTemplate restTemplate = new RestTemplate();
+        ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, entity, String.class);
+
+        //获得响应
+        String body = responseEntity.getBody();
+        System.out.println(unicodeToString(body));
+
+    }
+
+
+    public Signature(String secret) {
+        this.secret = secret;
+    }
+
+    /**
+     * @param timestamp 时间戳
+     * @param params 参数
+     * @return 返回签名字符串
+     * @throws Exception
+     */
+    public String buildSignature(long timestamp, Map<String,Object> params) throws Exception {
+        //加入时间戳
+        params.put("timestamp", timestamp);
+        //生成url参数字符串
+        String signatureStr = http_build_query(params, true);
+        //将密钥拼接在后面
+        signatureStr += "&cl_secret="+secret;
+
+        //MD5
+        return getMD5(signatureStr);
+    }
+
+    /**
+     * @param params 参数
+     * @return 返回php http_build_query()效果的URL-encode的字符串
+     * @throws Exception
+     */
+    public String http_build_query(Map<String,Object> params) throws Exception {
+        return http_build_query(params, true);
+    }
+
+    private String getMD5(String str) throws NoSuchAlgorithmException {
+        DigestUtils.md5DigestAsHex(str.getBytes());
+        String MD5 = DigestUtils.md5DigestAsHex(str.getBytes());
+        return MD5.toUpperCase();
+    }
+
+    /**
+     * Java实现PHP中的http_build_query()效果
+     * https://www.cnblogs.com/timseng/p/13280722.html
+     *
+     * @return
+     */
+    private String http_build_query(Map<String, Object> array, boolean sort) throws Exception {
+        String reString = "";
+        //遍历数组形成akey=avalue&bkey=bvalue&ckey=cvalue形式的的字符串
+        reString = rescBuild(array, "", true, sort);
+        reString = StringUtils.removeEnd(reString, "&");
+
+        //将得到的字符串进行处理得到目标格式的字符串:utf8处理中文出错
+        ///reString = java.net.URLEncoder.encode(reString, "utf-8");
+        ///reString = reString.replace("%3D", "=").replace("%26", "&");
+        return reString;
+    }
+
+    private String rescBuild(Object object, String parentStr, boolean first, boolean sort) throws Exception {
+        String r = "";
+        if (object instanceof Map) {
+
+            List<Map.Entry<String, Object>> list = new ArrayList<Map.Entry<String, Object>>(((Map<String, Object>) object).entrySet());
+
+            //按照map的key排序
+            if(sort) {
+                Collections.sort(list, new Comparator<Map.Entry<String, Object>>() {
+                    //升序排序
+                    public int compare(Map.Entry<String, Object> o1,
+                                       Map.Entry<String, Object> o2) {
+                        return o1.getKey().compareTo(o2.getKey());
+                    }
+                });
+            }
+
+            for (Map.Entry<String, Object> mapping : list) {
+                String key = mapping.getKey();
+                Object value = mapping.getValue();
+
+                if (first) {
+                    r += rescBuild(value, key, false, sort);
+                } else {
+                    r += rescBuild(value, parentStr + "[" + key + "]", false, sort);
+                }
+
+            }
+
+        } else if (object instanceof List) {
+            for (int i = 0; i < ((List) object).size(); i++) {
+                r += rescBuild(((List) object).get(i), parentStr + "[" + i + "]", false, sort);
+            }
+            //叶节点是String或者Number
+        } else if (object instanceof String) {
+            r += encode(parentStr,"utf-8") + "=" + encode(object.toString(),"utf-8") + "&";
+        } else if (object instanceof Number) {
+            r += encode(parentStr,"utf-8") + "=" + encode(((Number) object).toString(),"utf-8") + "&";
+        } else if (object instanceof Boolean) {
+            r += encode(parentStr,"utf-8") + "=" + encode(((Boolean) object).toString(),"utf-8") + "&";
+        } else {
+            throw new Exception("unsupported type:"+object.getClass().toString());
+        }
+
+        return r;
+    }
+
+
+
+    public static String unicodeToString(String unicode) {
+        StringBuilder sb = new StringBuilder();
+        int i = 0;
+        while (i < unicode.length()) {
+            char c = unicode.charAt(i++);
+            if (c == '\\' && i < unicode.length() && unicode.charAt(i) == 'u') {
+                i++; // 跳过 'u'
+                int code = Integer.parseInt(unicode.substring(i, i + 4), 16);
+                sb.append((char) code);
+                i += 4;
+            } else {
+                sb.append(c);
+            }
+        }
+        return sb.toString();
+    }
+
+}

+ 55 - 0
job-bytedance/src/main/java/cn/com/ctop/job/bytedance/handler/CLMaterialTaskJob.java

@@ -0,0 +1,55 @@
+package cn.com.ctop.job.bytedance.handler;
+
+
+import cn.com.ctop.job.bytedance.data.service.IBytedanceAccountReportService;
+import cn.com.ctop.job.bytedance.data.service.IClTaskStatusService;
+import cn.com.ctop.job.bytedance.data.utils.Check;
+import cn.com.ctop.job.bytedance.data.utils.DateUtils;
+import com.alibaba.fastjson.JSONObject;
+import com.xxl.job.core.context.XxlJobHelper;
+import com.xxl.job.core.handler.annotation.XxlJob;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+
+
+/**
+ * 广告主定时任务
+ *
+ * @throws Exception
+ */
+@Slf4j
+@Component
+public class CLMaterialTaskJob {
+    @Autowired
+    private IBytedanceAccountReportService accountReportService;
+
+    @Autowired
+    private IClTaskStatusService clTaskStatusService;
+
+
+    /**
+     * 账户时报
+     *
+     * @throws Exception
+     */
+
+    @XxlJob("clTaskStatus")
+    public void clTaskStatus() throws Exception {
+        List<JSONObject> taskList = clTaskStatusService.getClTaskListByStatus("0");
+        if (!Check.isNull(taskList)) {
+            for (int i = 0; i < taskList.size(); i++) {
+                JSONObject jsonObject = taskList.get(i);
+                Long materialId = jsonObject.getLong("material_id");
+                String batchId = jsonObject.getString("batch_id");
+                clTaskStatusService.downLoadTaskResult(materialId, batchId);
+            }
+        }
+    }
+
+
+}