|
@@ -4,8 +4,11 @@ import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouGroupTemplate;
|
|
|
+import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouImageGet;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouGroupTemplateService;
|
|
|
+import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouImageGetService;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -24,7 +27,15 @@ import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
+import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.PutMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
@@ -57,7 +68,8 @@ public class KuaiShouGroupTemplateController {
|
|
|
@Autowired
|
|
|
private ICtopOauthTokenService tokenService;
|
|
|
static ExecutorService executorService = Executors.newFixedThreadPool(10);
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private IKuaiShouImageGetService iKuaiShouImageGetService;
|
|
|
|
|
|
@PostMapping(value = "/getLibraryConfig")
|
|
|
public Result<JSONObject> getLibraryConfig(@RequestBody JSONObject requestJson) {
|
|
@@ -232,6 +244,24 @@ public class KuaiShouGroupTemplateController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @PostMapping(value = "/queryUrlByImageTokens")
|
|
|
+ public Result<Object> queryUrlByImageTokens(@RequestBody JSONObject requestJson) {
|
|
|
+ try {
|
|
|
+ Long accountId = requestJson.getLong("accountId");
|
|
|
+ JSONArray imageTokens = requestJson.getJSONArray("imageTokens");
|
|
|
+ if (Check.isNull(accountId) || imageTokens.isEmpty()) {
|
|
|
+ throw new Exception("参数不能为空");
|
|
|
+ }
|
|
|
+ List<KuaiShouImageGet> list = iKuaiShouImageGetService.getUrlByImageTokens(accountId, imageTokens);
|
|
|
+ return Result.ok(list);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ return Result.error("查询失败");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|