Просмотр исходного кода

//update test

release_toaliyun_real
xhxu 4 лет назад
Родитель
Сommit
63a5df6bce
3 измененных файлов: 10 добавлений и 10 удалений
  1. +6
    -6
      mallinkService/src/main/java/com/iformall/douyin/web/api/impl/TtWebProductServiceImpl.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/douyin/web/api/impl/TtWebServiceImpl.java
  3. +3
    -3
      mallinkService/src/main/java/com/iformall/douyin/web/api/impl/TtWebShopMatchServiceImpl.java

+ 6
- 6
mallinkService/src/main/java/com/iformall/douyin/web/api/impl/TtWebProductServiceImpl.java Просмотреть файл

@@ -22,7 +22,7 @@ public class TtWebProductServiceImpl implements TtWebProductService {
@Override
public String supplierSync(TtSupplierSync supplierSync) throws WxErrorException {
final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.POST_SUPPLIER_SYNC;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.POST_SUPPLIER_SYNC;
String result = this.service.execute(executor, apiUrl, supplierSync.toJson());
JSONObject jsonObject = JSONObject.parseObject(result);
return jsonObject.getString("supplier_id");
@@ -31,7 +31,7 @@ public class TtWebProductServiceImpl implements TtWebProductService {
@Override
public TtSupplierSyncQuery supplierQuery(String supplierExtId) throws WxErrorException {
final TtWebGetRequestExecutor executor = new TtWebGetRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.GET_SUPPLIER_QUERY;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.GET_SUPPLIER_QUERY;
JsonObject json = new JsonObject();
json.addProperty("supplier_ext_id",supplierExtId);
String result = this.service.execute(executor, apiUrl, json.toString());
@@ -41,7 +41,7 @@ public class TtWebProductServiceImpl implements TtWebProductService {
@Override
public String spuSync(TtSpuSync spuSync) throws WxErrorException {
final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.POST_SPU_SYNC;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.POST_SPU_SYNC;
String result = this.service.execute(executor, apiUrl, spuSync.toJson());
JSONObject jsonObject = JSONObject.parseObject(result);
return jsonObject.getString("spu_id");
@@ -50,7 +50,7 @@ public class TtWebProductServiceImpl implements TtWebProductService {
@Override
public TtSpuStatusSync spuStatusSync(TtSpuStatusSync spuStatusSync) throws WxErrorException {
final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.POST_SPU_STATUS_SYNC;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.POST_SPU_STATUS_SYNC;
String result = this.service.execute(executor, apiUrl, spuStatusSync.toJson());
TtSpuStatusSync ttSpuStatusSync = TtSpuStatusSync.fromJson(result);
ttSpuStatusSync.setStatus(spuStatusSync.getStatus());
@@ -60,7 +60,7 @@ public class TtWebProductServiceImpl implements TtWebProductService {
@Override
public TtSpuGetResult spuGet(TtSpuGet spuGet) throws WxErrorException {
final TtWebGetRequestExecutor executor = new TtWebGetRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.GET_SPU_GET;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.GET_SPU_GET;
String result = this.service.execute(executor, apiUrl, spuGet.toString());
return TtSpuGetResult.fromJson(result);
}
@@ -68,7 +68,7 @@ public class TtWebProductServiceImpl implements TtWebProductService {
@Override
public boolean spuStockUpdate(TtSpuStockSync spuStockSync) throws WxErrorException {
final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.POST_SPU_STOCK_UPDATE;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.POST_SPU_STOCK_UPDATE;
String result = this.service.execute(executor, apiUrl, spuStockSync.toJson());
JSONObject jsonObject = JSONObject.parseObject(result);
String spuExtId = jsonObject.getString("spu_ext_id");


+ 1
- 1
mallinkService/src/main/java/com/iformall/douyin/web/api/impl/TtWebServiceImpl.java Просмотреть файл

@@ -107,7 +107,7 @@ public class TtWebServiceImpl implements TtWebService, RequestHttp<CloseableHttp
params.put("client_secret", this.getTtWebConfig().getSecret());
params.put("grant_type", "client_credential");
try {
String apiUrl = this.getTtWebConfig().getApiBegin() + this.POST_ACCESS_TOKEN_URL;
String apiUrl = this.getTtWebConfig().getApiBegin().getPrefix() + this.POST_ACCESS_TOKEN_URL;
HttpPost httpPost = new HttpPost(apiUrl);
if (this.getRequestHttpProxy() != null) {
RequestConfig config = RequestConfig.custom().setProxy(this.getRequestHttpProxy()).build();


+ 3
- 3
mallinkService/src/main/java/com/iformall/douyin/web/api/impl/TtWebShopMatchServiceImpl.java Просмотреть файл

@@ -21,7 +21,7 @@ public class TtWebShopMatchServiceImpl implements TtWebShopMatchService {
@Override
public String supplierMatch(TtSupplierMatchList supplierMatchList) throws WxErrorException {
final TtWebPostRequestExecutor executor = new TtWebPostRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.POST_SUPPLIER_MATCH;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.POST_SUPPLIER_MATCH;
String result = this.service.execute(executor, apiUrl, supplierMatchList.toJson());
TtSupplierMatch match = TtSupplierMatch.fromJson(result);
if(match.getIsSuccess() != null && match.getIsSuccess().intValue() == 1){
@@ -33,7 +33,7 @@ public class TtWebShopMatchServiceImpl implements TtWebShopMatchService {
@Override
public TtSupplierMatchList supplierQueryTask(String supplierTaskIds) throws WxErrorException {
final TtWebGetRequestExecutor executor = new TtWebGetRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.GET_SUPPLIER_MATCH_QUERY;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.GET_SUPPLIER_MATCH_QUERY;
JsonObject json = new JsonObject();
json.addProperty("supplier_task_ids",supplierTaskIds);
String result = this.service.execute(executor, apiUrl, json.toString());
@@ -43,7 +43,7 @@ public class TtWebShopMatchServiceImpl implements TtWebShopMatchService {
@Override
public TtSupplierMatchList supplierQuerySupplier(String supplierExtId) throws WxErrorException {
final TtWebGetRequestExecutor executor = new TtWebGetRequestExecutor(this.service.getRequestHttp());
String apiUrl = this.service.getTtWebConfig().getApiBegin() + this.GET_SUPPLIER_MATCH_STATUS;
String apiUrl = this.service.getTtWebConfig().getApiBegin().getPrefix() + this.GET_SUPPLIER_MATCH_STATUS;
JsonObject json = new JsonObject();
json.addProperty("supplier_ext_id",supplierExtId);
String result = this.service.execute(executor, apiUrl, json.toString());


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