Browse Source

//update test

release_toaliyun_real
xhxu 4 years ago
parent
commit
58dbadd303
4 changed files with 24 additions and 16 deletions
  1. +2
    -1
      mallinkService/src/main/java/com/iformall/douyin/web/json/TtSpuGetAdapter.java
  2. +2
    -1
      mallinkService/src/main/java/com/iformall/douyin/web/json/TtSpuStatusSyncAdapter.java
  3. +9
    -6
      mallinkService/src/main/java/com/iformall/douyin/web/json/TtSpuSyncAdapter.java
  4. +11
    -8
      mallinkService/src/main/java/com/iformall/douyin/web/json/TtSupplierSyncAdapter.java

+ 2
- 1
mallinkService/src/main/java/com/iformall/douyin/web/json/TtSpuGetAdapter.java View File

@@ -34,7 +34,8 @@ public class TtSpuGetAdapter implements JsonSerializer<TtSpuGet>, JsonDeserializ
json.addProperty("need_spu_draft", spuGet.isNeedSpuDraft()); json.addProperty("need_spu_draft", spuGet.isNeedSpuDraft());
json.addProperty("spu_draft_count", spuGet.getSpuDraftcount()); json.addProperty("spu_draft_count", spuGet.getSpuDraftcount());
if(spuGet.getSupplierIdsForFilterReason() != null && !spuGet.getSupplierIdsForFilterReason().isEmpty()){ if(spuGet.getSupplierIdsForFilterReason() != null && !spuGet.getSupplierIdsForFilterReason().isEmpty()){
json.addProperty("supplier_ids_for_filter_reason", new JSONArray(Collections.singletonList(spuGet.getSupplierIdsForFilterReason())).toJSONString());
JsonArray siffrJsonArray = new Gson().toJsonTree(spuGet.getSupplierIdsForFilterReason()).getAsJsonArray();
json.add("supplier_ids_for_filter_reason",siffrJsonArray);
} }
return json; return json;
} }


+ 2
- 1
mallinkService/src/main/java/com/iformall/douyin/web/json/TtSpuStatusSyncAdapter.java View File

