|
@@ -1,5 +1,6 @@
|
|
|
package cn.com.ctop.kuaishou.modules.batch.controller;
|
|
|
|
|
|
+import cn.com.ctop.common.module.utils.Check;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IDelKuaiShouVideoGetService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -25,6 +26,10 @@ public class DelKuaiShouVideoGetController {
|
|
|
public Result<Object> insertAutoVideo(Long accountId) {
|
|
|
Result<Object> result = new Result<>();
|
|
|
try {
|
|
|
+ if (Check.isNull(accountId)) {
|
|
|
+ result.error500("添加账户");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
kuaiShouVideoGetService.insertDelVideoList(accountId);
|
|
|
result.success("操作成功!");
|
|
|
} catch (Exception e) {
|
|
@@ -38,6 +43,10 @@ public class DelKuaiShouVideoGetController {
|
|
|
public Result<Object> getCreateInfo(Long accountId, String photoName) {
|
|
|
Result<Object> result = new Result<>();
|
|
|
try {
|
|
|
+ if (Check.isNull(accountId) || Check.isNull(photoName)) {
|
|
|
+ result.error500("添加账户和素材名");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
kuaiShouVideoGetService.getCreateInfo(accountId, photoName);
|
|
|
result.success("操作成功!");
|
|
|
} catch (Exception e) {
|
|
@@ -52,6 +61,10 @@ public class DelKuaiShouVideoGetController {
|
|
|
public Result<Object> changeCreativesPutStatus(Long accountId) {
|
|
|
Result<Object> result = new Result<>();
|
|
|
try {
|
|
|
+ if (Check.isNull(accountId)) {
|
|
|
+ result.error500("添加账户");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
kuaiShouVideoGetService.changeCreativesPutStatus(accountId);
|
|
|
result.success("操作成功!");
|
|
|
} catch (Exception e) {
|
|
@@ -65,6 +78,10 @@ public class DelKuaiShouVideoGetController {
|
|
|
public Result<Object> deleteAccountVideos(Long accountId, String photoName) {
|
|
|
Result<Object> result = new Result<>();
|
|
|
try {
|
|
|
+ if (Check.isNull(accountId) || Check.isNull(photoName)) {
|
|
|
+ result.error500("添加账户和素材名");
|
|
|
+ return result;
|
|
|
+ }
|
|
|
//1 获取账户下所有视频
|
|
|
kuaiShouVideoGetService.insertDelVideoList(accountId);
|
|
|
Thread.sleep(1000l);
|