ldj 9 месяцев назад
Родитель
Сommit
17b7574471
50 измененных файлов: 2431 добавлений и 0 удалений
  1. +249
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressCategoryController.java
  2. +138
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressFreightController.java
  3. +305
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressImageController.java
  4. +23
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressLogisticsController.java
  5. +536
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressOrderController.java
  6. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/CategoryGetPropValueFeatureDTO.java
  7. +17
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/CategoryQdUploadDTO.java
  8. +19
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/CategorySuggestionDTO.java
  9. +40
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/FreightCalculateFreightDTO.java
  10. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/FreightGetFreightSettingByTemplateQueryDTO.java
  11. +17
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/FreightListFreightTemplateDTO.java
  12. +20
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderAcceptCancelOrderDTO.java
  13. +20
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderDecryptOrderDTO.java
  14. +22
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderExtendsBuyerAcceptGoodsTimeDTO.java
  15. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindLoanListQueryDTO.java
  16. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderBaseInfoDTO.java
  17. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderByIdDTO.java
  18. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderListSimpleQueryDTO.java
  19. +19
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderReceiptInfoDTO.java
  20. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderTradeInfoDTO.java
  21. +29
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFulfillSolutionOrderDTO.java
  22. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderGetReceiptInfoDTO.java
  23. +35
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderGetSolutionOrderListDTO.java
  24. +16
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderGetTaxationPlatformDTO.java
  25. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderOrderListGetDTO.java
  26. +20
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderQueryRemarkDTO.java
  27. +20
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderQueryRemarksDTO.java
  28. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderRefuseCancelOrderDTO.java
  29. +22
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderSaveRemarkDTO.java
  30. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankDeleteUnUsePhotoDTO.java
  31. +17
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankGetPhotoBankInfoDTO.java
  32. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankGetWbImageDTO.java
  33. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankListGroupDTO.java
  34. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankListImagePaginationDTO.java
  35. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankQueryPhotoBankImageByPathsDTO.java
  36. +20
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankUploadImageDTO.java
  37. +17
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankUploadTempImageDTO.java
  38. +16
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/core/config/AliexpressAuth.java
  39. +18
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/core/config/AliexpressAuthClientConfig.java
  40. +24
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/core/config/AliexpressBeanConfig.java
  41. +60
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressCategoryEnu.java
  42. +30
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressFreightEnu.java
  43. +51
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressImageEnu.java
  44. +11
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressLogisticsEnu.java
  45. +75
    -0
      ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressOrderEnu.java
  46. +63
    -0
      ruoyi-admin/src/test/java/com/ruoyi/ap/ABADemo.java
  47. +49
    -0
      ruoyi-admin/src/test/java/com/ruoyi/ap/ProducerConsumerExample.java
  48. +59
    -0
      ruoyi-admin/src/test/java/com/ruoyi/ap/ProducerConsumerModel.java
  49. +48
    -0
      ruoyi-admin/src/test/java/com/ruoyi/ap/ProducerConsumerTest.java
  50. +36
    -0
      ruoyi-admin/src/test/java/com/ruoyi/ap/TestStream.java

+ 249
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressCategoryController.java Просмотреть файл

@@ -0,0 +1,249 @@
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.global.iop.util.FileItem;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.web.controller.aliexpress.dto.CategoryGetPropValueFeatureDTO;
import com.ruoyi.web.controller.aliexpress.dto.CategoryQdUploadDTO;
import com.ruoyi.web.controller.aliexpress.dto.CategorySuggestionDTO;
import com.ruoyi.web.core.config.AliexpressAuthClientConfig;
import com.ruoyi.web.enumerate.AliexpressCategoryEnu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.IOException;

/**
* @author ldj
* @date 2024/2/27 17:01
* @Description: ...
* @Version 1.0
*/
@RestController
@Api("对接速卖通 类目")
@RequestMapping("/aliexpress/category")
public class AliexpressCategoryController {

@Resource
private AliexpressAuthClientConfig AliexpressAuthClientConfig;
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.category.redefining.getPropValueFeature");
request.addApiParameter("propertyId", "1111");
request.addApiParameter("valueId", "2222");
request.addApiParameter("featureKey", "CountryCode");
IopResponse response = client.execute(request, Protocol.GOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/
/**
* 获取AE属性的PropValueFeature
*/
@Log(title = "获取AE属性的PropValueFeature", businessType = BusinessType.SELECT)
@ApiOperation("获取AE属性的PropValueFeature")
@PostMapping("/getPropValueFeature")
public String getPropValueFeature(@RequestBody CategoryGetPropValueFeatureDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressCategoryEnu.GET_PROP_VALUE_FEATURE.getApiName());
request.addApiParameter("propertyId", reqDto.getPropertyId());
request.addApiParameter("valueId", reqDto.getValueId());
request.addApiParameter("featureKey", reqDto.getFeatureKey());
IopResponse response = client.execute(request);
return response.getGopResponseBody();
}

/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("/v2.0/categories/suggestion");
request.setHttpMethod("GET");
request.addApiParameter("image_url", "https://upload.wikimedia.org/wikipedia/commons/b/b5/Winnersh_Meadows_Trees.jpg");
request.addApiParameter("language", "es");
request.addApiParameter("title", "test product");
IopResponse response = client.execute(request, accessToken, Protocol.REST_VND_2);
System.out.println(response.getBody());
Thread.sleep(10);
*/
/**
* suggestion
*/
@Log(title = "suggestion", businessType = BusinessType.SELECT)
@ApiOperation("suggestion")
@PostMapping("/suggestion")
public String suggestion(@RequestBody CategorySuggestionDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressCategoryEnu.SUGGESTION.getApiName());
request.setHttpMethod("GET");
request.addApiParameter("image_url", reqDto.getImage_url());
request.addApiParameter("language", reqDto.getLanguage());
request.addApiParameter("title", reqDto.getTitle());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.REST_VND_2);
return response.getGopResponseBody();
}

/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.data.qd.file.upload");
request.addApiParameter("upload_meta", "{\"partition\":\"ds\\u003d20230101\",\"biz_code\":\"QD-CROWD\"}");
request.addFileParameter("file_data",new FileItem("/Users/D ocuments/book.jpg"));
IopResponse response = client.execute(request, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/
/**
* qdUpload
*/
@Log(title = "qdUpload", businessType = BusinessType.SELECT)
@ApiOperation("qdUpload")
@PostMapping("/qdUpload")
public String qdUpload(@RequestParam("file") MultipartFile file, @RequestBody CategoryQdUploadDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressCategoryEnu.FILE_UPLOAD.getApiName());
request.addApiParameter("upload_meta", reqDto.getUpload_meta());
try {
request.addFileParameter("file_data", new FileItem(file.getOriginalFilename(), file.getInputStream(), file.getContentType()));
} catch (IOException e) {
return "文件上传失败,IO异常!";
}
IopResponse response = client.execute(request, Protocol.TOP);
return response.getGopResponseBody();
}

