|
@@ -1,8 +1,5 @@
|
|
package org.jeecg.modules.kuaishou.controller;
|
|
package org.jeecg.modules.kuaishou.controller;
|
|
|
|
|
|
-import cn.com.ctop.common.utils.FileEntity;
|
|
|
|
-import cn.com.ctop.common.utils.FileUploadTool;
|
|
|
|
-import cn.com.ctop.common.utils.TransfMediaTool;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
|
|
import org.jeecg.modules.kuaishou.service.IKuaishouInterfaceService;
|
|
@@ -13,7 +10,6 @@ import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
-import java.io.File;
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
|
|
@@ -120,7 +116,7 @@ public class KuaiShouController {
|
|
|
|
|
|
@RequestMapping("/getToken")
|
|
@RequestMapping("/getToken")
|
|
public void getToken() {
|
|
public void getToken() {
|
|
- String accessToken = "b565fa0dc618ec8fa08e1b32d66f3f17";
|
|
|
|
|
|
+ String accessToken = "092955a5f1768f8dfdc19fd821ccfd9e";
|
|
kuaishouInterfaceService.getRefreshToken(accessToken);
|
|
kuaishouInterfaceService.getRefreshToken(accessToken);
|
|
|
|
|
|
|
|
|
|
@@ -130,7 +126,7 @@ public class KuaiShouController {
|
|
@RequestMapping(value = "/video/upload", consumes = "multipart/form-data;charset=utf-8")
|
|
@RequestMapping(value = "/video/upload", consumes = "multipart/form-data;charset=utf-8")
|
|
public void upload(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
|
|
public void upload(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
|
|
|
|
|
|
- String accessToken = "8903c5a4ddbec0c236eb536b8bec58db";
|
|
|
|
|
|
+ String accessToken = "360d43b49553684a011d6607322582b1";
|
|
Long advertiserId = 23212L;
|
|
Long advertiserId = 23212L;
|
|
|
|
|
|
kuaishouInterfaceService.videoUpload(advertiserId, accessToken, multipartFile, request);
|
|
kuaishouInterfaceService.videoUpload(advertiserId, accessToken, multipartFile, request);
|
|
@@ -141,7 +137,7 @@ public class KuaiShouController {
|
|
@RequestMapping("/video/get")
|
|
@RequestMapping("/video/get")
|
|
public void videoGet() {
|
|
public void videoGet() {
|
|
|
|
|
|
- String accessToken = "8903c5a4ddbec0c236eb536b8bec58db";
|
|
|
|
|
|
+ String accessToken = "360d43b49553684a011d6607322582b1";
|
|
Long advertiserId = 23212L;
|
|
Long advertiserId = 23212L;
|
|
String photoId = "5249789805735604135";
|
|
String photoId = "5249789805735604135";
|
|
/*FileUploadTool fileUploadTool = new FileUploadTool();
|
|
/*FileUploadTool fileUploadTool = new FileUploadTool();
|
|
@@ -159,7 +155,7 @@ public class KuaiShouController {
|
|
@RequestMapping("/image/get")
|
|
@RequestMapping("/image/get")
|
|
public void imageGet() {
|
|
public void imageGet() {
|
|
|
|
|
|
- String accessToken = "8903c5a4ddbec0c236eb536b8bec58db";
|
|
|
|
|
|
+ String accessToken = "360d43b49553684a011d6607322582b1";
|
|
Long advertiserId = 23212L;
|
|
Long advertiserId = 23212L;
|
|
String image_token = "market825e095b83eb4456a31ce95704d03238.jpg";
|
|
String image_token = "market825e095b83eb4456a31ce95704d03238.jpg";
|
|
/*FileUploadTool fileUploadTool = new FileUploadTool();
|
|
/*FileUploadTool fileUploadTool = new FileUploadTool();
|
|
@@ -178,7 +174,7 @@ public class KuaiShouController {
|
|
@RequestMapping("/area/list")
|
|
@RequestMapping("/area/list")
|
|
public void areaList() {
|
|
public void areaList() {
|
|
|
|
|
|
- String accessToken = "8903c5a4ddbec0c236eb536b8bec58db";
|
|
|
|
|
|
+ String accessToken = "360d43b49553684a011d6607322582b1";
|
|
Long advertiserId = 23212L;
|
|
Long advertiserId = 23212L;
|
|
String image_token = "market825e095b83eb4456a31ce95704d03238.jpg";
|
|
String image_token = "market825e095b83eb4456a31ce95704d03238.jpg";
|
|
/*FileUploadTool fileUploadTool = new FileUploadTool();
|
|
/*FileUploadTool fileUploadTool = new FileUploadTool();
|
|
@@ -197,7 +193,7 @@ public class KuaiShouController {
|
|
@RequestMapping(value = "/image/upload", consumes = "multipart/form-data;charset=utf-8")
|
|
@RequestMapping(value = "/image/upload", consumes = "multipart/form-data;charset=utf-8")
|
|
public void imgUpload(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
|
|
public void imgUpload(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
|
|
|
|
|
|
- String accessToken = "8903c5a4ddbec0c236eb536b8bec58db";
|
|
|
|
|
|
+ String accessToken = "360d43b49553684a011d6607322582b1";
|
|
Long advertiserId = 23212L;
|
|
Long advertiserId = 23212L;
|
|
|
|
|
|
kuaishouInterfaceService.imageUpload(advertiserId, accessToken, multipartFile, request);
|
|
kuaishouInterfaceService.imageUpload(advertiserId, accessToken, multipartFile, request);
|
|
@@ -208,20 +204,34 @@ public class KuaiShouController {
|
|
@RequestMapping(value = "/app/create", consumes = "multipart/form-data;charset=utf-8")
|
|
@RequestMapping(value = "/app/create", consumes = "multipart/form-data;charset=utf-8")
|
|
public void appCreate(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
|
|
public void appCreate(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
|
|
|
|
|
|
- String accessToken = "8903c5a4ddbec0c236eb536b8bec58db";
|
|
|
|
|
|
+ String accessToken = "360d43b49553684a011d6607322582b1";
|
|
Long advertiserId = 23212L;
|
|
Long advertiserId = 23212L;
|
|
|
|
|
|
- kuaishouInterfaceService.appCreate(advertiserId, accessToken, multipartFile, request);
|
|
|
|
|
|
+ JSONObject requestJson = new JSONObject();
|
|
|
|
+ requestJson.put("app_version", "2.3.6");
|
|
|
|
+ requestJson.put("app_name", "微信开发1");
|
|
|
|
+ requestJson.put("image_token", "market81dd2187353e4cb19918b61276797ce5.jpg");
|
|
|
|
+ requestJson.put("advertiser_id", advertiserId);
|
|
|
|
+ requestJson.put("package_name", "2");
|
|
|
|
+ requestJson.put("platform", 1);
|
|
|
|
+ kuaishouInterfaceService.appCreate(advertiserId, accessToken, multipartFile, request, requestJson);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- @RequestMapping(value = "/getAppList", consumes = "multipart/form-data;charset=utf-8")
|
|
|
|
|
|
+ @RequestMapping("/getAppList")
|
|
public void getAppList() throws IOException {
|
|
public void getAppList() throws IOException {
|
|
-
|
|
|
|
- String accessToken = "8903c5a4ddbec0c236eb536b8bec58db";
|
|
|
|
|
|
+ String accessToken = "360d43b49553684a011d6607322582b1";
|
|
Long advertiserId = 23212L;
|
|
Long advertiserId = 23212L;
|
|
-
|
|
|
|
kuaishouInterfaceService.getAppList(advertiserId, accessToken);
|
|
kuaishouInterfaceService.getAppList(advertiserId, accessToken);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @RequestMapping(value = "/app/update", consumes = "multipart/form-data;charset=utf-8")
|
|
|
|
+ public void appUpdate(@RequestParam("multipartFile") MultipartFile multipartFile, HttpServletRequest request) throws IOException {
|
|
|
|
+ String accessToken = "360d43b49553684a011d6607322582b1";
|
|
|
|
+ Long advertiserId = 23212L;
|
|
|
|
+ JSONObject requestJson = new JSONObject();
|
|
|
|
+ kuaishouInterfaceService.appUpdate(advertiserId, accessToken, requestJson, multipartFile, request);
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|