@@ -31,7 +31,8 @@ public class TtSpuStatusSyncAdapter implements JsonSerializer<TtSpuStatusSync>,
protected JsonObject convertToJson(TtSpuStatusSync spuSync) { protected JsonObject convertToJson(TtSpuStatusSync spuSync) {
JsonObject json = new JsonObject(); JsonObject json = new JsonObject();
if(spuSync.getSpuExtIdList() != null && !spuSync.getSpuExtIdList().isEmpty()){ if(spuSync.getSpuExtIdList() != null && !spuSync.getSpuExtIdList().isEmpty()){
json.addProperty("spu_ext_id_list", new JSONArray(Collections.singletonList(spuSync.getSpuExtIdList())).toJSONString());
JsonArray seilJsonArray = new Gson().toJsonTree(spuSync.getSpuExtIdList()).getAsJsonArray();
json.add("spu_ext_id_list",seilJsonArray);
} }
json.addProperty("status", spuSync.getStatus()); json.addProperty("status", spuSync.getStatus());
return json; return json;


+ 9
- 6
mallinkService/src/main/java/com/iformall/douyin/web/json/TtSpuSyncAdapter.java View File

@@ -32,29 +32,32 @@ public class TtSpuSyncAdapter implements JsonSerializer<TtSpuSync>, JsonDeserial
protected JsonObject convertToJson(TtSpuSync spuSync) { protected JsonObject convertToJson(TtSpuSync spuSync) {
JsonObject json = new JsonObject(); JsonObject json = new JsonObject();
if(spuSync.getEntryInfo() != null){ if(spuSync.getEntryInfo() != null){
json.addProperty("entry_info", spuSync.getEntryInfo().toString());
json.add("entry_info", spuSync.getEntryInfo());
} }
if(spuSync.getFrontCategoryTag() != null && !spuSync.getFrontCategoryTag().isEmpty()){ if(spuSync.getFrontCategoryTag() != null && !spuSync.getFrontCategoryTag().isEmpty()){
json.addProperty("front_category_tag", new JSONArray(Collections.singletonList(spuSync.getFrontCategoryTag())).toJSONString());
JsonArray fctJsonArray = new Gson().toJsonTree(spuSync.getFrontCategoryTag()).getAsJsonArray();
json.add("front_category_tag",fctJsonArray);
} }
json.addProperty("recommend_word", spuSync.getRecommendWord()); json.addProperty("recommend_word", spuSync.getRecommendWord());
json.addProperty("sort_weight", spuSync.getSortWeight()); json.addProperty("sort_weight", spuSync.getSortWeight());
if(spuSync.getSupplierExtIdList() != null && !spuSync.getSupplierExtIdList().isEmpty()){ if(spuSync.getSupplierExtIdList() != null && !spuSync.getSupplierExtIdList().isEmpty()){
json.addProperty("supplier_ext_id_list", new JSONArray(Collections.singletonList(spuSync.getSupplierExtIdList())).toJSONString());
JsonArray seilJsonArray = new Gson().toJsonTree(spuSync.getSupplierExtIdList()).getAsJsonArray();
json.add("supplier_ext_id_list",seilJsonArray);
} }
json.addProperty("price", spuSync.getPrice()); json.addProperty("price", spuSync.getPrice());
json.addProperty("spu_ext_id", spuSync.getSpuExtId()); json.addProperty("spu_ext_id", spuSync.getSpuExtId());
if(spuSync.getImageList() != null && !spuSync.getImageList().isEmpty()){ if(spuSync.getImageList() != null && !spuSync.getImageList().isEmpty()){
json.addProperty("image_list", new JSONArray(Collections.singletonList(spuSync.getImageList())).toJSONString());
JsonArray imgJsonArray = new Gson().toJsonTree(spuSync.getImageList()).getAsJsonArray();
json.add("supplier_ext_id_list",imgJsonArray);
} }
json.addProperty("mp_settle_type", spuSync.getMpSettletype()); json.addProperty("mp_settle_type", spuSync.getMpSettletype());
json.addProperty("origin_price", spuSync.getOriginPrice()); json.addProperty("origin_price", spuSync.getOriginPrice());
json.addProperty("take_rate", spuSync.getTakeRate()); json.addProperty("take_rate", spuSync.getTakeRate());
if(spuSync.getAttribute() != null){ if(spuSync.getAttribute() != null){
json.addProperty("attribute", spuSync.getAttribute().toString());
json.add("attribute", spuSync.getAttribute());
} }
if(spuSync.getHighlights() != null){ if(spuSync.getHighlights() != null){
json.addProperty("highlights", spuSync.getHighlights().toString());
json.add("highlights", spuSync.getHighlights());
} }
json.addProperty("name", spuSync.getName()); json.addProperty("name", spuSync.getName());
json.addProperty("order_depends_on_date", spuSync.getOrderDependsOnDate()); json.addProperty("order_depends_on_date", spuSync.getOrderDependsOnDate());


+ 11
- 8
mallinkService/src/main/java/com/iformall/douyin/web/json/TtSupplierSyncAdapter.java View File

@@ -34,15 +34,17 @@ public class TtSupplierSyncAdapter implements JsonSerializer<TtSupplierSync>, Js
json.addProperty("contact_phone", supplierSync.getContactPhone()); json.addProperty("contact_phone", supplierSync.getContactPhone());
json.addProperty("contact_tel", supplierSync.getContactTel()); json.addProperty("contact_tel", supplierSync.getContactTel());
if(supplierSync.getImages() != null && !supplierSync.getImages().isEmpty()){ if(supplierSync.getImages() != null && !supplierSync.getImages().isEmpty()){
json.addProperty("images", new JSONArray(Collections.singletonList(supplierSync.getImages())).toJSONString());
JsonArray imgJsonArray = new Gson().toJsonTree(supplierSync.getImages()).getAsJsonArray();
json.add("images",imgJsonArray);
} }
json.addProperty("merchant_uid", supplierSync.getMerchantUid()); json.addProperty("merchant_uid", supplierSync.getMerchantUid());
if(supplierSync.getServiceProvider() != null){ if(supplierSync.getServiceProvider() != null){
json.addProperty("service_provider", supplierSync.getServiceProvider().toString());
json.add("service_provider",supplierSync.getServiceProvider());
} }
json.addProperty("supplier_ext_id", supplierSync.getSupplierExtId()); json.addProperty("supplier_ext_id", supplierSync.getSupplierExtId());
if(supplierSync.getTags() != null && !supplierSync.getTags().isEmpty()){ if(supplierSync.getTags() != null && !supplierSync.getTags().isEmpty()){
json.addProperty("tags", new JSONArray(Collections.singletonList(supplierSync.getTags())).toJSONString());
JsonArray tagJsonArray = new Gson().toJsonTree(supplierSync.getTags()).getAsJsonArray();
json.add("tags",tagJsonArray);
} }
json.addProperty("latitude", supplierSync.getLatitude()); json.addProperty("latitude", supplierSync.getLatitude());
json.addProperty("status", supplierSync.getStatus()); json.addProperty("status", supplierSync.getStatus());
@@ -51,22 +53,23 @@ public class TtSupplierSyncAdapter implements JsonSerializer<TtSupplierSync>, Js
json.addProperty("address", supplierSync.getAddress()); json.addProperty("address", supplierSync.getAddress());
json.addProperty("avg_cost", supplierSync.getAvgCost()); json.addProperty("avg_cost", supplierSync.getAvgCost());
if(supplierSync.getCustomerInfo() != null ){ if(supplierSync.getCustomerInfo() != null ){
json.addProperty("customer_info", supplierSync.getCustomerInfo().toString());
json.add("customer_info",supplierSync.getCustomerInfo());
} }
json.addProperty("description", supplierSync.getDescription()); json.addProperty("description", supplierSync.getDescription());
json.addProperty("name", supplierSync.getName()); json.addProperty("name", supplierSync.getName());
if(supplierSync.getRecommends() != null){ if(supplierSync.getRecommends() != null){
json.addProperty("recommends", supplierSync.getRecommends().toString());
json.add("recommends", supplierSync.getRecommends());
} }
if(supplierSync.getServices() != null){ if(supplierSync.getServices() != null){
json.addProperty("services", supplierSync.getServices().toString());
json.add("services",supplierSync.getServices());
} }
if(supplierSync.getAttributes() != null){ if(supplierSync.getAttributes() != null){
json.addProperty("attributes", supplierSync.getAttributes().toString());
json.add("attributes",supplierSync.getAttributes());
} }
json.addProperty("longitude", supplierSync.getLongitude()); json.addProperty("longitude", supplierSync.getLongitude());
if(supplierSync.getOpenTime() != null && !supplierSync.getOpenTime().isEmpty()){ if(supplierSync.getOpenTime() != null && !supplierSync.getOpenTime().isEmpty()){
json.addProperty("open_time", new JSONArray(Collections.singletonList(supplierSync.getOpenTime())).toJSONString());
JsonArray otJsonArray = new Gson().toJsonTree(supplierSync.getOpenTime()).getAsJsonArray();
json.add("open_time",otJsonArray);
} }
json.addProperty("poi_id", supplierSync.getPoiId()); json.addProperty("poi_id", supplierSync.getPoiId());
json.addProperty("type", supplierSync.getType()); json.addProperty("type", supplierSync.getType());


Loading…
Cancel
Save