//查询属于特定类别的sku属性信息
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.solution.sku.attribute.query");
request.addApiParameter("query_sku_attribute_info_request", "{\"category_id\":\"11112222\",\"aliexpress_category_id\":\"200000801\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//API,用于卖家查询类别树。只支持显示卖家有权发布产品的类别。
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.solution.seller.category.tree.query");
request.addApiParameter("category_id", "509");
request.addApiParameter("filter_no_permission", "true");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//判断叶子类目是否必须尺码表
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.category.redefining.sizemodelsrequiredforpostcat");
request.addApiParameter("param0", "200000386");
IopResponse response = client.execute(request, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//查询海外商家授权品牌
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.merchant.oversea.brand.get");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//查询类目下欧盟责任人列表
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.category.eu.responsible.persons.list");
request.setHttpMethod("GET");
request.addApiParameter("category_id", "39050508");
request.addApiParameter("channel", "AE_GLOBAL");
request.addApiParameter("channel_seller_id", "2671514005");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//根据发布类目id、父属性路径(可选)获取子属性信息,只返回有权限品牌
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.category.redefining.getchildattributesresultbypostcateidandpath");
request.addApiParameter("channel", "AE_GLOBAL");
request.addApiParameter("locale", "en_US");
request.addApiParameter("product_type", "2");
request.addApiParameter("channel_seller_id", "2671514005");
request.addApiParameter("param1", "349");
request.addApiParameter("param2", "219=9441741844");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//类目资质信息查询
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.category.qualifications.list");
request.setHttpMethod("GET");
request.addApiParameter("category_id", "200001426");
request.addApiParameter("local", "zh_CN");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//获取单个类目信息
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.category.redefining.getpostcategorybyid");
request.addApiParameter("param0", "5090301");
IopResponse response = client.execute(request, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//获取指定类目下子类目信息
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.category.redefining.getchildrenpostcategorybyid");
request.addApiParameter("param0", "509");
IopResponse response = client.execute(request, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

//获取指定类目下的子类目信息(可校验卖家权限)
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.category.tree.list");
request.setHttpMethod("GET");
request.addApiParameter("channel_seller_id", "2671514005");
request.addApiParameter("only_with_permission", "true");
request.addApiParameter("channel", "AE_GLOBAL");
request.addApiParameter("category_id", "0");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/
}

+ 138
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressFreightController.java Просмотреть файл

@@ -0,0 +1,138 @@
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.enums.BusinessType;
import com.ruoyi.web.controller.aliexpress.dto.FreightCalculateFreightDTO;
import com.ruoyi.web.controller.aliexpress.dto.FreightGetFreightSettingByTemplateQueryDTO;
import com.ruoyi.web.controller.aliexpress.dto.FreightListFreightTemplateDTO;
import com.ruoyi.web.core.config.AliexpressAuthClientConfig;
import com.ruoyi.web.enumerate.AliexpressFreightEnu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
* @author ldj
* @date 2024/2/28 14:34
* @Description: ...
* @Version 1.0
*/
@RestController
@Api("对接速卖通 类目")
@RequestMapping("/aliexpress/freight")
public class AliexpressFreightController {

@Resource
private AliexpressAuthClientConfig AliexpressAuthClientConfig;

//用户运费模板列表信息
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.freight.redefining.listfreighttemplate");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 用户运费模板列表信息
*/
@Log(title = "用户运费模板列表信息", businessType = BusinessType.SELECT)
@ApiOperation("用户运费模板列表信息")
@PostMapping("/listFreightTemplate")
public String listFreightTemplate(@RequestBody FreightListFreightTemplateDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressFreightEnu.LIST_FREIGHT_TEMPLATE.getApiName());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//运费计算
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.freight.redefining.calculatefreight");
request.addApiParameter("height", "1");
request.addApiParameter("weight", "1");
request.addApiParameter("pack_add_weight", "1");
request.addApiParameter("count", "1");
request.addApiParameter("freight_template_id", "1000");
request.addApiParameter("pack_add_unit", "1");
request.addApiParameter("is_custom_pack_weight", "false");
request.addApiParameter("width", "1");
request.addApiParameter("length", "1");
request.addApiParameter("product_price", "{\"amount\":\"100.01\",\"cent\":\"10000\",\"currency_code\":\"USD\"}");
request.addApiParameter("pack_base_unit", "1");
request.addApiParameter("country", "RU");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 运费计算
*/
@Log(title = "运费计算", businessType = BusinessType.SELECT)
@ApiOperation("运费计算")
@PostMapping("/calculateFreight")
public String calculateFreight(@RequestBody FreightCalculateFreightDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressFreightEnu.CALCULATE_FREIGHT.getApiName());
request.addApiParameter("height", reqDto.getHeight());
request.addApiParameter("weight", reqDto.getWeight());
request.addApiParameter("pack_add_weight", reqDto.getPack_add_weight());
request.addApiParameter("count", reqDto.getCount());
request.addApiParameter("freight_template_id", reqDto.getFreight_template_id());
request.addApiParameter("pack_add_unit", reqDto.getPack_add_unit());
request.addApiParameter("is_custom_pack_weight", reqDto.getIs_custom_pack_weight());
request.addApiParameter("width", reqDto.getWidth());
request.addApiParameter("length", reqDto.getLength());
request.addApiParameter("product_price", reqDto.getProduct_price());
request.addApiParameter("pack_base_unit", reqDto.getPack_base_unit());
request.addApiParameter("country", reqDto.getCountry());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//通过模板ID获取单个运费模板内容
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.freight.redefining.getfreightsettingbytemplatequery");
request.addApiParameter("template_id", "1000");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 通过模板ID获取单个运费模板内容
*/
@Log(title = "通过模板ID获取单个运费模板内容", businessType = BusinessType.SELECT)
@ApiOperation("通过模板ID获取单个运费模板内容")
@PostMapping("/getFreightSettingByTemplateQuery")
public String getFreightSettingByTemplateQuery(@RequestBody FreightGetFreightSettingByTemplateQueryDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressFreightEnu.GET_FREIGHT_SETTING_BY_TEMPLATE_QUERY.getApiName());
request.addApiParameter("template_id", reqDto.getTemplate_id());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}


}

+ 305
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressImageController.java Просмотреть файл

@@ -0,0 +1,305 @@
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.global.iop.util.FileItem;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.web.controller.aliexpress.dto.*;
import com.ruoyi.web.core.config.AliexpressAuthClientConfig;
import com.ruoyi.web.enumerate.AliexpressImageEnu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.IOException;

/**
* @author ldj
* @date 2024/2/27 18:18
* @Description: ...
* @Version 1.0
*/
@RestController
@Api("对接速卖通 图片")
@RequestMapping("/aliexpress/image")
public class AliexpressImageController {

@Resource
private AliexpressAuthClientConfig AliexpressAuthClientConfig;

//上传图片到临时目录
/** {
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.image.redefining.uploadtempimage");
request.addFileParameter("file_data",new FileItem("/Users/D ocuments/book.jpg"));
request.addApiParameter("src_file_name", "1.jpg");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
}
**/
/**
* 上传图片到临时目录
*/
@Log(title = "上传图片到临时目录", businessType = BusinessType.SELECT)
@ApiOperation("上传图片到临时目录")
@PostMapping("/uploadTempImage")
public String uploadTempImage(@RequestParam("file") MultipartFile file, @RequestBody PhotoBankUploadTempImageDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.UPLOAD_TEMP_IMAGE.getApiName());
try {
request.addFileParameter("file_data", new FileItem(file.getOriginalFilename(), file.getInputStream(), file.getContentType()));
} catch (IOException e) {
return "文件上传失败,IO异常!";
}
request.addApiParameter("src_file_name", file.getOriginalFilename());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//上传图片到临时目录(推荐使用)

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.image.redefining.uploadtempimageforsdk");
* request.addFileParameter("file_data",new FileItem("/Users/D ocuments/book.jpg"));
* request.addApiParameter("src_file_name", "1.jpg");
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "上传图片到临时目录(推荐使用)", businessType = BusinessType.SELECT)
@ApiOperation("上传图片到临时目录(推荐使用)")
@PostMapping("/uploadTempImageForSdk")
public String uploadTempImageForSdk(@RequestParam("file") MultipartFile file, @RequestBody PhotoBankUploadTempImageDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.UPLOAD_TEMP_IMAGE_FOR_SDK.getApiName());
try {
request.addFileParameter("file_data", new FileItem(file.getOriginalFilename(), file.getInputStream(), file.getContentType()));
} catch (IOException e) {
return "文件上传失败,IO异常!";
}
request.addApiParameter("src_file_name", file.getOriginalFilename());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//上传图片到图片银行

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.photobank.redefining.uploadimage");
* request.addApiParameter("file_name", "0");
* request.addApiParameter("group_id", "0");
* request.addFileParameter("image_bytes",new FileItem("/Users/D ocuments/book.jpg"));
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "上传图片到图片银行", businessType = BusinessType.SELECT)
@ApiOperation("上传图片到图片银行")
@PostMapping("/uploadImage")
public String uploadImage(@RequestParam("file") MultipartFile file, @RequestBody PhotoBankUploadImageDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.UPLOAD_IMAGE.getApiName());
request.addApiParameter("file_name", reqDto.getFile_name());
request.addApiParameter("group_id", reqDto.getGroup_id());
try {
request.addFileParameter("image_bytes", new FileItem(file.getOriginalFilename(), file.getInputStream(), file.getContentType()));
} catch (IOException e) {
return "文件上传失败,IO异常!";
}
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//上传图片到图片银行(推荐使用)

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.photobank.redefining.uploadimageforsdk");
* request.addApiParameter("group_id", "0");
* request.addFileParameter("image_bytes",new FileItem("/Users/D ocuments/book.jpg"));
* request.addApiParameter("file_name", "0");
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "上传图片到图片银行(推荐使用)", businessType = BusinessType.SELECT)
@ApiOperation("上传图片到图片银行(推荐使用)")
@PostMapping("/uploadImageForSdk")
public String uploadImageForSdk(@RequestParam("file") MultipartFile file, @RequestBody PhotoBankUploadImageDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.UPLOAD_IMAGE_FOR_SDK.getApiName());
request.addApiParameter("file_name", reqDto.getFile_name());
request.addApiParameter("group_id", reqDto.getGroup_id());
try {
request.addFileParameter("image_bytes", new FileItem(file.getOriginalFilename(), file.getInputStream(), file.getContentType()));
} catch (IOException e) {
return "文件上传失败,IO异常!";
}
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//删除未被引用图片

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.photobank.redefining.delunusephoto");
* request.addApiParameter("aeop_delete_image_request", "{\"image_repository_id\":\"100403959\"}");
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "删除未被引用图片", businessType = BusinessType.SELECT)
@ApiOperation("删除未被引用图片")
@PostMapping("/deleteUnUsePhoto")
public String deleteUnUsePhoto(@RequestBody PhotoBankDeleteUnUsePhotoDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.DELETE_UNUSE_PHOTO.getApiName());
request.addApiParameter("aeop_delete_image_request", reqDto.getAeop_delete_image_request());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//图片银行列表分页查询

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.photobank.redefining.listimagepagination");
* request.addApiParameter("aeop_image_pagination_request", "{\"group_id\":\"0\",\"current_page\":\"0\",\"location_type\":\"0\",\"page_size\":\"0\"}");
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "图片银行列表分页查询", businessType = BusinessType.SELECT)
@ApiOperation("图片银行列表分页查询")
@PostMapping("/listImagePagination")
public String listImagePagination(@RequestBody PhotoBankListImagePaginationDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.LIST_IMAGE_PAGINATION.getApiName());
request.addApiParameter("aeop_image_pagination_request", reqDto.getAeop_image_pagination_request());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//查询图片银行分组信息

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.photobank.redefining.listgroup");
* request.addApiParameter("group_id", "8401");
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "查询图片银行分组信息", businessType = BusinessType.SELECT)
@ApiOperation("查询图片银行分组信息")
@PostMapping("/listGroup")
public String listGroup(@RequestBody PhotoBankListGroupDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.LIST_GROUP.getApiName());
request.addApiParameter("group_id", reqDto.getGroup_id());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//根据path查询图片信息

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.photobank.redefining.queryphotobankimagebypaths");
* request.addApiParameter("paths", "HTB1rxqmHpXXXXXBXFXXq6xXFXXXm.jpg,HBA1rxqmHpXXXXXBXFXXq6xXFXXXm.jpg");
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "根据path查询图片信息", businessType = BusinessType.SELECT)
@ApiOperation("根据path查询图片信息")
@PostMapping("/queryPhotoBankImageByPaths")
public String queryPhotoBankImageByPaths(@RequestBody PhotoBankQueryPhotoBankImageByPathsDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.QUERY_PHOTO_BANK_IMAGE_BY_PATHS.getApiName());
request.addApiParameter("paths", reqDto.getPaths());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//获取图片银行信息

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.photobank.redefining.getphotobankinfo");
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "获取图片银行信息", businessType = BusinessType.SELECT)
@ApiOperation("获取图片银行信息")
@PostMapping("/getPhotoBankInfo")
public String getPhotoBankInfo(@RequestBody PhotoBankGetPhotoBankInfoDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.GET_PHOTO_BANK_INFO.getApiName());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//获取白底图

