Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

yumeng 4 anni fa
parent
commit
a29f6e8dea

+ 1 - 1
module-check/src/main/java/cn/com/ctop/check/component/execute/ScriptProcessLogExecutor.java

@@ -55,6 +55,6 @@ public class ScriptProcessLogExecutor {
     }
 
     private void sendWeChat(String mail) {
-        sendWeChatHandle.SendWeChatByMail(mail, "检查数据服务日志处理失败");
+        sendWeChatHandle.sendWeChatByMail(mail, "检查数据服务日志处理失败");
     }
 }

+ 8 - 12
module-check/src/main/java/cn/com/ctop/notice/handler/SendWeChatHandle.java

@@ -16,29 +16,25 @@ public class SendWeChatHandle {
     @Autowired
     MailLogMapper mailLogMapper;
 
-    public boolean SendWeChatByMail(String mail,String message){
-        boolean result=true;
+    public void sendWeChatByMail(String mail,String message){
         String weChatId=mailLogMapper.getWeChatByMail(mail);
         if(weChatId.isEmpty()){
             log.error(String.format("mail's WeChat not found. mail =%s", mail));
             //TODO 通知管理员添加邮箱
-            result=false;
         }else{
             CorpWexinUtils.sendMessageByWeChatId(weChatId,message);
         }
-        return result;
     }
 
-    public void SendWeChatByMails(String mails,String message){
+    /**
+     * 发送多人,邮箱逗号隔开
+     * @param mails
+     * @param message
+     */
+    public void sendWeChatByMails(String mails,String message){
         List<String> mail= Arrays.asList(mails.split(","));
         mail.forEach(m->{
-            String weChatId=mailLogMapper.getWeChatByMail(m);
-            if(weChatId.isEmpty()){
-                log.error(String.format("mail's WeChat not found. mail =%s", m));
-                //TODO 通知管理员添加邮箱
-            }else{
-                CorpWexinUtils.sendMessageByWeChatId(weChatId,message);
-            }
+            this.sendWeChatByMail(m,message);
         });
     }
 }

+ 2 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/controller/ByteDanceAdvertisePlanController.java

@@ -12,6 +12,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.jeecg.common.api.vo.Result;
 import org.jeecg.common.system.query.QueryGenerator;
+import org.jeecg.common.util.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -95,6 +96,7 @@ public class ByteDanceAdvertisePlanController {
                 Map<String, Object> advertiserPlan = byteDanceAdvertisePlanService.createAdvertiserPlan(ctopOauthTokenService.getTokenByAccountId(Long.valueOf(byteDanceAdvertisePlan.getAccountId())), landingType, byteDanceAdvertisePlan);
                 if (advertiserPlan.get("code").equals(0)) {
                     byteDanceAdvertisePlan.setId(((ByteDanceAdvertisePlan) advertiserPlan.get("data")).getId());
+                    byteDanceAdvertisePlan.setAdCreateTime(DateUtils.now());
                     byteDanceAdvertisePlanService.save((ByteDanceAdvertisePlan) advertiserPlan.get("data"));
                     byteDanceAdvertisePlanList.add(byteDanceAdvertisePlanService.getById(((ByteDanceAdvertisePlan) advertiserPlan.get("data")).getId()));
                 } else {

+ 1 - 2
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/material/service/impl/ByteDanceCreativeServiceImpl.java

@@ -438,12 +438,11 @@ public class ByteDanceCreativeServiceImpl extends ServiceImpl<ByteDanceCreativeM
                 String imageId = getImage.getString("image_id");
                 if(null!=imageId&&!imageId.trim().equals("")){
                     setImage.put("imageId",imageId);
-                    if(null!=imageId&&imageId.contains("web")){
+                    if(imageId.contains("web")){
                         setImage.put("imageUrl","https://sf6-ttcdn-tos.pstatp.com/obj/"+imageId);
                     }else{
                         setImage.put("imageUrl","https://sf6-ttcdn-tos.pstatp.com/obj/mosaic-legacy/"+imageId);
                     }
-                    setImage.put("imageUrl","https://sf6-ttcdn-tos.pstatp.com/obj/mosaic-legacy/"+imageId);
                 }
                 String videoId = getImage.getString("video_id");
                 if(null!=videoId&&!videoId.trim().equals("")){

+ 7 - 0
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/report/service/impl/ReportServiceImpl.java

@@ -67,6 +67,8 @@ public class ReportServiceImpl implements IReportService {
     private IByteDanceVideoReportDailyService byteDanceVideoReportDailyService;
     @Autowired
     private IByteDanceAdvertiserDataService advertiserDataService;
+    @Autowired
+    private IBytedanceInterfaceService bytedanceInterfaceService;
 
     @Override
     public void getAdvertiserReport(CtopOauthToken token, Date startDate, Date endDate, String bytedanceReportTypePl) {
@@ -279,11 +281,16 @@ public class ReportServiceImpl implements IReportService {
             List<Date> dates = DateUtils.findDates(start, end);
             for (int i = 0; i < dates.size(); i++) {
                 String formatDate = simpleDateFormat.format(dates.get(i));
+                //试玩报表
+                bytedanceInterfaceService.bytedancePlayableReport(token,formatDate,formatDate);
+                //
+                //素材报表
                 int code = bytedanceReportService.bytedanceMaterialReport(token, formatDate, formatDate);
                 //如果成功的话跑视频清洗数据方法,失败会进入重试库,重试成功后再清洗数据
                 if (code == 200 || code == 1) {
                     byteDanceVideoReportDailyService.videoInfoListByAccountId(formatDate, formatDate, token.getAccountId());
                 }
+                //
             }
         } catch (Exception e) {
             e.printStackTrace();