|
|
|
@ -86,6 +86,7 @@ class MiNiDetail {
|
|
|
|
|
dynamic markProductNone; |
|
|
|
|
dynamic namePinyin; |
|
|
|
|
dynamic nameInitials; |
|
|
|
|
SubscribeParam subscribeParam; |
|
|
|
|
|
|
|
|
|
static MiNiDetail fromJson(Map<String, dynamic> map) { |
|
|
|
|
if (map == null) return null; |
|
|
|
@ -123,16 +124,14 @@ class MiNiDetail {
|
|
|
|
|
miNiDetailBean.printerFlag = map['printerFlag']; |
|
|
|
|
miNiDetailBean.thumbnailImg = map['thumbnailImg']; |
|
|
|
|
miNiDetailBean.materialId = map['materialId']; |
|
|
|
|
miNiDetailBean.imgs = []..addAll( |
|
|
|
|
(map['imgs'] as List ?? []).map((o) => o.toString()) |
|
|
|
|
); |
|
|
|
|
miNiDetailBean.imgs = [] |
|
|
|
|
..addAll((map['imgs'] as List ?? []).map((o) => o.toString())); |
|
|
|
|
miNiDetailBean.storeDTO = StoreDTOBean.fromJson(map['storeDTO']); |
|
|
|
|
miNiDetailBean.attrList = []..addAll( |
|
|
|
|
(map['attrList'] as List ?? []).map((o) => AttrListBean.fromJson(o)) |
|
|
|
|
); |
|
|
|
|
(map['attrList'] as List ?? []).map((o) => AttrListBean.fromJson(o))); |
|
|
|
|
miNiDetailBean.productSkuVOList = []..addAll( |
|
|
|
|
(map['productSkuVOList'] as List ?? []).map((o) => ProductSkuVOListBean.fromJson(o)) |
|
|
|
|
); |
|
|
|
|
(map['productSkuVOList'] as List ?? []) |
|
|
|
|
.map((o) => ProductSkuVOListBean.fromJson(o))); |
|
|
|
|
miNiDetailBean.shipAddress = map['shipAddress']; |
|
|
|
|
miNiDetailBean.buyCount = map['buyCount']; |
|
|
|
|
miNiDetailBean.promotionShowVOList = map['promotionShowVOList']; |
|
|
|
@ -141,56 +140,59 @@ class MiNiDetail {
|
|
|
|
|
miNiDetailBean.markProductNone = map['markProductNone']; |
|
|
|
|
miNiDetailBean.namePinyin = map['namePinyin']; |
|
|
|
|
miNiDetailBean.nameInitials = map['nameInitials']; |
|
|
|
|
miNiDetailBean.subscribeParam = |
|
|
|
|
SubscribeParam.fromJson(map['subscribeParam']); |
|
|
|
|
return miNiDetailBean; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map toJson() => { |
|
|
|
|
"id": id, |
|
|
|
|
"createTime": createTime, |
|
|
|
|
"createUser": createUser, |
|
|
|
|
"updateTime": updateTime, |
|
|
|
|
"updateUser": updateUser, |
|
|
|
|
"supplierName": supplierName, |
|
|
|
|
"storeId": storeId, |
|
|
|
|
"categoryId": categoryId, |
|
|
|
|
"groupId": groupId, |
|
|
|
|
"shortName": shortName, |
|
|
|
|
"productName": productName, |
|
|
|
|
"sellDesc": sellDesc, |
|
|
|
|
"productCode": productCode, |
|
|
|
|
"weight": weight, |
|
|
|
|
"applyPrice": applyPrice, |
|
|
|
|
"price": price, |
|
|
|
|
"stock": stock, |
|
|
|
|
"sellCount": sellCount, |
|
|
|
|
"needLogistics": needLogistics, |
|
|
|
|
"oversold": oversold, |
|
|
|
|
"organic" : organic, |
|
|
|
|
"status": status, |
|
|
|
|
"posShow": posShow, |
|
|
|
|
"productType": productType, |
|
|
|
|
"productNumber": productNumber, |
|
|
|
|
"setMeal": setMeal, |
|
|
|
|
"attrStyle": attrStyle, |
|
|
|
|
"detail" :detail, |
|
|
|
|
"details" :details, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
"printerFlag": printerFlag, |
|
|
|
|
"thumbnailImg": thumbnailImg, |
|
|
|
|
"materialId": materialId, |
|
|
|
|
"imgs": imgs, |
|
|
|
|
"storeDTO": storeDTO, |
|
|
|
|
"attrList": attrList, |
|
|
|
|
"productSkuVOList": productSkuVOList, |
|
|
|
|
"shipAddress": shipAddress, |
|
|
|
|
"buyCount": buyCount, |
|
|
|
|
"promotionShowVOList": promotionShowVOList, |
|
|
|
|
"buyNum": buyNum, |
|
|
|
|
"productPlatterInfos": productPlatterInfos, |
|
|
|
|
"markProductNone": markProductNone, |
|
|
|
|
"namePinyin": namePinyin, |
|
|
|
|
"nameInitials": nameInitials, |
|
|
|
|
}; |
|
|
|
|
"id": id, |
|
|
|
|
"createTime": createTime, |
|
|
|
|
"createUser": createUser, |
|
|
|
|
"updateTime": updateTime, |
|
|
|
|
"updateUser": updateUser, |
|
|
|
|
"supplierName": supplierName, |
|
|
|
|
"storeId": storeId, |
|
|
|
|
"categoryId": categoryId, |
|
|
|
|
"groupId": groupId, |
|
|
|
|
"shortName": shortName, |
|
|
|
|
"productName": productName, |
|
|
|
|
"sellDesc": sellDesc, |
|
|
|
|
"productCode": productCode, |
|
|
|
|
"weight": weight, |
|
|
|
|
"applyPrice": applyPrice, |
|
|
|
|
"price": price, |
|
|
|
|
"stock": stock, |
|
|
|
|
"sellCount": sellCount, |
|
|
|
|
"needLogistics": needLogistics, |
|
|
|
|
"oversold": oversold, |
|
|
|
|
"organic": organic, |
|
|
|
|
"status": status, |
|
|
|
|
"posShow": posShow, |
|
|
|
|
"productType": productType, |
|
|
|
|
"productNumber": productNumber, |
|
|
|
|
"setMeal": setMeal, |
|
|
|
|
"attrStyle": attrStyle, |
|
|
|
|
"detail": detail, |
|
|
|
|
"details": details, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
"printerFlag": printerFlag, |
|
|
|
|
"thumbnailImg": thumbnailImg, |
|
|
|
|
"materialId": materialId, |
|
|
|
|
"imgs": imgs, |
|
|
|
|
"storeDTO": storeDTO, |
|
|
|
|
"attrList": attrList, |
|
|
|
|
"productSkuVOList": productSkuVOList, |
|
|
|
|
"shipAddress": shipAddress, |
|
|
|
|
"buyCount": buyCount, |
|
|
|
|
"promotionShowVOList": promotionShowVOList, |
|
|
|
|
"buyNum": buyNum, |
|
|
|
|
"productPlatterInfos": productPlatterInfos, |
|
|
|
|
"markProductNone": markProductNone, |
|
|
|
|
"namePinyin": namePinyin, |
|
|
|
|
"nameInitials": nameInitials, |
|
|
|
|
"subscribeParam": subscribeParam, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// id : "1446382612795883520" |
|
|
|
@ -271,41 +273,41 @@ class ProductSkuVOListBean {
|
|
|
|
|
productSkuVOListBean.version = map['version']; |
|
|
|
|
productSkuVOListBean.skuAttrCodeDTOList = map['skuAttrCodeDTOList']; |
|
|
|
|
productSkuVOListBean.skuAttrList = []..addAll( |
|
|
|
|
(map['skuAttrList'] as List ?? []).map((o) => SkuAttrListBean.fromJson(o)) |
|
|
|
|
); |
|
|
|
|
(map['skuAttrList'] as List ?? []) |
|
|
|
|
.map((o) => SkuAttrListBean.fromJson(o))); |
|
|
|
|
productSkuVOListBean.productSetMeals = []..addAll( |
|
|
|
|
(map['productSetMeals'] as List ?? []).map((o) => ProductSetMeals.fromJson(o)) |
|
|
|
|
); |
|
|
|
|
(map['productSetMeals'] as List ?? []) |
|
|
|
|
.map((o) => ProductSetMeals.fromJson(o))); |
|
|
|
|
productSkuVOListBean.setMealDTOList = map['setMealDTOList']; |
|
|
|
|
return productSkuVOListBean; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map toJson() => { |
|
|
|
|
"id": id, |
|
|
|
|
"createTime": createTime, |
|
|
|
|
"createUser": createUser, |
|
|
|
|
"updateTime": updateTime, |
|
|
|
|
"updateUser": updateUser, |
|
|
|
|
"storeId": storeId, |
|
|
|
|
"skuCode": skuCode, |
|
|
|
|
"skuNameStr": skuNameStr, |
|
|
|
|
"productId": productId, |
|
|
|
|
"skuPrice": skuPrice, |
|
|
|
|
"applyPrice": applyPrice, |
|
|
|
|
"vipPrice": vipPrice, |
|
|
|
|
"skuImg": skuImg, |
|
|
|
|
"skuStock": skuStock, |
|
|
|
|
"sort": sort, |
|
|
|
|
"setMeal": setMeal, |
|
|
|
|
"weight": weight, |
|
|
|
|
"volume": volume, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
"material": material, |
|
|
|
|
"version": version, |
|
|
|
|
"skuAttrCodeDTOList": skuAttrCodeDTOList, |
|
|
|
|
"skuAttrList": skuAttrList, |
|
|
|
|
"setMealDTOList": setMealDTOList, |
|
|
|
|
}; |
|
|
|
|
"id": id, |
|
|
|
|
"createTime": createTime, |
|
|
|
|
"createUser": createUser, |
|
|
|
|
"updateTime": updateTime, |
|
|
|
|
"updateUser": updateUser, |
|
|
|
|
"storeId": storeId, |
|
|
|
|
"skuCode": skuCode, |
|
|
|
|
"skuNameStr": skuNameStr, |
|
|
|
|
"productId": productId, |
|
|
|
|
"skuPrice": skuPrice, |
|
|
|
|
"applyPrice": applyPrice, |
|
|
|
|
"vipPrice": vipPrice, |
|
|
|
|
"skuImg": skuImg, |
|
|
|
|
"skuStock": skuStock, |
|
|
|
|
"sort": sort, |
|
|
|
|
"setMeal": setMeal, |
|
|
|
|
"weight": weight, |
|
|
|
|
"volume": volume, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
"material": material, |
|
|
|
|
"version": version, |
|
|
|
|
"skuAttrCodeDTOList": skuAttrCodeDTOList, |
|
|
|
|
"skuAttrList": skuAttrList, |
|
|
|
|
"setMealDTOList": setMealDTOList, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// id : "1446382613043347456" |
|
|
|
@ -348,17 +350,17 @@ class SkuAttrListBean {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map toJson() => { |
|
|
|
|
"id": id, |
|
|
|
|
"createTime": createTime, |
|
|
|
|
"createUser": createUser, |
|
|
|
|
"updateTime": updateTime, |
|
|
|
|
"updateUser": updateUser, |
|
|
|
|
"skuId": skuId, |
|
|
|
|
"attrId": attrId, |
|
|
|
|
"attrValueId": attrValueId, |
|
|
|
|
"sortOrder": sortOrder, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
}; |
|
|
|
|
"id": id, |
|
|
|
|
"createTime": createTime, |
|
|
|
|
"createUser": createUser, |
|
|
|
|
"updateTime": updateTime, |
|
|
|
|
"updateUser": updateUser, |
|
|
|
|
"skuId": skuId, |
|
|
|
|
"attrId": attrId, |
|
|
|
|
"attrValueId": attrValueId, |
|
|
|
|
"sortOrder": sortOrder, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// groupName : "酒水选1" |
|
|
|
@ -371,7 +373,8 @@ class ProductSetMeals {
|
|
|
|
|
String groupName, |
|
|
|
|
int totalNumber, |
|
|
|
|
int optionalNumber, |
|
|
|
|
List<ProductInfoList> productInfoList,}){ |
|
|
|
|
List<ProductInfoList> productInfoList, |
|
|
|
|
}) { |
|
|
|
|
_groupName = groupName; |
|
|
|
|
_totalNumber = totalNumber; |
|
|
|
|
_optionalNumber = optionalNumber; |
|
|
|
@ -389,22 +392,31 @@ class ProductSetMeals {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String _groupName; |
|
|
|
|
int _totalNumber; |
|
|
|
|
int _optionalNumber; |
|
|
|
|
List<ProductInfoList> _productInfoList; |
|
|
|
|
ProductSetMeals copyWith({ String groupName, |
|
|
|
|
|
|
|
|
|
ProductSetMeals copyWith({ |
|
|
|
|
String groupName, |
|
|
|
|
int totalNumber, |
|
|
|
|
int optionalNumber, |
|
|
|
|
List<ProductInfoList> productInfoList, |
|
|
|
|
}) => ProductSetMeals( groupName: groupName ?? _groupName, |
|
|
|
|
totalNumber: totalNumber ?? _totalNumber, |
|
|
|
|
optionalNumber: optionalNumber ?? _optionalNumber, |
|
|
|
|
productInfoList: productInfoList ?? _productInfoList, |
|
|
|
|
); |
|
|
|
|
}) => |
|
|
|
|
ProductSetMeals( |
|
|
|
|
groupName: groupName ?? _groupName, |
|
|
|
|
totalNumber: totalNumber ?? _totalNumber, |
|
|
|
|
optionalNumber: optionalNumber ?? _optionalNumber, |
|
|
|
|
productInfoList: productInfoList ?? _productInfoList, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
String get groupName => _groupName; |
|
|
|
|
|
|
|
|
|
int get totalNumber => _totalNumber; |
|
|
|
|
|
|
|
|
|
int get optionalNumber => _optionalNumber; |
|
|
|
|
|
|
|
|
|
List<ProductInfoList> get productInfoList => _productInfoList; |
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
@ -417,7 +429,6 @@ class ProductSetMeals {
|
|
|
|
|
} |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// productId : "1372091668961951744" |
|
|
|
@ -436,7 +447,8 @@ class ProductInfoList {
|
|
|
|
|
bool allSku, |
|
|
|
|
List<SkuInfoList> skuInfoList, |
|
|
|
|
List<ProductAttrInfoList> productAttrInfoList, |
|
|
|
|
int number,}){ |
|
|
|
|
int number, |
|
|
|
|
}) { |
|
|
|
|
_productId = productId; |
|
|
|
|
_productName = productName; |
|
|
|
|
_productImg = productImg; |
|
|
|
@ -465,6 +477,7 @@ class ProductInfoList {
|
|
|
|
|
} |
|
|
|
|
_number = json['number']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String _productId; |
|
|
|
|
String _productName; |
|
|
|
|
String _productImg; |
|
|
|
@ -473,26 +486,36 @@ class ProductInfoList {
|
|
|
|
|
List<ProductAttrInfoList> _productAttrInfoList; |
|
|
|
|
int _number; |
|
|
|
|
int _count = 0; |
|
|
|
|
ProductInfoList copyWith({ String productId, |
|
|
|
|
|
|
|
|
|
ProductInfoList copyWith({ |
|
|
|
|
String productId, |
|
|
|
|
String productName, |
|
|
|
|
String productImg, |
|
|
|
|
bool allSku, |
|
|
|
|
List<SkuInfoList> skuInfoList, |
|
|
|
|
List<ProductAttrInfoList> productAttrInfoList, |
|
|
|
|
int number, |
|
|
|
|
}) => ProductInfoList( productId: productId ?? _productId, |
|
|
|
|
productName: productName ?? _productName, |
|
|
|
|
productImg: productImg ?? _productImg, |
|
|
|
|
allSku: allSku ?? _allSku, |
|
|
|
|
skuInfoList: skuInfoList ?? _skuInfoList, |
|
|
|
|
productAttrInfoList: productAttrInfoList ?? _productAttrInfoList, |
|
|
|
|
number: number ?? _number, |
|
|
|
|
); |
|
|
|
|
}) => |
|
|
|
|
ProductInfoList( |
|
|
|
|
productId: productId ?? _productId, |
|
|
|
|
productName: productName ?? _productName, |
|
|
|
|
productImg: productImg ?? _productImg, |
|
|
|
|
allSku: allSku ?? _allSku, |
|
|
|
|
skuInfoList: skuInfoList ?? _skuInfoList, |
|
|
|
|
productAttrInfoList: productAttrInfoList ?? _productAttrInfoList, |
|
|
|
|
number: number ?? _number, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
String get productId => _productId; |
|
|
|
|
|
|
|
|
|
String get productName => _productName; |
|
|
|
|
|
|
|
|
|
String get productImg => _productImg; |
|
|
|
|
|
|
|
|
|
bool get allSku => _allSku; |
|
|
|
|
|
|
|
|
|
List<SkuInfoList> get skuInfoList => _skuInfoList; |
|
|
|
|
|
|
|
|
|
List<ProductAttrInfoList> get productAttrInfoList => _productAttrInfoList; |
|
|
|
|
int number; |
|
|
|
|
|
|
|
|
@ -502,8 +525,6 @@ class ProductInfoList {
|
|
|
|
|
_count = value; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
|
final map = <String, dynamic>{}; |
|
|
|
|
map['productId'] = _productId; |
|
|
|
@ -514,12 +535,12 @@ class ProductInfoList {
|
|
|
|
|
map['skuInfoList'] = _skuInfoList.map((v) => v.toJson()).toList(); |
|
|
|
|
} |
|
|
|
|
if (_productAttrInfoList != null) { |
|
|
|
|
map['productAttrInfoList'] = _productAttrInfoList.map((v) => v.toJson()).toList(); |
|
|
|
|
map['productAttrInfoList'] = |
|
|
|
|
_productAttrInfoList.map((v) => v.toJson()).toList(); |
|
|
|
|
} |
|
|
|
|
map['number'] = _number; |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// attrId : "1372091668978728960" |
|
|
|
@ -530,7 +551,8 @@ class ProductAttrInfoList {
|
|
|
|
|
ProductAttrInfoList({ |
|
|
|
|
String attrId, |
|
|
|
|
String attrName, |
|
|
|
|
List<AttrValueList> attrValueList,}){ |
|
|
|
|
List<AttrValueList> attrValueList, |
|
|
|
|
}) { |
|
|
|
|
_attrId = attrId; |
|
|
|
|
_attrName = attrName; |
|
|
|
|
_attrValueList = attrValueList; |
|
|
|
@ -546,21 +568,28 @@ class ProductAttrInfoList {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String _attrId; |
|
|
|
|
String _attrName; |
|
|
|
|
List<AttrValueList> _attrValueList; |
|
|
|
|
String _selectSku; |
|
|
|
|
ProductAttrInfoList copyWith({ String attrId, |
|
|
|
|
|
|
|
|
|
ProductAttrInfoList copyWith({ |
|
|
|
|
String attrId, |
|
|
|
|
String attrName, |
|
|
|
|
List<AttrValueList> attrValueList, |
|
|
|
|
}) => ProductAttrInfoList( attrId: attrId ?? _attrId, |
|
|
|
|
attrName: attrName ?? _attrName, |
|
|
|
|
attrValueList: attrValueList ?? _attrValueList, |
|
|
|
|
); |
|
|
|
|
}) => |
|
|
|
|
ProductAttrInfoList( |
|
|
|
|
attrId: attrId ?? _attrId, |
|
|
|
|
attrName: attrName ?? _attrName, |
|
|
|
|
attrValueList: attrValueList ?? _attrValueList, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
String get attrId => _attrId; |
|
|
|
|
|
|
|
|
|
String get attrName => _attrName; |
|
|
|
|
List<AttrValueList> get attrValueList => _attrValueList; |
|
|
|
|
|
|
|
|
|
List<AttrValueList> get attrValueList => _attrValueList; |
|
|
|
|
|
|
|
|
|
String get selectSku => _selectSku; |
|
|
|
|
|
|
|
|
@ -577,7 +606,6 @@ class ProductAttrInfoList {
|
|
|
|
|
} |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// attrId : "1372091668987117568" |
|
|
|
@ -588,7 +616,8 @@ class AttrValueList {
|
|
|
|
|
AttrValueList({ |
|
|
|
|
String attrId, |
|
|
|
|
String attrName, |
|
|
|
|
dynamic attrValueList,}){ |
|
|
|
|
dynamic attrValueList, |
|
|
|
|
}) { |
|
|
|
|
_attrId = attrId; |
|
|
|
|
_attrName = attrName; |
|
|
|
|
_attrValueList = attrValueList; |
|
|
|
@ -599,18 +628,26 @@ class AttrValueList {
|
|
|
|
|
_attrName = json['attrName']; |
|
|
|
|
_attrValueList = json['attrValueList']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String _attrId; |
|
|
|
|
String _attrName; |
|
|
|
|
dynamic _attrValueList; |
|
|
|
|
AttrValueList copyWith({ String attrId, |
|
|
|
|
|
|
|
|
|
AttrValueList copyWith({ |
|
|
|
|
String attrId, |
|
|
|
|
String attrName, |
|
|
|
|
dynamic attrValueList, |
|
|
|
|
}) => AttrValueList( attrId: attrId ?? _attrId, |
|
|
|
|
attrName: attrName ?? _attrName, |
|
|
|
|
attrValueList: attrValueList ?? _attrValueList, |
|
|
|
|
); |
|
|
|
|
}) => |
|
|
|
|
AttrValueList( |
|
|
|
|
attrId: attrId ?? _attrId, |
|
|
|
|
attrName: attrName ?? _attrName, |
|
|
|
|
attrValueList: attrValueList ?? _attrValueList, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
String get attrId => _attrId; |
|
|
|
|
|
|
|
|
|
String get attrName => _attrName; |
|
|
|
|
|
|
|
|
|
dynamic get attrValueList => _attrValueList; |
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
@ -620,7 +657,6 @@ class AttrValueList {
|
|
|
|
|
map['attrValueList'] = _attrValueList; |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// id : "1372091669003894784" |
|
|
|
@ -631,7 +667,8 @@ class SkuInfoList {
|
|
|
|
|
SkuInfoList({ |
|
|
|
|
String id, |
|
|
|
|
String skuName, |
|
|
|
|
List<ProductSkuAttrList> productSkuAttrList,}){ |
|
|
|
|
List<ProductSkuAttrList> productSkuAttrList, |
|
|
|
|
}) { |
|
|
|
|
_id = id; |
|
|
|
|
_skuName = skuName; |
|
|
|
|
_productSkuAttrList = productSkuAttrList; |
|
|
|
@ -647,19 +684,27 @@ class SkuInfoList {
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String _id; |
|
|
|
|
String _skuName; |
|
|
|
|
bool _isSelected = false; |
|
|
|
|
List<ProductSkuAttrList> _productSkuAttrList; |
|
|
|
|
SkuInfoList copyWith({ String id, |
|
|
|
|
|
|
|
|
|
SkuInfoList copyWith({ |
|
|
|
|
String id, |
|
|
|
|
String skuName, |
|
|
|
|
List<ProductSkuAttrList> productSkuAttrList, |
|
|
|
|
}) => SkuInfoList( id: id ?? _id, |
|
|
|
|
skuName: skuName ?? _skuName, |
|
|
|
|
productSkuAttrList: productSkuAttrList ?? _productSkuAttrList, |
|
|
|
|
); |
|
|
|
|
}) => |
|
|
|
|
SkuInfoList( |
|
|
|
|
id: id ?? _id, |
|
|
|
|
skuName: skuName ?? _skuName, |
|
|
|
|
productSkuAttrList: productSkuAttrList ?? _productSkuAttrList, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
String get id => _id; |
|
|
|
|
|
|
|
|
|
String get skuName => _skuName; |
|
|
|
|
|
|
|
|
|
List<ProductSkuAttrList> get productSkuAttrList => _productSkuAttrList; |
|
|
|
|
|
|
|
|
|
bool get isSelected => _isSelected; |
|
|
|
@ -673,11 +718,11 @@ class SkuInfoList {
|
|
|
|
|
map['id'] = _id; |
|
|
|
|
map['skuName'] = _skuName; |
|
|
|
|
if (_productSkuAttrList != null) { |
|
|
|
|
map['productSkuAttrList'] = _productSkuAttrList.map((v) => v.toJson()).toList(); |
|
|
|
|
map['productSkuAttrList'] = |
|
|
|
|
_productSkuAttrList.map((v) => v.toJson()).toList(); |
|
|
|
|
} |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// id : "1372091669012283392" |
|
|
|
@ -702,7 +747,8 @@ class ProductSkuAttrList {
|
|
|
|
|
String attrId, |
|
|
|
|
String attrValueId, |
|
|
|
|
dynamic sortOrder, |
|
|
|
|
int isDelete,}){ |
|
|
|
|
int isDelete, |
|
|
|
|
}) { |
|
|
|
|
_id = id; |
|
|
|
|
_createTime = createTime; |
|
|
|
|
_createUser = createUser; |
|
|
|
@ -727,6 +773,7 @@ class ProductSkuAttrList {
|
|
|
|
|
_sortOrder = json['sortOrder']; |
|
|
|
|
_isDelete = json['isDelete']; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String _id; |
|
|
|
|
String _createTime; |
|
|
|
|
String _createUser; |
|
|
|
@ -737,7 +784,9 @@ class ProductSkuAttrList {
|
|
|
|
|
String _attrValueId; |
|
|
|
|
dynamic _sortOrder; |
|
|
|
|
int _isDelete; |
|
|
|
|
ProductSkuAttrList copyWith({ String id, |
|
|
|
|
|
|
|
|
|
ProductSkuAttrList copyWith({ |
|
|
|
|
String id, |
|
|
|
|
String createTime, |
|
|
|
|
String createUser, |
|
|
|
|
String updateTime, |
|
|
|
@ -747,26 +796,38 @@ class ProductSkuAttrList {
|
|
|
|
|
String attrValueId, |
|
|
|
|
dynamic sortOrder, |
|
|
|
|
int isDelete, |
|
|
|
|
}) => ProductSkuAttrList( id: id ?? _id, |
|
|
|
|
createTime: createTime ?? _createTime, |
|
|
|
|
createUser: createUser ?? _createUser, |
|
|
|
|
updateTime: updateTime ?? _updateTime, |
|
|
|
|
updateUser: updateUser ?? _updateUser, |
|
|
|
|
skuId: skuId ?? _skuId, |
|
|
|
|
attrId: attrId ?? _attrId, |
|
|
|
|
attrValueId: attrValueId ?? _attrValueId, |
|
|
|
|
sortOrder: sortOrder ?? _sortOrder, |
|
|
|
|
isDelete: isDelete ?? _isDelete, |
|
|
|
|
); |
|
|
|
|
}) => |
|
|
|
|
ProductSkuAttrList( |
|
|
|
|
id: id ?? _id, |
|
|
|
|
createTime: createTime ?? _createTime, |
|
|
|
|
createUser: createUser ?? _createUser, |
|
|
|
|
updateTime: updateTime ?? _updateTime, |
|
|
|
|
updateUser: updateUser ?? _updateUser, |
|
|
|
|
skuId: skuId ?? _skuId, |
|
|
|
|
attrId: attrId ?? _attrId, |
|
|
|
|
attrValueId: attrValueId ?? _attrValueId, |
|
|
|
|
sortOrder: sortOrder ?? _sortOrder, |
|
|
|
|
isDelete: isDelete ?? _isDelete, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
String get id => _id; |
|
|
|
|
|
|
|
|
|
String get createTime => _createTime; |
|
|
|
|
|
|
|
|
|
String get createUser => _createUser; |
|
|
|
|
|
|
|
|
|
String get updateTime => _updateTime; |
|
|
|
|
|
|
|
|
|
String get updateUser => _updateUser; |
|
|
|
|
|
|
|
|
|
String get skuId => _skuId; |
|
|
|
|
|
|
|
|
|
String get attrId => _attrId; |
|
|
|
|
|
|
|
|
|
String get attrValueId => _attrValueId; |
|
|
|
|
|
|
|
|
|
dynamic get sortOrder => _sortOrder; |
|
|
|
|
|
|
|
|
|
int get isDelete => _isDelete; |
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
@ -783,7 +844,6 @@ class ProductSkuAttrList {
|
|
|
|
|
map['isDelete'] = _isDelete; |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// productId : "1433994980233314304" |
|
|
|
@ -815,22 +875,21 @@ class AttrListBean {
|
|
|
|
|
attrListBean.isDelete = map['isDelete']; |
|
|
|
|
attrListBean.attrCode = map['attrCode']; |
|
|
|
|
attrListBean.id = map['id']; |
|
|
|
|
attrListBean.attrValueList = []..addAll( |
|
|
|
|
(map['attrValueList'] as List ?? []).map((o) => AttrValueListBean.fromJson(o)) |
|
|
|
|
); |
|
|
|
|
attrListBean.attrValueList = []..addAll((map['attrValueList'] as List ?? []) |
|
|
|
|
.map((o) => AttrValueListBean.fromJson(o))); |
|
|
|
|
return attrListBean; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map toJson() => { |
|
|
|
|
"productId": productId, |
|
|
|
|
"attrName": attrName, |
|
|
|
|
"sortOrder": sortOrder, |
|
|
|
|
"needImg": needImg, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
"attrCode": attrCode, |
|
|
|
|
"id": id, |
|
|
|
|
"attrValueList": attrValueList, |
|
|
|
|
}; |
|
|
|
|
"productId": productId, |
|
|
|
|
"attrName": attrName, |
|
|
|
|
"sortOrder": sortOrder, |
|
|
|
|
"needImg": needImg, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
"attrCode": attrCode, |
|
|
|
|
"id": id, |
|
|
|
|
"attrValueList": attrValueList, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// id : "1434076666832879616" |
|
|
|
@ -865,14 +924,14 @@ class AttrValueListBean {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map toJson() => { |
|
|
|
|
"id": id, |
|
|
|
|
"attrId": attrId, |
|
|
|
|
"attrValue": attrValue, |
|
|
|
|
"attrValueImg": attrValueImg, |
|
|
|
|
"sortOrder": sortOrder, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
"attrValueCode": attrValueCode, |
|
|
|
|
}; |
|
|
|
|
"id": id, |
|
|
|
|
"attrId": attrId, |
|
|
|
|
"attrValue": attrValue, |
|
|
|
|
"attrValueImg": attrValueImg, |
|
|
|
|
"sortOrder": sortOrder, |
|
|
|
|
"isDelete": isDelete, |
|
|
|
|
"attrValueCode": attrValueCode, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// id : "1333246101343436800" |
|
|
|
@ -903,11 +962,103 @@ class StoreDTOBean {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Map toJson() => { |
|
|
|
|
"id": id, |
|
|
|
|
"storeName": storeName, |
|
|
|
|
"nickName": nickName, |
|
|
|
|
"logo": logo, |
|
|
|
|
"productCount": productCount, |
|
|
|
|
"soldNum": soldNum, |
|
|
|
|
}; |
|
|
|
|
"id": id, |
|
|
|
|
"storeName": storeName, |
|
|
|
|
"nickName": nickName, |
|
|
|
|
"logo": logo, |
|
|
|
|
"productCount": productCount, |
|
|
|
|
"soldNum": soldNum, |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// isEnableSubscribe : true |
|
|
|
|
/// dayOrDate : 3 |
|
|
|
|
/// startAfterDays : null |
|
|
|
|
/// daysValidate : null |
|
|
|
|
/// subscribeStartTime : "2023-04-20 00:00:00" |
|
|
|
|
/// subscribeEndTime : "2023-04-30 00:00:00" |
|
|
|
|
/// stores : ["海峡姐妹","前进麦味","百年川椒","小吃街"] |
|
|
|
|
|
|
|
|
|
class SubscribeParam { |
|
|
|
|
SubscribeParam({ |
|
|
|
|
bool isEnableSubscribe, |
|
|
|
|
num dayOrDate, |
|
|
|
|
dynamic startAfterDays, |
|
|
|
|
dynamic daysValidate, |
|
|
|
|
String subscribeStartTime, |
|
|
|
|
String subscribeEndTime, |
|
|
|
|
List<String> stores,}) { |
|
|
|
|
_isEnableSubscribe = isEnableSubscribe; |
|
|
|
|
_dayOrDate = dayOrDate; |
|
|
|
|
_startAfterDays = startAfterDays; |
|
|
|
|
_daysValidate = daysValidate; |
|
|
|
|
_subscribeStartTime = subscribeStartTime; |
|
|
|
|
_subscribeEndTime = subscribeEndTime; |
|
|
|
|
_stores = stores; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SubscribeParam.fromJson(dynamic json) { |
|
|
|
|
if(json == null) |
|
|
|
|
return; |
|
|
|
|
_isEnableSubscribe = json['isEnableSubscribe']; |
|
|
|
|
_dayOrDate = json['dayOrDate']; |
|
|
|
|
_startAfterDays = json['startAfterDays']; |
|
|
|
|
_daysValidate = json['daysValidate']; |
|
|
|
|
_subscribeStartTime = json['subscribeStartTime']; |
|
|
|
|
_subscribeEndTime = json['subscribeEndTime']; |
|
|
|
|
_stores = json['stores'] != null ? json['stores'].cast<String>() : []; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool _isEnableSubscribe; |
|
|
|
|
num _dayOrDate; |
|
|
|
|
dynamic _startAfterDays; |
|
|
|
|
dynamic _daysValidate; |
|
|
|
|
String _subscribeStartTime; |
|
|
|
|
String _subscribeEndTime; |
|
|
|
|
List<String> _stores; |
|
|
|
|
|
|
|
|
|
SubscribeParam copyWith({ bool isEnableSubscribe, |
|
|
|
|
num dayOrDate, |
|
|
|
|
dynamic startAfterDays, |
|
|
|
|
dynamic daysValidate, |
|
|
|
|
String subscribeStartTime, |
|
|
|
|
String subscribeEndTime, |
|
|
|
|
List<String> stores, |
|
|
|
|
}) => |
|
|
|
|
SubscribeParam( |
|
|
|
|
isEnableSubscribe: isEnableSubscribe ?? _isEnableSubscribe, |
|
|
|
|
dayOrDate: dayOrDate ?? _dayOrDate, |
|
|
|
|
startAfterDays: startAfterDays ?? _startAfterDays, |
|
|
|
|
daysValidate: daysValidate ?? _daysValidate, |
|
|
|
|
subscribeStartTime: subscribeStartTime ?? _subscribeStartTime, |
|
|
|
|
subscribeEndTime: subscribeEndTime ?? _subscribeEndTime, |
|
|
|
|
stores: stores ?? _stores, |
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
bool get isEnableSubscribe => _isEnableSubscribe; |
|
|
|
|
|
|
|
|
|
num get dayOrDate => _dayOrDate; |
|
|
|
|
|
|
|
|
|
dynamic get startAfterDays => _startAfterDays; |
|
|
|
|
|
|
|
|
|
dynamic get daysValidate => _daysValidate; |
|
|
|
|
|
|
|
|
|
String get subscribeStartTime => _subscribeStartTime; |
|
|
|
|
|
|
|
|
|
String get subscribeEndTime => _subscribeEndTime; |
|
|
|
|
|
|
|
|
|
List<String> get stores => _stores; |
|
|
|
|
|
|
|
|
|
Map<String, dynamic> toJson() { |
|
|
|
|
final map = <String, dynamic>{}; |
|
|
|
|
map['isEnableSubscribe'] = _isEnableSubscribe; |
|
|
|
|
map['dayOrDate'] = _dayOrDate; |
|
|
|
|
map['startAfterDays'] = _startAfterDays; |
|
|
|
|
map['daysValidate'] = _daysValidate; |
|
|
|
|
map['subscribeStartTime'] = _subscribeStartTime; |
|
|
|
|
map['subscribeEndTime'] = _subscribeEndTime; |
|
|
|
|
map['stores'] = _stores; |
|
|
|
|
return map; |
|
|
|
|
} |
|
|
|
|
} |