|
@@ -40,6 +40,37 @@ public class KuaiShouMaterialControer {
|
|
|
@Autowired
|
|
|
private IKuaishouVideoRelateCreativesService relateCreativesService;
|
|
|
|
|
|
+
|
|
|
+ @PostMapping(value = "/getKuaiShouVideoList")
|
|
|
+ public JSONObject getKuaiShouVideoList(@RequestBody JSONObject requestJson) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ if (Check.isNull(requestJson)) {
|
|
|
+ throw new Exception("入参不能为空");
|
|
|
+ }
|
|
|
+ Long accountId = requestJson.getLong("accountId");
|
|
|
+ if (Check.isNull(accountId)) {
|
|
|
+ throw new Exception("账户id不能为空");
|
|
|
+ }
|
|
|
+ CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
|
|
|
+ if (Check.isNull(token)) {
|
|
|
+ throw new Exception("未获取账号授权信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
+ iKuaishouInterfaceService.getVideoList(token, nowDate, nowDate);
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "素材更新成功");
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", -1);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 查询上新素材
|
|
|
*
|
|
@@ -48,7 +79,7 @@ public class KuaiShouMaterialControer {
|
|
|
*/
|
|
|
@PostMapping(value = "/getNewVideoList")
|
|
|
public JSONObject getNewVideo(@RequestBody JSONObject requestJson) {
|
|
|
- log.info("获取上新素材入参:{}", requestJson);
|
|
|
+ // log.info("获取上新素材入参:{}", requestJson);
|
|
|
JSONObject returnJson = new JSONObject();
|
|
|
try {
|
|
|
if (Check.isNull(requestJson)) {
|
|
@@ -116,7 +147,7 @@ public class KuaiShouMaterialControer {
|
|
|
*/
|
|
|
@PostMapping(value = "/getHistoryVideoList")
|
|
|
public JSONObject getHistoryVideoList(@RequestBody JSONObject requestJson) {
|
|
|
- log.info("获取历史素材入参:{}", requestJson);
|
|
|
+ // log.info("获取历史素材入参:{}", requestJson);
|
|
|
JSONObject returnJson = new JSONObject();
|
|
|
try {
|
|
|
if (Check.isNull(requestJson)) {
|
|
@@ -193,7 +224,7 @@ public class KuaiShouMaterialControer {
|
|
|
*/
|
|
|
@PostMapping(value = "/getHistoryTopVideoList")
|
|
|
public JSONObject getHistoryTopVideoList(@RequestBody JSONObject requestJson) {
|
|
|
- log.info("获取历史Top素材入参:{}", requestJson);
|
|
|
+ // log.info("获取历史Top素材入参:{}", requestJson);
|
|
|
JSONObject returnJson = new JSONObject();
|
|
|
try {
|
|
|
if (Check.isNull(requestJson)) {
|
|
@@ -263,7 +294,7 @@ public class KuaiShouMaterialControer {
|
|
|
*/
|
|
|
@PostMapping(value = "/getCreateZeroVideoList")
|
|
|
public JSONObject getHistoryCreateVideoList(@RequestBody JSONObject requestJson) {
|
|
|
- log.info("获取关联创意数为0素材入参:{}", requestJson);
|
|
|
+ // log.info("获取关联创意数为0素材入参:{}", requestJson);
|
|
|
JSONObject returnJson = new JSONObject();
|
|
|
try {
|
|
|
if (Check.isNull(requestJson)) {
|