diff --git a/src/main/java/com/sczx/sync/dto/StoreInfoDTO.java b/src/main/java/com/sczx/sync/dto/StoreInfoDTO.java new file mode 100644 index 0000000..b015c58 --- /dev/null +++ b/src/main/java/com/sczx/sync/dto/StoreInfoDTO.java @@ -0,0 +1,50 @@ +package com.sczx.sync.dto; + + +import lombok.Data; + +@Data +public class StoreInfoDTO { + private String name; + + + private String contact_name; + + /** + * 联系电话 + */ + private String phone; + + /** + * 省份 + */ + private String province; + + /** + * 城市 + */ + private String city; + + /** + * 区域 + */ + private String area; + + /** + * 详细地址 + */ + private String address; + + /** + * 门店图片 + */ + private String image; + + + private Double latitude; + + private Double longitude; + + private Long store_id; + private String is_delete; +} diff --git a/src/main/java/com/sczx/sync/service/impl/SendDataServiceImpl.java b/src/main/java/com/sczx/sync/service/impl/SendDataServiceImpl.java index 55596b5..057435a 100644 --- a/src/main/java/com/sczx/sync/service/impl/SendDataServiceImpl.java +++ b/src/main/java/com/sczx/sync/service/impl/SendDataServiceImpl.java @@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.sczx.sync.dto.DataRceiveReq; +import com.sczx.sync.dto.StoreInfoDTO; import com.sczx.sync.entity.UserInfo; import com.sczx.sync.mapper.*; import com.sczx.sync.po.*; @@ -228,8 +229,22 @@ public class SendDataServiceImpl implements SendDataService { storeInfo.setStore_id(id); + StoreInfoDTO storeInfoDTO = new StoreInfoDTO(); + storeInfoDTO.setName(storeInfo.getName()); + storeInfoDTO.setContact_name(storeInfo.getContact_name()); + storeInfoDTO.setPhone(storeInfo.getPhone()); + storeInfoDTO.setProvince(storeInfo.getProvince()); + storeInfoDTO.setCity(storeInfo.getCity()); + storeInfoDTO.setArea(storeInfo.getArea()); + storeInfoDTO.setAddress(storeInfo.getAddress()); + storeInfoDTO.setImage(storeInfo.getImage()); + storeInfoDTO.setLatitude(storeInfo.getLatitude()); + storeInfoDTO.setLongitude(storeInfo.getLongitude()); + storeInfoDTO.setIs_delete(storeInfo.getIs_delete()); + storeInfoDTO.setStore_id(storeInfo.getStore_id()); + SyncRequest syncRequest = new SyncRequest(); - syncRequest.setData(storeInfo); + syncRequest.setData(storeInfoDTO); if(saveRecord(syncRequest,URL+"/storeinfo",id,"storeinfo")){ map.put("msg","发送成功"); map.put("code","200");