|
|
@@ -19,17 +19,22 @@ public class ViewStoreInfo extends BaseEntity {
|
|
|
@Comment("门店开通的配送平台")
|
|
|
private Map<String, Object> deliveryPlatforms;
|
|
|
|
|
|
+ public ViewStoreInfo() {
|
|
|
+ }
|
|
|
+
|
|
|
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);
|
|
|
- }
|
|
|
- });
|
|
|
+ if (storeInfo != null) {
|
|
|
+ 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public StoreInfo getStoreInfo() {
|