/**
* {
* IopClient client = new IopClient(url, appkey, appSecret);
* IopRequest request = new IopRequest();
* request.setApiName("aliexpress.photobank.redefining.wbimage.get");
* request.addApiParameter("get_wb_image_request", "{\"original_image_url\":\"https://ae01.alicdn.com/kf/H401119d45e2e4e0ab21a28e3e304b65dT.png\"}");
* IopResponse response = client.execute(request, accessToken, Protocol.TOP);
* System.out.println(response.getBody());
* Thread.sleep(10);
* }
**/
@Log(title = "获取白底图", businessType = BusinessType.SELECT)
@ApiOperation("获取白底图")
@PostMapping("/getWbImage")
public String getWbImage(@RequestBody PhotoBankGetWbImageDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressImageEnu.GET_WB_IMAGE.getApiName());
request.addApiParameter("get_wb_image_request", reqDto.getGet_wb_image_request());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
}

+ 23
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressLogisticsController.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuthClientConfig;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
* @author ldj
* @date 2024/2/28 14:34
* @Description: ...
* @Version 1.0
*/
@RestController
@Api("对接速卖通 类目")
@RequestMapping("/aliexpress/logistics")
public class AliexpressLogisticsController {

@Resource
private AliexpressAuthClientConfig AliexpressAuthClientConfig;
}

+ 536
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/AliexpressOrderController.java Просмотреть файл

