Przeglądaj źródła

本地同步素材到账户下

yumeng 4 lat temu
rodzic
commit
23c6da2b87

+ 20 - 0
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;
@@ -132,6 +133,25 @@ public class TestController {
     @Autowired
     private IBatchService batchService;
     static ExecutorService videoService = Executors.newFixedThreadPool(3);
+    @Autowired
+    private IMaterialUploadService materialUploadService;
+
+    @GetMapping("/uploadVideo")
+    public String uploadVideo(Long projectId) {
+        //  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")

+ 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);
+    }
 }