Kaynağa Gözat

实现对接速卖通图片controller

dev
ebeveyn
işleme
5165ee84c9
4 değiştirilmiş dosya ile 52 ekleme ve 1 silme
  1. BIN
      ruoyi-admin/bin/gop-sdk-Java1701065323525.jar
  2. +5
    -0
      ruoyi-admin/pom.xml
  3. +46
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressImgDemoController.java
  4. +1
    -1
      ruoyi-admin/src/main/resources/AliexpressDemoController.java

BIN
ruoyi-admin/bin/gop-sdk-Java1701065323525.jar Dosyayı Görüntüle


+ 5
- 0
ruoyi-admin/pom.xml Dosyayı Görüntüle

@@ -48,6 +48,11 @@
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-framework</artifactId>
</dependency>
<dependency>
<groupId>com.global.iop</groupId>
<artifactId>iop-api-sdk</artifactId>
<version>1.3.5-ae</version>
</dependency>
</dependencies>

<build>


+ 46
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressImgDemoController.java Dosyayı Görüntüle

@@ -0,0 +1,46 @@
package com.ruoyi.web.controller.aliexpress;

import com.global.iop.api.IopClient;
import com.global.iop.api.IopClientImpl;
import com.global.iop.api.IopRequest;
import com.global.iop.api.IopResponse;
import com.global.iop.domain.Protocol;
import com.global.iop.util.ApiException;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
* 用户信息
*
* @author ruoyi
*/
@RestController
@Api("速卖通图片接口Demo")
@RequestMapping("/aliexpress/img")
public class AliexpressImgDemoController extends BaseController
{

/**
* 获取用户列表
*/
@Log(title = "速卖通图片接口Demo-list", businessType = BusinessType.SELECT)
@ApiOperation("速卖通图片接口Demo")
@GetMapping("/list")
public String list() throws ApiException {
IopClient iopClient = new IopClientImpl("https://api-sg.aliexpress.com", "500516", "5KD1nXaPxADnXUxISAImi1gcgPqbKMN4");
IopRequest request = new IopRequest();
request.setApiName("aliexpress.photobank.redefining.listimagepagination");
request.addApiParameter("aeop_image_pagination_request", "{\"group_id\":\"0\", \"current_page\":\"1\",\"location_type\":\"0\",\"page_size\":\"10\"}");
IopResponse response = iopClient.execute(request, "50000100810eAzdp7j9nwt11e7586aQDBYn1hnSitvhdCbyemVxjhEPKZHhuGq44F3KQ", Protocol.TOP);
System.out.println("list:" + response.getGopResponseBody());
return response.getGopResponseBody();
}
}

ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressDemoController.java → ruoyi-admin/src/main/resources/AliexpressDemoController.java Dosyayı Görüntüle

@@ -36,7 +36,7 @@ public class AliexpressDemoController extends BaseController
* 获取图片银行分页查询
*/
@Log(title = "查询图片", businessType = BusinessType.SELECT)
@ApiOperation("获取用户列表")
@ApiOperation("查询图片")
@GetMapping("/list")
public String list(SysUser user) throws ApiException {
IopClient iopClient = new IopClientImpl("https://api-sg.aliexpress.com", "500516", "5KD1nXaPxADnXUxISAImi1gcgPqbKMN4");;

Yükleniyor…
İptal
Kaydet