@@ -0,0 +1,536 @@
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.enums.BusinessType;
import com.ruoyi.web.controller.aliexpress.dto.*;
import com.ruoyi.web.core.config.AliexpressAuthClientConfig;
import com.ruoyi.web.enumerate.AliexpressOrderEnu;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
* @author ldj
* @date 2024/2/27 16:45
* @Description: ...
* @Version 1.0
*/
@RestController
@Api("对接速卖通图片演示")
@RequestMapping("/aliexpress/order")
public class AliexpressOrderController {

@Resource
private AliexpressAuthClientConfig AliexpressAuthClientConfig;

//获取订单收据信息
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.solution.order.receiptinfo.get");
request.addApiParameter("param1", "{\"order_id\":\"123456789\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 获取订单收据信息
*/
@Log(title = "获取订单收据信息", businessType = BusinessType.SELECT)
@ApiOperation("获取订单收据信息")
@PostMapping("/getSolutionOrderReceiptInfo")
public String getSolutionOrderReceiptInfo(@RequestBody OrderGetReceiptInfoDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.GET_SOLUTION_ORDER_RECEIPT_INFO.getApiName());
request.addApiParameter("param1", reqDto.getParam1());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//从速卖通获取订单清单
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.solution.order.get");
request.addApiParameter("create_date_end", "2017-10-12 12:12:12");
request.addApiParameter("create_date_start", "2017-10-12 12:12:12");
request.addApiParameter("modified_date_start", "2017-10-12 12:12:12");
request.addApiParameter("order_status_list", "SELLER_PART_SEND_GOODS");
request.addApiParameter("buyer_login_id", "test_id");
request.addApiParameter("page_size", "20");
request.addApiParameter("modified_date_end", "2017-10-12 12:12:12");
request.addApiParameter("current_page", "1");
request.addApiParameter("order_status", "SELLER_PART_SEND_GOODS");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 从速卖通获取订单清单
*/
@Log(title = "从速卖通获取订单清单", businessType = BusinessType.SELECT)
@ApiOperation("从速卖通获取订单清单")
@PostMapping("/getSolutionOrderList")
public String getSolutionOrderList(@RequestBody OrderGetSolutionOrderListDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.GET_SOLUTION_ORDER_LIST.getApiName());
request.addApiParameter("create_date_end", reqDto.getCreate_date_end());
request.addApiParameter("create_date_start", reqDto.getCreate_date_start());
request.addApiParameter("modified_date_start", reqDto.getModified_date_start());
request.addApiParameter("order_status_list", reqDto.getOrder_status_list());
request.addApiParameter("buyer_login_id", reqDto.getBuyer_login_id());
request.addApiParameter("page_size", reqDto.getPage_size());
request.addApiParameter("modified_date_end", reqDto.getModified_date_end());
request.addApiParameter("current_page", reqDto.getCurrent_page());
request.addApiParameter("order_status", reqDto.getOrder_status());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//为卖家配送订单
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.solution.order.fulfill");
request.addApiParameter("service_name", "EMS");
request.addApiParameter("tracking_website", "www.17track.com");
request.addApiParameter("out_ref", "888877779999");
request.addApiParameter("send_type", "part");
request.addApiParameter("description", "memo");
request.addApiParameter("logistics_no", "LA88887777CN");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 为卖家配送订单
*/
@Log(title = "为卖家配送订单", businessType = BusinessType.SELECT)
@ApiOperation("为卖家配送订单")
@PostMapping("/fulfillSolutionOrder")
public String fulfillSolutionOrder(@RequestBody OrderFulfillSolutionOrderDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.FULFILL_SOLUTION_ORDER.getApiName());
request.addApiParameter("service_name", reqDto.getService_name());
request.addApiParameter("tracking_website", reqDto.getTracking_website());
request.addApiParameter("out_ref", reqDto.getOut_ref());
request.addApiParameter("send_type", reqDto.getSend_type());
request.addApiParameter("description", reqDto.getDescription());
request.addApiParameter("logistics_no", reqDto.getLogistics_no());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//买家订单物流详情解密
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.seller.order.decrypt");
request.addApiParameter("orderId", "8152891820014001");
request.addApiParameter("oaid", "MjAwMDQyMzYw-ssfsvnL3Nv%2B%2B54ABsv%2BaoQ");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 买家订单物流详情解密
*/
@Log(title = "买家订单物流详情解密", businessType = BusinessType.SELECT)
@ApiOperation("买家订单物流详情解密")
@PostMapping("/decryptOrder")
public String decryptOrder(@RequestBody OrderDecryptOrderDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.DECRYPT_ORDER.getApiName());
request.addApiParameter("orderId", reqDto.getOrderId());
request.addApiParameter("oaid", reqDto.getOaid());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//卖家同意取消订单
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.seller.order.acceptcancel");
request.addApiParameter("param_order_cancel_request", "{\"buyer_login_id\":\"test1\",\"order_id\":\"2345789067\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 卖家同意取消订单
*/
@Log(title = "卖家同意取消订单", businessType = BusinessType.SELECT)
@ApiOperation("卖家同意取消订单")
@PostMapping("/acceptCancelOrder")
public String acceptCancelOrder(@RequestBody OrderAcceptCancelOrderDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.ACCEPT_CANCEL_ORDER.getApiName());
request.addApiParameter("param_order_cancel_request", reqDto.getParam_order_cancel_request());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//卖家拒绝取消订单
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.seller.order.refusecancel");
request.addApiParameter("param_order_cancel_request", "{\"buyer_login_id\":\"test\",\"memo\":\"already send googds\",\"order_id\":\"33440956789\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 卖家拒绝取消订单
*/
@Log(title = "卖家拒绝取消订单", businessType = BusinessType.SELECT)
@ApiOperation("卖家拒绝取消订单")
@PostMapping("/refuseCancelOrder")
public String refuseCancelOrder(@RequestBody OrderRefuseCancelOrderDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.REFUSE_CANCEL_ORDER.getApiName());
request.addApiParameter("param_order_cancel_request", reqDto.getParam_order_cancel_request());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//平台固定参数获取
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.taxation.platform.open.get");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 平台固定参数获取
*/
@Log(title = "平台固定参数获取", businessType = BusinessType.SELECT)
@ApiOperation("平台固定参数获取")
@PostMapping("/getTaxationPlatform")
public String getTaxationPlatform(@RequestBody OrderGetTaxationPlatformDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.GET_TAXATION_PLATFORM.getApiName());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//延长买家收货时间
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.redefining.extendsbuyeracceptgoodstime");
request.addApiParameter("param0", "123456789");
request.addApiParameter("param1", "5");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 延长买家收货时间
*/
@Log(title = "延长买家收货时间", businessType = BusinessType.SELECT)
@ApiOperation("延长买家收货时间")
@PostMapping("/extendsBuyerAcceptGoodsTime")
public String extendsBuyerAcceptGoodsTime(@RequestBody OrderExtendsBuyerAcceptGoodsTimeDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.EXTENDS_BUYER_ACCEPT_GOODS_TIME.getApiName());
request.addApiParameter("param0", reqDto.getParam0());
request.addApiParameter("param1", reqDto.getParam1());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//新版交易订单详情查询
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.new.redefining.findorderbyid");
request.addApiParameter("param1", "{\"show_id\":\"1\",\"ext_info_bit_flag\":\"111111\",\"field_list\":\"1\",\"order_id\":\"12345678\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 新版交易订单详情查询
*/
@Log(title = "新版交易订单详情查询", businessType = BusinessType.SELECT)
@ApiOperation("新版交易订单详情查询")
@PostMapping("/findOrderById")
public String findOrderById(@RequestBody OrderFindOrderByIdDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.FIND_ORDER_BY_ID.getApiName());
request.addApiParameter("param1", reqDto.getParam1());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//查询卖家备注内容
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.merchant.redefining.queryremarks");
request.addApiParameter("biz_type", "0");
request.addApiParameter("remark_ids", "123123123,123123124");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 查询卖家备注内容
*/
@Log(title = "查询卖家备注内容", businessType = BusinessType.SELECT)
@ApiOperation("查询卖家备注内容")
@PostMapping("/queryRemarks")
public String queryRemarks(@RequestBody OrderQueryRemarksDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.QUERY_REMARKS.getApiName());
request.addApiParameter("biz_type", reqDto.getBiz_type());
request.addApiParameter("remark_ids", reqDto.getRemark_ids());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//查询订单卖家备注
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.merchant.redefining.queryremark");
request.addApiParameter("biz_type", "0");
request.addApiParameter("remark_id", "1234132345");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 查询订单卖家备注
*/
@Log(title = "查询订单卖家备注", businessType = BusinessType.SELECT)
@ApiOperation("查询订单卖家备注")
@PostMapping("/queryRemark")
public String queryRemark(@RequestBody OrderQueryRemarkDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.QUERY_REMARK.getApiName());
request.addApiParameter("biz_type", reqDto.getBiz_type());
request.addApiParameter("remark_id", reqDto.getRemark_id());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//查询订单放款信息
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.redefining.findloanlistquery");
request.addApiParameter("param1", "{\"loan_status\":\"wait_loan\",\"create_date_end\":\"10/09/2013 00:00:00\",\"create_date_start\":\"10/08/2013 00:00:00\",\"page\":\"1\",\"order_id\":\"97191172200623\",\"page_size\":\"20\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 查询订单放款信息
*/
@Log(title = "查询订单放款信息", businessType = BusinessType.SELECT)
@ApiOperation("查询订单放款信息")
@PostMapping("/findLoanListQuery")
public String findLoanListQuery(@RequestBody OrderFindLoanListQueryDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.FIND_LOAN_LIST_QUERY.getApiName());
request.addApiParameter("param1", reqDto.getParam1());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//订单交易信息查询
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.redefining.findordertradeinfo");
request.addApiParameter("param1", "{\"buyer_aliid\":\"12345\",\"show_id\":\"12345\",\"seller_operator_aliid\":\"12345\",\"seller_aliid\":\"12345\",\"field_list\":\"12345\",\"ext_info_bit_flag\":\"12345\",\"order_id\":\"700459681162799\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 订单交易信息查询
*/
@Log(title = "订单交易信息查询", businessType = BusinessType.SELECT)
@ApiOperation("订单交易信息查询")
@PostMapping("/findOrderTradeInfo")
public String findOrderTradeInfo(@RequestBody OrderFindOrderTradeInfoDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.FIND_ORDER_TRADE_INFO.getApiName());
request.addApiParameter("param1", reqDto.getParam1());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//订单列表查询
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.seller.orderlist.get");
request.addApiParameter("param_aeop_order_query", "{\"modified_date_start\":\"2017-10-12 12:12:12\",\"modified_date_end\":\"2017-10-12 12:12:12\",\"order_status\":\"SELLER_PART_SEND_GOODS\",\"create_date_end\":\"2017-10-12 12:12:12\",\"create_date_start\":\"2017-10-12 12:12:12\",\"buyer_login_id\":\"test\",\"current_page\":\"1\",\"order_status_list\":[\"SELLER_PART_SEND_GOODS\",\"SELLER_PART_SEND_GOODS\"],\"page_size\":\"20\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 订单列表查询
*/
@Log(title = "订单列表查询", businessType = BusinessType.SELECT)
@ApiOperation("订单列表查询")
@PostMapping("/orderListGet")
public String orderListGet(@RequestBody OrderOrderListGetDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.ORDER_LIST_GET.getApiName());
request.addApiParameter("param_aeop_order_query", reqDto.getParam_aeop_order_query());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//订单列表简化查询
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.redefining.findorderlistsimplequery");
request.addApiParameter("param1", "{\"order_status\":\"PLACE_ORDER_SUCCESS\",\"create_date_end\":\"2015-07-10 00:00:00\",\"create_date_start\":\"2015-07-09 00:00:00\",\"page\":\"1\",\"order_status_list\":[\"PLACE_ORDER_SUCCESS\",\"WAIT_SELLER_SEND_GOODS\"],\"page_size\":\"20\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 订单列表简化查询
*/
@Log(title = "订单列表简化查询", businessType = BusinessType.SELECT)
@ApiOperation("订单列表简化查询")
@PostMapping("/findOrderListSimpleQuery")
public String findOrderListSimpleQuery(@RequestBody OrderFindOrderListSimpleQueryDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.FIND_ORDER_LIST_SIMPLE_QUERY.getApiName());
request.addApiParameter("param1", reqDto.getParam1());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//订单基础信息查询
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.redefining.findorderbaseinfo");
request.addApiParameter("param1", "{\"buyer_aliid\":\"12345\",\"show_id\":\"12345\",\"seller_operator_aliid\":\"12345\",\"seller_aliid\":\"12345\",\"field_list\":\"12345\",\"ext_info_bit_flag\":\"12345\",\"order_id\":\"123456789\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 订单基础信息查询
*/
@Log(title = "订单基础信息查询", businessType = BusinessType.SELECT)
@ApiOperation("订单基础信息查询")
@PostMapping("/findOrderBaseInfo")
public String findOrderBaseInfo(@RequestBody OrderFindOrderBaseInfoDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.FIND_ORDER_BASE_INFO.getApiName());
request.addApiParameter("param1", reqDto.getParam1());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
//订单收货信息查询
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.trade.redefining.findorderreceiptinfo");
request.addApiParameter("param1", "{\"buyer_aliid\":\"100000\",\"show_id\":\"1\",\"seller_operator_aliid\":\"20000\",\"seller_aliid\":\"20000\",\"field_list\":\"orderAmount\",\"ext_info_bit_flag\":\"10100\",\"order_id\":\"123456789\"}");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 订单收货信息查询
*/
@Log(title = "订单收货信息查询", businessType = BusinessType.SELECT)
@ApiOperation("订单收货信息查询")
@PostMapping("/findOrderReceiptInfo")
public String findOrderReceiptInfo(@RequestBody OrderFindOrderReceiptInfoDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.FIND_ORDER_RECEIPT_INFO.getApiName());
request.addApiParameter("param1", reqDto.getParam1());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}

//记录订单备注信息
/*
IopClient client = new IopClient(url, appkey, appSecret);
IopRequest request = new IopRequest();
request.setApiName("aliexpress.merchant.redefining.saveremark");
request.addApiParameter("biz_type", "0");
request.addApiParameter("remark_id", "23432412341234");
request.addApiParameter("content", "hello");
IopResponse response = client.execute(request, accessToken, Protocol.TOP);
System.out.println(response.getBody());
Thread.sleep(10);
*/

/**
* 记录订单备注信息
*/
@Log(title = "记录订单备注信息", businessType = BusinessType.SELECT)
@ApiOperation("记录订单备注信息")
@PostMapping("/saveRemark")
public String saveRemark(@RequestBody OrderSaveRemarkDTO reqDto) throws ApiException {
IopClient client = new IopClientImpl(AliexpressAuthClientConfig.getUrl(), AliexpressAuthClientConfig.getAppKey(), AliexpressAuthClientConfig.getAppSecret());
IopRequest request = new IopRequest();
request.setApiName(AliexpressOrderEnu.SAVE_REMARK.getApiName());
request.addApiParameter("biz_type", reqDto.getBiz_type());
request.addApiParameter("remark_id", reqDto.getRemark_id());
request.addApiParameter("content", reqDto.getContent());
IopResponse response = client.execute(request, reqDto.getAccessToken(), Protocol.TOP);
return response.getGopResponseBody();
}
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/CategoryGetPropValueFeatureDTO.java Просмотреть файл

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

import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/27 17:09
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class CategoryGetPropValueFeatureDTO {
private String propertyId;
private String valueId;
private String featureKey;
}

+ 17
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/CategoryQdUploadDTO.java Просмотреть файл

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

import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/27 18:02
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class CategoryQdUploadDTO {
private String upload_meta;
private String file_data;
}

+ 19
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/CategorySuggestionDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/27 17:53
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class CategorySuggestionDTO extends AliexpressAuth {
private String image_url;
private String language;
private String title;
}

+ 40
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/FreightCalculateFreightDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 14:53
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class FreightCalculateFreightDTO extends AliexpressAuth {
//request.addApiParameter("height", "1");
private String height;
//request.addApiParameter("weight", "1");
private String weight;
//request.addApiParameter("pack_add_weight", "1");
private String pack_add_weight;
//request.addApiParameter("count", "1");
private String count;
//request.addApiParameter("freight_template_id", "1000");
private String freight_template_id;
//request.addApiParameter("pack_add_unit", "1");
private String pack_add_unit;
//request.addApiParameter("is_custom_pack_weight", "false");
private String is_custom_pack_weight;
//request.addApiParameter("width", "1");
private String width;
//request.addApiParameter("length", "1");
private String length;
//request.addApiParameter("product_price", "{\"amount\":\"100.01\",\"cent\":\"10000\",\"currency_code\":\"USD\"}");
private String product_price;
//request.addApiParameter("pack_base_unit", "1");
private String pack_base_unit;
//request.addApiParameter("country", "RU");
private String country;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/FreightGetFreightSettingByTemplateQueryDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 14:58
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class FreightGetFreightSettingByTemplateQueryDTO extends AliexpressAuth {
// request.addApiParameter("template_id", "1000");
private String template_id;
}

+ 17
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/FreightListFreightTemplateDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 14:51
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class FreightListFreightTemplateDTO extends AliexpressAuth {

}

+ 20
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderAcceptCancelOrderDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 16:55
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderAcceptCancelOrderDTO extends AliexpressAuth {
//request.addApiParameter("param_order_cancel_request", "{\"buyer_login_id\":\"test1\",\"order_id\":\"2345789067\"}");

private String param_order_cancel_request;

}

+ 20
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderDecryptOrderDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 16:53
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderDecryptOrderDTO extends AliexpressAuth {
// request.addApiParameter("orderId","8152891820014001");
private String orderId;
// request.addApiParameter("oaid","MjAwMDQyMzYw-ssfsvnL3Nv%2B%2B54ABsv%2BaoQ");
private String oaid;
}

+ 22
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderExtendsBuyerAcceptGoodsTimeDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:05
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderExtendsBuyerAcceptGoodsTimeDTO extends AliexpressAuth {
// request.addApiParameter("param0", "123456789");
private String param0;
// request.addApiParameter("param1", "5");
private String param1;


}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindLoanListQueryDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:16
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderFindLoanListQueryDTO extends AliexpressAuth {
//request.addApiParameter("param1", "{\"loan_status\":\"wait_loan\",\"create_date_end\":\"10/09/2013 00:00:00\",\"create_date_start\":\"10/08/2013 00:00:00\",\"page\":\"1\",\"order_id\":\"97191172200623\",\"page_size\":\"20\"}");
private String param1;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderBaseInfoDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:24
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderFindOrderBaseInfoDTO extends AliexpressAuth {
//request.addApiParameter("param1", "{\"buyer_aliid\":\"12345\",\"show_id\":\"12345\",\"seller_operator_aliid\":\"12345\",\"seller_aliid\":\"12345\",\"field_list\":\"12345\",\"ext_info_bit_flag\":\"12345\",\"order_id\":\"123456789\"}");
private String param1;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderByIdDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:10
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderFindOrderByIdDTO extends AliexpressAuth {
//request.addApiParameter("param1", "{\"show_id\":\"1\",\"ext_info_bit_flag\":\"111111\",\"field_list\":\"1\",\"order_id\":\"12345678\"}");
private String param1;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderListSimpleQueryDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:23
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderFindOrderListSimpleQueryDTO extends AliexpressAuth {
//request.addApiParameter("param1", "{\"order_status\":\"PLACE_ORDER_SUCCESS\",\"create_date_end\":\"2015-07-10 00:00:00\",\"create_date_start\":\"2015-07-09 00:00:00\",\"page\":\"1\",\"order_status_list\":[\"PLACE_ORDER_SUCCESS\",\"WAIT_SELLER_SEND_GOODS\"],\"page_size\":\"20\"}");
private String param1;
}

+ 19
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderReceiptInfoDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:26
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderFindOrderReceiptInfoDTO extends AliexpressAuth {
// request.addApiParameter("param1", "{\"buyer_aliid\":\"100000\",\"show_id\":\"1\",\"seller_operator_aliid\":\"20000\",\"seller_aliid\":\"20000\",\"field_list\":\"orderAmount\",\"ext_info_bit_flag\":\"10100\",\"order_id\":\"123456789\"}");
private String param1;

}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFindOrderTradeInfoDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:19
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderFindOrderTradeInfoDTO extends AliexpressAuth {
// request.addApiParameter("param1", "{\"buyer_aliid\":\"12345\",\"show_id\":\"12345\",\"seller_operator_aliid\":\"12345\",\"seller_aliid\":\"12345\",\"field_list\":\"12345\",\"ext_info_bit_flag\":\"12345\",\"order_id\":\"700459681162799\"}");
private String param1;
}

+ 29
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderFulfillSolutionOrderDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 16:32
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderFulfillSolutionOrderDTO extends AliexpressAuth {

// request.addApiParameter("service_name", "EMS");
private String service_name;
// request.addApiParameter("tracking_website", "www.17track.com");
private String tracking_website;
// request.addApiParameter("out_ref", "888877779999");
private String out_ref;
// request.addApiParameter("send_type", "part");
private String send_type;
// request.addApiParameter("description", "memo");
private String description;
// request.addApiParameter("logistics_no", "LA88887777CN");
private String logistics_no;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderGetReceiptInfoDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 16:22
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderGetReceiptInfoDTO extends AliexpressAuth {
// request.addApiParameter("param1", "{\"order_id\":\"123456789\"}");
private String param1;
}

+ 35
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderGetSolutionOrderListDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 16:25
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderGetSolutionOrderListDTO extends AliexpressAuth {

//request.addApiParameter("create_date_end", "2017-10-12 12:12:12");
private String create_date_end;
//request.addApiParameter("create_date_start", "2017-10-12 12:12:12");
private String create_date_start;
//request.addApiParameter("modified_date_start", "2017-10-12 12:12:12");
private String modified_date_start;
//request.addApiParameter("order_status_list", "SELLER_PART_SEND_GOODS");
private String order_status_list;
//request.addApiParameter("buyer_login_id", "test_id");
private String buyer_login_id;
//request.addApiParameter("page_size", "20");
private String page_size;
//request.addApiParameter("modified_date_end", "2017-10-12 12:12:12");
private String modified_date_end;
//request.addApiParameter("current_page", "1");
private String current_page;
//request.addApiParameter("order_status", "SELLER_PART_SEND_GOODS");
private String order_status;
}

+ 16
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderGetTaxationPlatformDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:03
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderGetTaxationPlatformDTO extends AliexpressAuth {
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderOrderListGetDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:20
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderOrderListGetDTO extends AliexpressAuth {
//request.addApiParameter("param_aeop_order_query", "{\"modified_date_start\":\"2017-10-12 12:12:12\",\"modified_date_end\":\"2017-10-12 12:12:12\",\"order_status\":\"SELLER_PART_SEND_GOODS\",\"create_date_end\":\"2017-10-12 12:12:12\",\"create_date_start\":\"2017-10-12 12:12:12\",\"buyer_login_id\":\"test\",\"current_page\":\"1\",\"order_status_list\":[\"SELLER_PART_SEND_GOODS\",\"SELLER_PART_SEND_GOODS\"],\"page_size\":\"20\"}");
private String param_aeop_order_query;
}

+ 20
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderQueryRemarkDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:14
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderQueryRemarkDTO extends AliexpressAuth {
// request.addApiParameter("biz_type", "0");
private String biz_type;
// request.addApiParameter("remark_id", "1234132345");
private String remark_id;
}

+ 20
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderQueryRemarksDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:12
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderQueryRemarksDTO extends AliexpressAuth {
// request.addApiParameter("biz_type", "0");
private String biz_type;
// request.addApiParameter("remark_ids", "123123123,123123124");
private String remark_ids;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderRefuseCancelOrderDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 16:57
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderRefuseCancelOrderDTO extends AliexpressAuth {
//request.addApiParameter("param_order_cancel_request", "{\"buyer_login_id\":\"test\",\"memo\":\"already send googds\",\"order_id\":\"33440956789\"}");
private String param_order_cancel_request;
}

+ 22
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/OrderSaveRemarkDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 17:28
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class OrderSaveRemarkDTO extends AliexpressAuth {
// request.addApiParameter("biz_type", "0");
private String biz_type;
// request.addApiParameter("remark_id", "23432412341234");
private String remark_id;
// request.addApiParameter("content", "hello");
private String content;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankDeleteUnUsePhotoDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 11:04
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class PhotoBankDeleteUnUsePhotoDTO extends AliexpressAuth {
//request.addApiParameter("aeop_delete_image_request","{\"image_repository_id\":\"100403959\"}");
private String aeop_delete_image_request;
}

+ 17
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankGetPhotoBankInfoDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 11:37
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class PhotoBankGetPhotoBankInfoDTO extends AliexpressAuth {

}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankGetWbImageDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 11:38
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class PhotoBankGetWbImageDTO extends AliexpressAuth {
//request.addApiParameter("get_wb_image_request", "{\"original_image_url\":\"https://ae01.alicdn.com/kf/H401119d45e2e4e0ab21a28e3e304b65dT.png\"}");
private String get_wb_image_request;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankListGroupDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 11:32
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class PhotoBankListGroupDTO extends AliexpressAuth {
//request.addApiParameter("group_id", "8401");
private String group_id;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankListImagePaginationDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 11:09
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class PhotoBankListImagePaginationDTO extends AliexpressAuth {
//request.addApiParameter("aeop_image_pagination_request", "{\"group_id\":\"0\",\"current_page\":\"0\",\"location_type\":\"0\",\"page_size\":\"0\"}");
private String aeop_image_pagination_request;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankQueryPhotoBankImageByPathsDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 11:34
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class PhotoBankQueryPhotoBankImageByPathsDTO extends AliexpressAuth {
//request.addApiParameter("paths", "HTB1rxqmHpXXXXXBXFXXq6xXFXXXm.jpg,HBA1rxqmHpXXXXXBXFXXq6xXFXXXm.jpg");
private String paths;
}

+ 20
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankUploadImageDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 10:59
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class PhotoBankUploadImageDTO extends AliexpressAuth {
//request.addApiParameter("file_name", "0");
private String file_name;
//request.addApiParameter("group_id", "0");
private String group_id;
}

+ 17
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/aliexpress/dto/PhotoBankUploadTempImageDTO.java Просмотреть файл

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

import com.ruoyi.web.core.config.AliexpressAuth;
import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/28 10:55
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class PhotoBankUploadTempImageDTO extends AliexpressAuth {

}

+ 16
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/AliexpressAuth.java Просмотреть файл

@@ -0,0 +1,16 @@
package com.ruoyi.web.core.config;

import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/27 17:56
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class AliexpressAuth {
private String accessToken;
}

+ 18
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/AliexpressAuthClientConfig.java Просмотреть файл

@@ -0,0 +1,18 @@
package com.ruoyi.web.core.config;

import lombok.Getter;
import lombok.Setter;

/**
* @author ldj
* @date 2024/2/27 16:57
* @Description: ...
* @Version 1.0
*/
@Getter
@Setter
public class AliexpressAuthClientConfig {
private String url;
private String appKey;
private String appSecret;
}

+ 24
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/core/config/AliexpressBeanConfig.java Просмотреть файл

@@ -0,0 +1,24 @@
package com.ruoyi.web.core.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
* @author ldj
* @date 2024/2/27 16:52
* @Description: ...
* @Version 1.0
*/
@Configuration
public class AliexpressBeanConfig {

@Bean
public AliexpressAuthClientConfig createIopClient() {
AliexpressAuthClientConfig aliexpressAuthClientConfig = new AliexpressAuthClientConfig();
aliexpressAuthClientConfig.setUrl("https://api-sg.aliexpress.com");
aliexpressAuthClientConfig.setAppKey("500516");
aliexpressAuthClientConfig.setAppSecret("5KD1nXaPxADnXUxISAImi1gcgPqbKMN4");
return aliexpressAuthClientConfig;
}

}

+ 60
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressCategoryEnu.java Просмотреть файл

@@ -0,0 +1,60 @@
package com.ruoyi.web.enumerate;

/**
* @author ldj
* @date 2024/2/27 17:32
* @Description: ...
* @Version 1.0
*/

public enum AliexpressCategoryEnu {
//request.setApiName("aliexpress.category.redefining.getPropValueFeature");
//AE getPropValueFeature
GET_PROP_VALUE_FEATURE("aliexpress.category.redefining.getPropValueFeature"),
//request.setApiName("/v2.0/categories/suggestion");
//Get Category Suggestion
SUGGESTION("/v2.0/categories/suggestion"),
//request.setApiName("aliexpress.data.qd.file.upload");
//QD数据文件上传
FILE_UPLOAD("aliexpress.data.qd.file.upload"),
//request.setApiName("aliexpress.solution.sku.attribute.query")
//查询属于特定类别的 sku 属性信息
SKU_ATTRIBUTE_QUERY("aliexpress.solution.sku.attribute.query"),
//request.setApiName("aliexpress.solution.seller.category.tree.query");
//速卖通.解决方案.卖家.类别.树.查询
SELLER_CATEGORY_TREE_QUERY("aliexpress.solution.seller.category.tree.query"),
//request.setApiName("aliexpress.category.redefining.sizemodelsrequiredforpostcat");
//判断叶子类目是否必须尺码表
SIZE_MODELS_REQUIRED_FOR_POST_CAT("aliexpress.category.redefining.sizemodelsrequiredforpostcat"),
//request.setApiName("aliexpress.merchant.oversea.brand.get");
//查询海外商家授权品牌
MERCHANT_OVERSEA_BRAND_GET("aliexpress.merchant.oversea.brand.get"),
//request.setApiName("aliexpress.category.eu.responsible.persons.list");
//获取欧盟负责人列表
EU_RESPONSIBLE_PERSONS_LIST("aliexpress.category.eu.responsible.persons.list"),
//request.setApiName("aliexpress.category.redefining.getchildattributesresultbypostcateidandpath");
//根据发布类目id、父属性路径(可选)获取子属性信息,只返回有权限品牌
GET_CHILD_ATTRIBUTES_RESULT_BY_POST_CATE_ID_AND_PATH("aliexpress.category.redefining.getchildattributesresultbypostcateidandpath"),
//request.setApiName("aliexpress.category.qualifications.list");
//类目资质信息查询
QUALIFICATIONS_LIST("aliexpress.category.qualifications.list"),
//request.setApiName("aliexpress.category.redefining.getpostcategorybyid");
//获取单个类目信息
GET_POST_CATEGORY_BY_ID("aliexpress.category.redefining.getpostcategorybyid"),
//request.setApiName("aliexpress.category.redefining.getchildrenpostcategorybyid");
//获取指定类目下子类目信息
GET_CHILDREN_POST_CATEGORY_BY_ID("aliexpress.category.redefining.getchildrenpostcategorybyid"),
//request.setApiName("aliexpress.category.tree.list");
//获取指定类目下的子类目信息(可校验卖家权限)
TREE_LIST("aliexpress.category.tree.list");

private final String apiName;

AliexpressCategoryEnu(String apiName) {
this.apiName = apiName;
}

public String getApiName() {
return this.apiName;
}
}

+ 30
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressFreightEnu.java Просмотреть файл

@@ -0,0 +1,30 @@
package com.ruoyi.web.enumerate;

/**
* @author ldj
* @date 2024/2/28 14:26
* @Description: ...
* @Version 1.0
*/
public enum AliexpressFreightEnu {

//request.setApiName("aliexpress.freight.redefining.listfreighttemplate");
//用户运费模板列表信息
LIST_FREIGHT_TEMPLATE("aliexpress.freight.redefining.listfreighttemplate"),
//request.setApiName("aliexpress.freight.redefining.calculatefreight");
//计算运费
CALCULATE_FREIGHT("aliexpress.freight.redefining.calculatefreight"),
//request.setApiName("aliexpress.freight.redefining.getfreightsettingbytemplatequery");
//获取运费模板设置信息
GET_FREIGHT_SETTING_BY_TEMPLATE_QUERY("aliexpress.freight.redefining.getfreightsettingbytemplatequery");

private final String apiName;

AliexpressFreightEnu(String apiName) {
this.apiName = apiName;
}

public String getApiName() {
return this.apiName;
}
}

+ 51
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressImageEnu.java Просмотреть файл

@@ -0,0 +1,51 @@
package com.ruoyi.web.enumerate;

/**
* @author ldj
* @date 2024/2/28 10:40
* @Description: ...
* @Version 1.0
*/
public enum AliexpressImageEnu {
//request.setApiName("aliexpress.image.redefining.uploadtempimage");
//上传图片到临时目录
UPLOAD_TEMP_IMAGE("aliexpress.image.redefining.uploadtempimage"),
//request.setApiName("aliexpress.image.redefining.uploadtempimageforsdk");
//上传图片到临时目录
UPLOAD_TEMP_IMAGE_FOR_SDK("aliexpress.image.redefining.uploadtempimageforsdk"),
//request.setApiName("aliexpress.photobank.redefining.uploadimage");
//上传图片到图片银行
UPLOAD_IMAGE("aliexpress.photobank.redefining.uploadimage"),
//request.setApiName("aliexpress.photobank.redefining.uploadimageforsdk");
//上传图片到图片银行
UPLOAD_IMAGE_FOR_SDK("aliexpress.photobank.redefining.uploadimageforsdk"),
//request.setApiName("aliexpress.photobank.redefining.delunusephoto");
//删除未被引用图片
DELETE_UNUSE_PHOTO("aliexpress.photobank.redefining.delunusephoto"),
//request.setApiName("aliexpress.photobank.redefining.listimagepagination");
//图片银行列表分页查询
LIST_IMAGE_PAGINATION("aliexpress.photobank.redefining.listimagepagination"),
//request.setApiName("aliexpress.photobank.redefining.listgroup");
//图片银行分组列表查询
LIST_GROUP("aliexpress.photobank.redefining.listgroup"),
//request.setApiName("aliexpress.photobank.redefining.queryphotobankimagebypaths");
//根据path查询图片信息
QUERY_PHOTO_BANK_IMAGE_BY_PATHS("aliexpress.photobank.redefining.queryphotobankimagebypaths"),
//request.setApiName("aliexpress.photobank.redefining.getphotobankinfo");
//图片银行信息查询
GET_PHOTO_BANK_INFO("aliexpress.photobank.redefining.getphotobankinfo"),
//request.setApiName("aliexpress.photobank.redefining.wbimage.get");
//获取白底图
GET_WB_IMAGE("aliexpress.photobank.redefining.wbimage.get");

private final String apiName;

AliexpressImageEnu(String apiName) {
this.apiName = apiName;
}

public String getApiName() {
return this.apiName;
}

}

+ 11
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressLogisticsEnu.java Просмотреть файл

@@ -0,0 +1,11 @@
package com.ruoyi.web.enumerate;

/**
* @author ldj
* @date 2024/2/28 14:25
* @Description: ...
* @Version 1.0
*/
public enum AliexpressLogisticsEnu {

}

+ 75
- 0
ruoyi-admin/src/main/java/com/ruoyi/web/enumerate/AliexpressOrderEnu.java Просмотреть файл

@@ -0,0 +1,75 @@
package com.ruoyi.web.enumerate;

/**
* @author ldj
* @date 2024/2/28 10:40
* @Description: ...
* @Version 1.0
*/
public enum AliexpressOrderEnu {
//request.setApiName("aliexpress.solution.order.receiptinfo.get");
//获取订单收据信息
GET_SOLUTION_ORDER_RECEIPT_INFO("aliexpress.solution.order.receiptinfo.get"),
//request.setApiName("aliexpress.solution.order.get");
//从速卖通获取订单清单
GET_SOLUTION_ORDER_LIST("aliexpress.solution.order.get"),
//request.setApiName("aliexpress.solution.order.fulfill");
//为卖家配送订单
FULFILL_SOLUTION_ORDER("aliexpress.solution.order.fulfill"),
//request.setApiName("aliexpress.trade.seller.order.decrypt");
//买家订单物流详情解密
DECRYPT_ORDER("aliexpress.trade.seller.order.decrypt"),
//request.setApiName("aliexpress.trade.seller.order.acceptcancel");
//卖家同意取消订单
ACCEPT_CANCEL_ORDER("aliexpress.trade.seller.order.acceptcancel"),
//request.setApiName("aliexpress.trade.seller.order.refusecancel");
//卖家拒绝取消订单
REFUSE_CANCEL_ORDER("aliexpress.trade.seller.order.refusecancel"),
//request.setApiName("aliexpress.taxation.platform.open.get");
//平台固定参数获取
GET_TAXATION_PLATFORM("aliexpress.taxation.platform.open.get"),
//request.setApiName("aliexpress.trade.redefining.extendsbuyeracceptgoodstime");
//延长买家收货时间
EXTENDS_BUYER_ACCEPT_GOODS_TIME("aliexpress.trade.redefining.extendsbuyeracceptgoodstime"),
//request.setApiName("aliexpress.trade.new.redefining.findorderbyid");
//新版交易订单详情查询
FIND_ORDER_BY_ID("aliexpress.trade.new.redefining.findorderbyid"),
//request.setApiName("aliexpress.merchant.redefining.queryremarks");
//查询卖家备注内容
QUERY_REMARKS("aliexpress.merchant.redefining.queryremarks"),
//request.setApiName("aliexpress.merchant.redefining.queryremark");
//查询订单卖家备注
QUERY_REMARK("aliexpress.merchant.redefining.queryremark"),
//request.setApiName("aliexpress.trade.redefining.findloanlistquery");
//查询订单放款信息
FIND_LOAN_LIST_QUERY("aliexpress.trade.redefining.findloanlistquery"),
//request.setApiName("aliexpress.trade.redefining.findordertradeinfo");
//订单交易信息查询
FIND_ORDER_TRADE_INFO("aliexpress.trade.redefining.findordertradeinfo"),
//request.setApiName("aliexpress.trade.seller.orderlist.get");
//订单列表查询
ORDER_LIST_GET("aliexpress.trade.seller.orderlist.get"),
//request.setApiName("aliexpress.trade.redefining.findorderlistsimplequery");
//订单列表简化查询
FIND_ORDER_LIST_SIMPLE_QUERY("aliexpress.trade.redefining.findorderlistsimplequery"),
//request.setApiName("aliexpress.trade.redefining.findorderbaseinfo");
//订单基础信息查询
FIND_ORDER_BASE_INFO("aliexpress.trade.redefining.findorderbaseinfo"),
//request.setApiName("aliexpress.trade.redefining.findorderreceiptinfo");
//订单收货信息查询
FIND_ORDER_RECEIPT_INFO("aliexpress.trade.redefining.findorderreceiptinfo"),
//request.setApiName("aliexpress.merchant.redefining.saveremark");
//记录订单备注信息
SAVE_REMARK("aliexpress.merchant.redefining.saveremark");

private final String apiName;

AliexpressOrderEnu(String apiName) {
this.apiName = apiName;
}

public String getApiName() {
return this.apiName;
}

}

+ 63
- 0
ruoyi-admin/src/test/java/com/ruoyi/ap/ABADemo.java Просмотреть файл

@@ -0,0 +1,63 @@
package com.ruoyi.ap;

import java.util.concurrent.atomic.AtomicStampedReference;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public class ABADemo {
static AtomicStampedReference<Integer> atomicStampedRef =
new AtomicStampedReference<Integer>(100, 0);

private static final Lock lock = new ReentrantLock();

public static void main(String[] args) {

Thread refT1 = new Thread(() -> {
try {
// 获取当前的引用和时间戳
int stamp = atomicStampedRef.getStamp();
Integer refValue = atomicStampedRef.getReference();

// 尝试修改引用和时间戳
boolean success = atomicStampedRef.compareAndSet(refValue, refValue + 100, stamp, stamp + 1);
System.out.println("refT1 Success:" + success);
// 模拟其他操作,使线程T1暂停
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}

// 尝试将值改回原值,此时时间戳已经改变
stamp = atomicStampedRef.getStamp();
success = atomicStampedRef.compareAndSet(refValue + 100, refValue, stamp, stamp + 1);
System.out.println("refT1 Success:" + success);

} catch (Exception e) {
e.printStackTrace();
}
});

Thread refT2 = new Thread(() -> {
try {
int stamp = atomicStampedRef.getStamp();
Integer refValue = atomicStampedRef.getReference();

// 等待线程T1完成第一次修改
Thread.sleep(500);

// 尝试修改引用和时间戳
boolean success = atomicStampedRef.compareAndSet(refValue, refValue + 200, stamp, stamp + 1);
System.out.println("refT2 Success:" + success);

} catch (InterruptedException e) {
e.printStackTrace();
}
});

refT1.start();
refT2.start();

}
}


+ 49
- 0
ruoyi-admin/src/test/java/com/ruoyi/ap/ProducerConsumerExample.java Просмотреть файл

@@ -0,0 +1,49 @@
package com.ruoyi.ap;

import java.util.LinkedList;
import java.util.Queue;

public class ProducerConsumerExample {
public static void main(String[] args) {
Queue<Integer> queue = new LinkedList<>();
int maxSize = 10;

Thread producer = new Thread(() -> {
for (int i = 0; i < 50; i++) {
synchronized (queue) {
while (queue.size() == maxSize) {
try {
System.out.println("Queue is full, Producer thread waiting for Consumer to take something from queue");
queue.wait();
} catch (Exception ex) {
ex.printStackTrace();
}
}
System.out.println("Producing value : " + i);
queue.add(i);
queue.notifyAll();
}
}
});

Thread consumer = new Thread(() -> {
while (true) {
synchronized (queue) {
while (queue.isEmpty()) {
try {
System.out.println("Queue is empty, Consumer thread is waiting for Producer to put something in queue");
queue.wait();
} catch (Exception ex) {
ex.printStackTrace();
}
}
System.out.println("Consuming value : " + queue.remove());
queue.notifyAll();
}
}
});

producer.start();
consumer.start();
}
}

+ 59
- 0
ruoyi-admin/src/test/java/com/ruoyi/ap/ProducerConsumerModel.java Просмотреть файл

@@ -0,0 +1,59 @@
package com.ruoyi.ap;

import java.util.LinkedList;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

public class ProducerConsumerModel {
// 创建一个LinkedList队列来存储生产的元素
private final LinkedList<Integer> queue = new LinkedList<>();
// 设置队列的最大容量
private final int CAPACITY = 10;
// 创建一个可重入锁
private final ReentrantLock lock = new ReentrantLock();
// 创建两个条件,一个用于队列未满,一个用于队列非空
private final Condition notFull = lock.newCondition();
private final Condition notEmpty = lock.newCondition();

// 生产者方法
public void produce(int value) throws InterruptedException {
// 获取锁
lock.lock();
try {
// 如果队列满了,就让生产者线程等待
while (queue.size() == CAPACITY) {
notFull.await();
}
// 向队列中添加元素
queue.add(value);
System.out.println("Produced " + value);
// 生产完毕,通知所有正在等待队列非空的消费者线程
notEmpty.signalAll();
} finally {
// 最后,无论如何都要释放锁
lock.unlock();
}
}

// 消费者方法
public void consume() throws InterruptedException {
// 获取锁
lock.lock();
try {
// 如果队列空了,就让消费者线程等待
while (queue.isEmpty()) {
notEmpty.await();
}
// 从队列中取出元素
int value = queue.removeFirst();
System.out.println("Consumed " + value);
// 消费完毕,通知所有正在等待队列未满的生产者线程
notFull.signalAll();
} finally {
// 最后,无论如何都要释放锁
lock.unlock();
}
}
}



+ 48
- 0
ruoyi-admin/src/test/java/com/ruoyi/ap/ProducerConsumerTest.java Просмотреть файл

@@ -0,0 +1,48 @@
package com.ruoyi.ap;

/**
* @author ldj
* @date 2024/2/27 10:30
* @Description: ...
* @Version 1.0
*/
public class ProducerConsumerTest {
public static void main(String[] args) throws InterruptedException {
// 创建生产者消费者模型对象
ProducerConsumerModel model = new ProducerConsumerModel();

// 创建生产者线程
Thread producer = new Thread(() -> {
try {
for (int i = 0; i < 100; i++) {
model.produce(i);
// 模拟生产时间
Thread.sleep(100);
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
});

// 创建消费者线程
Thread consumer = new Thread(() -> {
try {
while (true) {
model.consume();
// 模拟消费时间
Thread.sleep(150);
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
});

// 启动生产者和消费者线程
producer.start();
consumer.start();

// 主线程等待生产者和消费者线程结束
producer.join();
consumer.join();
}
}

+ 36
- 0
ruoyi-admin/src/test/java/com/ruoyi/ap/TestStream.java Просмотреть файл

@@ -0,0 +1,36 @@
package com.ruoyi.ap;

import java.util.Arrays;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ForkJoinPool;
import java.util.stream.Stream;

/**
* @author ldj
* @date 2024/2/27 14:34
* @Description: ...
* @Version 1.0
*/
public class TestStream {
public static void main(String[] args) {
List<String> list = Arrays.asList("Apple", "Banana", "Orange", "Pear", "Peach");
// 获取并行流
Stream<String> parallelStream = list.parallelStream();
// 使用并行流进行操作
parallelStream.forEach(System.out::println);

// List<String> list = Arrays.asList("Apple", "Banana", "Orange", "Pear", "Peach");
//
// ForkJoinPool customThreadPool = new ForkJoinPool(1);
// try {
// customThreadPool.submit(() ->
// list.parallelStream().forEach(System.out::println)
// ).get(); // get() will wait for the task to finish
// } catch (InterruptedException | ExecutionException e) {
// e.printStackTrace();
// } finally {
// customThreadPool.shutdown(); // don't forget to shutdown the pool
// }
}
}

Загрузка…
Отмена
Сохранить