|
|
@@ -3,15 +3,15 @@ package cn.com.ctop.job.kuaishou.controller;
|
|
|
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.utils.Check;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
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.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
|
@@ -33,10 +33,13 @@ public class KuaishouController {
|
|
|
|
|
|
|
|
|
@ApiOperation(value="根据账户获取视频素材-账户下全部视频素材", notes="根据账户获取视频素材-账户下全部视频素材")
|
|
|
- @GetMapping(value = "/getKuaishouVideoByAccountId")
|
|
|
- public Map<String,String> getKuaishouVideoByAccountId(@RequestParam(name="accountId") Long accountId) {
|
|
|
+ @PostMapping(value = "/getKuaishouVideoByAccountId")
|
|
|
+ public Map<String,String> getKuaishouVideoByAccountId(@RequestBody JSONObject jsonObject) {
|
|
|
+ Long accountId = jsonObject.getLong("accountId");
|
|
|
+ JSONArray dataList = jsonObject.getJSONArray("photoIds");
|
|
|
+ List<String> materialIds = Check.isNull(dataList) ? null : JSONArray.parseObject(dataList.toJSONString(), List.class);
|
|
|
String token = tokenService.getByAccountId(accountId);
|
|
|
- return videoListService.getKuaishouVideoByAccountId(accountId, token, 1);
|
|
|
+ return videoListService.getKuaishouVideoByAccountId(accountId, token,materialIds, 1);
|
|
|
}
|
|
|
|
|
|
|