|
@@ -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(); |
|
|
|
|
|
} |
|
|
|
|
|
} |