| 
					
				 | 
			
			
				@@ -1,8 +1,6 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package cn.com.ctop.job.kuaishou.controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import cn.com.ctop.job.kuaishou.data.service.IKuaishouUnitAudienceAgeReportDailyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import cn.com.ctop.job.kuaishou.data.service.IKuaishouVideoListService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import cn.com.ctop.job.kuaishou.data.service.IOauthTokenService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.com.ctop.job.kuaishou.data.service.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.com.ctop.job.kuaishou.data.utils.Check; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.com.ctop.job.kuaishou.data.utils.DateUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.alibaba.fastjson.JSONArray; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -12,11 +10,7 @@ import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import lombok.extern.slf4j.Slf4j; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.web.bind.annotation.GetMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.web.bind.annotation.PostMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.web.bind.annotation.RequestBody; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.web.bind.annotation.RequestMapping; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.web.bind.annotation.RestController; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import java.util.Map; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -37,6 +31,13 @@ public class KuaishouController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private IKuaishouVideoListService videoListService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private IAdUnitReportService adUnitReportService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private IKuaishouUnitReportHourlyService unitReportHourlyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @ApiOperation(value = "根据账户获取视频素材-账户下全部视频素材", notes = "根据账户获取视频素材-账户下全部视频素材") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PostMapping(value = "/getKuaishouVideoByAccountId") 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -91,5 +92,18 @@ public class KuaishouController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @ApiOperation(value = "获取快手当天-广告组信息、组时报", notes = "更新快手当天-广告组信息、组时报") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @GetMapping(value = "/getKuaishouAdUnitRealTime") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public void getKuaishouVideoByAccountId(@RequestParam(name="accountId") long accountId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String nowDate = DateUtils.getNowDate("yyyy-MM-dd"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String token = tokenService.getByAccountId(accountId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //更新 组 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        adUnitReportService.getAdUnitReport(accountId,token, nowDate, nowDate, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //更新 组时报 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        unitReportHourlyService.getUnitReportHour(accountId, token, nowDate, nowDate, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |