Veronique 2 лет назад
Родитель
Сommit
f247473fc2

+ 40 - 0
ddCommon/src/main/java/com/dderp/common/datas/business/PlatformType.java

@@ -0,0 +1,40 @@
+package com.dderp.common.datas.business;
+
+/**
+ * 平台类别
+ */
+@SuppressWarnings("unused")
+public enum PlatformType {
+    order("订单平台", 0),
+    delivery("配送平台", 1);
+    private String name;
+    private int value;
+
+    PlatformType(String name, int value) {
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public int getValue() {
+        return value;
+    }
+
+    public void setValue(int value) {
+        this.value = value;
+    }
+
+    public static String getName(int value) {
+        for (PlatformType p : PlatformType.values()) {
+            if (p.getValue() == value) return p.getName();
+        }
+        return null;
+    }
+}

+ 171 - 2
ddCommon/src/main/java/com/dderp/common/entity/store/StoreInfo.java

@@ -2,7 +2,7 @@ package com.dderp.common.entity.store;
 
 import com.dderp.common.entity.base.BaseEntity;
 import com.dderp.common.entity.geo.GeoPoiLocation;
-import com.dderp.common.entity.site.ERPTokenUser;
+import com.dderp.common.entity.system.LoginUser;
 import com.sweetfish.util.Comment;
 
 import java.util.ArrayList;
@@ -26,6 +26,9 @@ public class StoreInfo extends BaseEntity {
     @Comment("门店类型--此处取字典值即可")
     private long idStoreType;
 
+    @Comment("配送费结算方式 0本店自主结算/1加盟品牌方结算")
+    private int deliverSettleKind;
+
     @Comment("门店编号-输入")
     private String storeCodeInput;
 
@@ -66,10 +69,176 @@ public class StoreInfo extends BaseEntity {
     private StoreInvoiceInfo invoiceInfo;
 
     @Comment("员工")
-    private List<ERPTokenUser> employeeList = new ArrayList<>();
+    private List<LoginUser> employeeList = new ArrayList<>();
 
     @Comment("门店已开通的平台,包含订单平台和配送平台")
     private List<StorePlatform> platformList = new ArrayList<>();
 
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public String getStoreName() {
+        return storeName;
+    }
+
+    public void setStoreName(String storeName) {
+        this.storeName = storeName;
+    }
+
+    public long getIdBrand() {
+        return idBrand;
+    }
+
+    public void setIdBrand(long idBrand) {
+        this.idBrand = idBrand;
+    }
+
+    public String getBrandName() {
+        return brandName;
+    }
+
+    public void setBrandName(String brandName) {
+        this.brandName = brandName;
+    }
+
+    public long getIdStoreType() {
+        return idStoreType;
+    }
+
+    public void setIdStoreType(long idStoreType) {
+        this.idStoreType = idStoreType;
+    }
+
+    public int getDeliverSettleKind() {
+        return deliverSettleKind;
+    }
+
+    public void setDeliverSettleKind(int deliverSettleKind) {
+        this.deliverSettleKind = deliverSettleKind;
+    }
+
+    public String getStoreCodeInput() {
+        return storeCodeInput;
+    }
+
+    public void setStoreCodeInput(String storeCodeInput) {
+        this.storeCodeInput = storeCodeInput;
+    }
+
+    public String getStoreProvince() {
+        return storeProvince;
+    }
+
+    public void setStoreProvince(String storeProvince) {
+        this.storeProvince = storeProvince;
+    }
+
+    public String getStoreCity() {
+        return storeCity;
+    }
+
+    public void setStoreCity(String storeCity) {
+        this.storeCity = storeCity;
+    }
+
+    public String getStoreDistrict() {
+        return storeDistrict;
+    }
+
+    public void setStoreDistrict(String storeDistrict) {
+        this.storeDistrict = storeDistrict;
+    }
+
+    public String getStoreAddress() {
+        return storeAddress;
+    }
+
+    public void setStoreAddress(String storeAddress) {
+        this.storeAddress = storeAddress;
+    }
+
+    public GeoPoiLocation getLocation() {
+        return location;
+    }
+
+    public void setLocation(GeoPoiLocation location) {
+        this.location = location;
+    }
+
+    public String getContractPhone() {
+        return contractPhone;
+    }
+
+    public void setContractPhone(String contractPhone) {
+        this.contractPhone = contractPhone;
+    }
+
+    public long getStoreBossId() {
+        return storeBossId;
+    }
+
+    public void setStoreBossId(long storeBossId) {
+        this.storeBossId = storeBossId;
+    }
+
+    public String getCompanyLicenseNo() {
+        return companyLicenseNo;
+    }
+
+    public void setCompanyLicenseNo(String companyLicenseNo) {
+        this.companyLicenseNo = companyLicenseNo;
+    }
+
+    public String getCompanyLicensePicUrl() {
+        return companyLicensePicUrl;
+    }
+
+    public void setCompanyLicensePicUrl(String companyLicensePicUrl) {
+        this.companyLicensePicUrl = companyLicensePicUrl;
+    }
+
+    public String getLegalPersonIdNo() {
+        return legalPersonIdNo;
+    }
+
+    public void setLegalPersonIdNo(String legalPersonIdNo) {
+        this.legalPersonIdNo = legalPersonIdNo;
+    }
+
+    public String getLegalPersonName() {
+        return legalPersonName;
+    }
+
+    public void setLegalPersonName(String legalPersonName) {
+        this.legalPersonName = legalPersonName;
+    }
+
+    public StoreInvoiceInfo getInvoiceInfo() {
+        return invoiceInfo;
+    }
+
+    public void setInvoiceInfo(StoreInvoiceInfo invoiceInfo) {
+        this.invoiceInfo = invoiceInfo;
+    }
+
+    public List<LoginUser> getEmployeeList() {
+        return employeeList;
+    }
+
+    public void setEmployeeList(List<LoginUser> employeeList) {
+        this.employeeList = employeeList;
+    }
+
+    public List<StorePlatform> getPlatformList() {
+        return platformList;
+    }
 
+    public void setPlatformList(List<StorePlatform> platformList) {
+        this.platformList = platformList;
+    }
 }

+ 60 - 1
ddCommon/src/main/java/com/dderp/common/entity/store/StorePlatform.java

@@ -12,6 +12,9 @@ import java.util.List;
 public class StorePlatform extends BaseEntity {
     private long id;
 
+    @Comment("门店id")
+    private long idStore;
+
     @Comment("平台档案id")
     private long idPlatformInfo;
 
@@ -21,9 +24,65 @@ public class StorePlatform extends BaseEntity {
     @Comment("平台类别 0订单平台/1配送平台")
     private int platformType;
 
-    @Comment("是否开通")
+    @Comment("是否开通 0未开通/1已开通")
     private int enableStatue;
 
     @Comment("已填写的开通各平台需求的信息")
     private List<StorePlatformRequire> requireList = new ArrayList<>();
+
+    public long getId() {
+        return id;
+    }
+
+    public void setId(long id) {
+        this.id = id;
+    }
+
+    public long getIdStore() {
+        return idStore;
+    }
+
+    public void setIdStore(long idStore) {
+        this.idStore = idStore;
+    }
+
+    public long getIdPlatformInfo() {
+        return idPlatformInfo;
+    }
+
+    public void setIdPlatformInfo(long idPlatformInfo) {
+        this.idPlatformInfo = idPlatformInfo;
+    }
+
+    public String getPlatformName() {
+        return platformName;
+    }
+
+    public void setPlatformName(String platformName) {
+        this.platformName = platformName;
+    }
+
+    public int getPlatformType() {
+        return platformType;
+    }
+
+    public void setPlatformType(int platformType) {
+        this.platformType = platformType;
+    }
+
+    public int getEnableStatue() {
+        return enableStatue;
+    }
+
+    public void setEnableStatue(int enableStatue) {
+        this.enableStatue = enableStatue;
+    }
+
+    public List<StorePlatformRequire> getRequireList() {
+        return requireList;
+    }
+
+    public void setRequireList(List<StorePlatformRequire> requireList) {
+        this.requireList = requireList;
+    }
 }

+ 6 - 0
ddCommon/src/main/java/com/dderp/common/entity/store/StorePlatformRequire.java

@@ -9,6 +9,12 @@ import com.sweetfish.util.Comment;
 public class StorePlatformRequire extends BaseEntity {
     private long id;
 
+    @Comment("门店id")
+    private long idStore;
+
+    @Comment("关联的门店已开通平台id")
+    private long idStorePlatform;
+
     @Comment("平台接入需求档案id")
     private long idPlatformRequire;
 

+ 31 - 0
ddCommon/src/main/java/com/dderp/common/entity/store/ViewStoreInfo.java

@@ -0,0 +1,31 @@
+package com.dderp.common.entity.store;
+
+import com.dderp.common.datas.business.PlatformType;
+import com.dderp.common.entity.base.BaseEntity;
+import com.sweetfish.util.Comment;
+
+import java.util.Map;
+
+public class ViewStoreInfo extends BaseEntity {
+    @Comment("门店基础信息")
+    private StoreInfo storeInfo;
+
+    @Comment("门店开通的订单平台")
+    private Map<String, Object> orderPlatforms;
+
+    @Comment("门店开通的配送平台")
+    private Map<String, Object> deliveryPlatforms;
+
+    public ViewStoreInfo(StoreInfo storeInfo) {
+        this.storeInfo = storeInfo;
+        storeInfo.getPlatformList().forEach(storePlatform -> {
+            String status = "未开通";
+            if (storePlatform.getEnableStatue() == 1) status = "已开通";
+            if (storePlatform.getPlatformType() == PlatformType.order.getValue()) {
+                this.orderPlatforms.put(storePlatform.getPlatformName() + "-" + storePlatform.getId(), status);
+            } else if (storePlatform.getPlatformType() == PlatformType.delivery.getValue()) {
+                this.deliveryPlatforms.put(storePlatform.getPlatformName() + "-" + storePlatform.getId(), status);
+            }
+        });
+    }
+}