Browse Source
Conflicts: lib/retrofit/data/shoppingCart.dart lib/store/store_order.dart lib/store/store_view/settlement.dart lib/store/store_view/shop_goods.dartmaster
fmk
3 years ago
4 changed files with 930 additions and 59 deletions
@ -0,0 +1,787 @@
|
||||
/// couponList : [{"allProduct":true,"bizId":"","bizType":0,"couponId":0,"discountAmount":0,"discountPercent":0,"fullAmount":0,"fullNumber":0,"id":0,"mid":0,"productList":[{"applyPrice":0,"attrStyle":0,"categoryId":0,"groupId":0,"id":0,"isDelete":0,"materialId":0,"needLogistics":0,"oversold":0,"posShow":true,"price":0,"printerFlag":"","productCode":"","productName":"","productNumber":0,"productType":0,"sellCount":0,"sellDesc":"","setMeal":0,"shortName":"","status":0,"stock":0,"storeId":0,"supplierName":"","weight":0}],"promotionId":0,"promotionName":"","publishEndTime":"","publishStartTime":"","receiveTime":"","status":0,"storeId":0,"tenantCode":"","type":0,"usable":true,"useEndTime":"","useStartTime":"","useTime":""}] |
||||
/// discountAmount : 0 |
||||
/// freePostAge : 0 |
||||
/// memberVO : {"addressId":0,"age":0,"balance":0,"birth":"","createTime":"","headimg":"","isBind":true,"level":0,"memberRankVo":{"id":0,"nextId":0,"nextName":"","nextOrigin":0,"rankContent":"","rankImg":"","rankName":"","rankOrigin":0,"status":true},"money":0,"nickname":"","phone":"","points":0,"remark":"","sex":"","userType":true,"vipNo":""} |
||||
/// mins : 0 |
||||
/// orderNum : 0 |
||||
/// orderProductList : [{"actInfo":{"couponDiscountAmount":0,"couponDiscountRate":0,"couponId":0,"couponType":0,"discountAmount":0,"discountRate":0,"promotionId":0,"promotionType":0},"applyPrice":0,"batch":0,"buyNum":0,"discountAmount":0,"discountPercent":0,"id":0,"isDelete":0,"orderId":0,"postPay":0,"productId":0,"productName":"","reason":"","refundNum":0,"sellPrice":0,"skuId":0,"skuImg":"","skuNameStr":"","status":true,"storeId":0,"tenantCode":"","type":0,"weight":0}] |
||||
/// orderSum : 0 |
||||
/// postAge : 0 |
||||
/// price : 0 |
||||
/// productNum : 0 |
||||
/// promotionInfoList : [{"activityEndTime":"","activityStartTime":"","applyEndTime":"","applyStartTime":"","canPartake":true,"channels":[],"description":"","doEndTime":{"hour":0,"minute":0,"nano":0,"second":0},"doStartTime":{"hour":0,"minute":0,"nano":0,"second":0},"id":0,"image":"","isDelete":0,"isNeedSecurityDeposit":0,"isVip":true,"name":"","promotionDetail":[{}],"promotionPlan":0,"promotionProuctList":[{"id":0,"isDelete":0,"productId":0,"promotionId":0,"tenantCode":""}],"promotionType":0,"securityDeposit":0,"status":0,"storeId":0,"tag":""}] |
||||
/// threshold : 0 |
||||
|
||||
class SettleOrderInfo { |
||||
List<CouponListBean> couponList; |
||||
int discountAmount; |
||||
int freePostAge; |
||||
MemberVOBean memberVO; |
||||
int mins; |
||||
int orderNum; |
||||
List<OrderProductListBean> orderProductList; |
||||
int orderSum; |
||||
int postAge; |
||||
int price; |
||||
int productNum; |
||||
List<PromotionInfoListBean> promotionInfoList; |
||||
int threshold; |
||||
|
||||
static SettleOrderInfo fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
SettleOrderInfo settleOrderInfoBean = SettleOrderInfo(); |
||||
settleOrderInfoBean.couponList = List()..addAll( |
||||
(map['couponList'] as List ?? []).map((o) => CouponListBean.fromJson(o)) |
||||
); |
||||
settleOrderInfoBean.discountAmount = map['discountAmount']; |
||||
settleOrderInfoBean.freePostAge = map['freePostAge']; |
||||
settleOrderInfoBean.memberVO = MemberVOBean.fromJson(map['memberVO']); |
||||
settleOrderInfoBean.mins = map['mins']; |
||||
settleOrderInfoBean.orderNum = map['orderNum']; |
||||
settleOrderInfoBean.orderProductList = List()..addAll( |
||||
(map['orderProductList'] as List ?? []).map((o) => OrderProductListBean.fromJson(o)) |
||||
); |
||||
settleOrderInfoBean.orderSum = map['orderSum']; |
||||
settleOrderInfoBean.postAge = map['postAge']; |
||||
settleOrderInfoBean.price = map['price']; |
||||
settleOrderInfoBean.productNum = map['productNum']; |
||||
settleOrderInfoBean.promotionInfoList = List()..addAll( |
||||
(map['promotionInfoList'] as List ?? []).map((o) => PromotionInfoListBean.fromJson(o)) |
||||
); |
||||
settleOrderInfoBean.threshold = map['threshold']; |
||||
return settleOrderInfoBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"couponList": couponList, |
||||
"discountAmount": discountAmount, |
||||
"freePostAge": freePostAge, |
||||
"memberVO": memberVO, |
||||
"mins": mins, |
||||
"orderNum": orderNum, |
||||
"orderProductList": orderProductList, |
||||
"orderSum": orderSum, |
||||
"postAge": postAge, |
||||
"price": price, |
||||
"productNum": productNum, |
||||
"promotionInfoList": promotionInfoList, |
||||
"threshold": threshold, |
||||
}; |
||||
} |
||||
|
||||
/// activityEndTime : "" |
||||
/// activityStartTime : "" |
||||
/// applyEndTime : "" |
||||
/// applyStartTime : "" |
||||
/// canPartake : true |
||||
/// channels : [] |
||||
/// description : "" |
||||
/// doEndTime : {"hour":0,"minute":0,"nano":0,"second":0} |
||||
/// doStartTime : {"hour":0,"minute":0,"nano":0,"second":0} |
||||
/// id : 0 |
||||
/// image : "" |
||||
/// isDelete : 0 |
||||
/// isNeedSecurityDeposit : 0 |
||||
/// isVip : true |
||||
/// name : "" |
||||
/// promotionDetail : [{}] |
||||
/// promotionPlan : 0 |
||||
/// promotionProuctList : [{"id":0,"isDelete":0,"productId":0,"promotionId":0,"tenantCode":""}] |
||||
/// promotionType : 0 |
||||
/// securityDeposit : 0 |
||||
/// status : 0 |
||||
/// storeId : 0 |
||||
/// tag : "" |
||||
|
||||
class PromotionInfoListBean { |
||||
String activityEndTime; |
||||
String activityStartTime; |
||||
String applyEndTime; |
||||
String applyStartTime; |
||||
bool canPartake; |
||||
List<dynamic> channels; |
||||
String description; |
||||
DoEndTimeBean doEndTime; |
||||
DoStartTimeBean doStartTime; |
||||
int id; |
||||
String image; |
||||
int isDelete; |
||||
int isNeedSecurityDeposit; |
||||
bool isVip; |
||||
String name; |
||||
List<PromotionDetailBean> promotionDetail; |
||||
int promotionPlan; |
||||
List<PromotionProuctListBean> promotionProuctList; |
||||
int promotionType; |
||||
int securityDeposit; |
||||
int status; |
||||
int storeId; |
||||
String tag; |
||||
|
||||
static PromotionInfoListBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
PromotionInfoListBean promotionInfoListBean = PromotionInfoListBean(); |
||||
promotionInfoListBean.activityEndTime = map['activityEndTime']; |
||||
promotionInfoListBean.activityStartTime = map['activityStartTime']; |
||||
promotionInfoListBean.applyEndTime = map['applyEndTime']; |
||||
promotionInfoListBean.applyStartTime = map['applyStartTime']; |
||||
promotionInfoListBean.canPartake = map['canPartake']; |
||||
promotionInfoListBean.channels = map['channels']; |
||||
promotionInfoListBean.description = map['description']; |
||||
promotionInfoListBean.doEndTime = DoEndTimeBean.fromJson(map['doEndTime']); |
||||
promotionInfoListBean.doStartTime = DoStartTimeBean.fromJson(map['doStartTime']); |
||||
promotionInfoListBean.id = map['id']; |
||||
promotionInfoListBean.image = map['image']; |
||||
promotionInfoListBean.isDelete = map['isDelete']; |
||||
promotionInfoListBean.isNeedSecurityDeposit = map['isNeedSecurityDeposit']; |
||||
promotionInfoListBean.isVip = map['isVip']; |
||||
promotionInfoListBean.name = map['name']; |
||||
promotionInfoListBean.promotionDetail = List()..addAll( |
||||
(map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o)) |
||||
); |
||||
promotionInfoListBean.promotionPlan = map['promotionPlan']; |
||||
promotionInfoListBean.promotionProuctList = List()..addAll( |
||||
(map['promotionProuctList'] as List ?? []).map((o) => PromotionProuctListBean.fromJson(o)) |
||||
); |
||||
promotionInfoListBean.promotionType = map['promotionType']; |
||||
promotionInfoListBean.securityDeposit = map['securityDeposit']; |
||||
promotionInfoListBean.status = map['status']; |
||||
promotionInfoListBean.storeId = map['storeId']; |
||||
promotionInfoListBean.tag = map['tag']; |
||||
return promotionInfoListBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"activityEndTime": activityEndTime, |
||||
"activityStartTime": activityStartTime, |
||||
"applyEndTime": applyEndTime, |
||||
"applyStartTime": applyStartTime, |
||||
"canPartake": canPartake, |
||||
"channels": channels, |
||||
"description": description, |
||||
"doEndTime": doEndTime, |
||||
"doStartTime": doStartTime, |
||||
"id": id, |
||||
"image": image, |
||||
"isDelete": isDelete, |
||||
"isNeedSecurityDeposit": isNeedSecurityDeposit, |
||||
"isVip": isVip, |
||||
"name": name, |
||||
"promotionDetail": promotionDetail, |
||||
"promotionPlan": promotionPlan, |
||||
"promotionProuctList": promotionProuctList, |
||||
"promotionType": promotionType, |
||||
"securityDeposit": securityDeposit, |
||||
"status": status, |
||||
"storeId": storeId, |
||||
"tag": tag, |
||||
}; |
||||
} |
||||
|
||||
/// id : 0 |
||||
/// isDelete : 0 |
||||
/// productId : 0 |
||||
/// promotionId : 0 |
||||
/// tenantCode : "" |
||||
|
||||
class PromotionProuctListBean { |
||||
int id; |
||||
int isDelete; |
||||
int productId; |
||||
int promotionId; |
||||
String tenantCode; |
||||
|
||||
static PromotionProuctListBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
PromotionProuctListBean promotionProuctListBean = PromotionProuctListBean(); |
||||
promotionProuctListBean.id = map['id']; |
||||
promotionProuctListBean.isDelete = map['isDelete']; |
||||
promotionProuctListBean.productId = map['productId']; |
||||
promotionProuctListBean.promotionId = map['promotionId']; |
||||
promotionProuctListBean.tenantCode = map['tenantCode']; |
||||
return promotionProuctListBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"id": id, |
||||
"isDelete": isDelete, |
||||
"productId": productId, |
||||
"promotionId": promotionId, |
||||
"tenantCode": tenantCode, |
||||
}; |
||||
} |
||||
|
||||
|
||||
class PromotionDetailBean { |
||||
|
||||
static PromotionDetailBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
PromotionDetailBean promotionDetailBean = PromotionDetailBean(); |
||||
return promotionDetailBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
}; |
||||
} |
||||
|
||||
/// hour : 0 |
||||
/// minute : 0 |
||||
/// nano : 0 |
||||
/// second : 0 |
||||
|
||||
class DoStartTimeBean { |
||||
int hour; |
||||
int minute; |
||||
int nano; |
||||
int second; |
||||
|
||||
static DoStartTimeBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
DoStartTimeBean doStartTimeBean = DoStartTimeBean(); |
||||
doStartTimeBean.hour = map['hour']; |
||||
doStartTimeBean.minute = map['minute']; |
||||
doStartTimeBean.nano = map['nano']; |
||||
doStartTimeBean.second = map['second']; |
||||
return doStartTimeBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"hour": hour, |
||||
"minute": minute, |
||||
"nano": nano, |
||||
"second": second, |
||||
}; |
||||
} |
||||
|
||||
/// hour : 0 |
||||
/// minute : 0 |
||||
/// nano : 0 |
||||
/// second : 0 |
||||
|
||||
class DoEndTimeBean { |
||||
int hour; |
||||
int minute; |
||||
int nano; |
||||
int second; |
||||
|
||||
static DoEndTimeBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
DoEndTimeBean doEndTimeBean = DoEndTimeBean(); |
||||
doEndTimeBean.hour = map['hour']; |
||||
doEndTimeBean.minute = map['minute']; |
||||
doEndTimeBean.nano = map['nano']; |
||||
doEndTimeBean.second = map['second']; |
||||
return doEndTimeBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"hour": hour, |
||||
"minute": minute, |
||||
"nano": nano, |
||||
"second": second, |
||||
}; |
||||
} |
||||
|
||||
/// actInfo : {"couponDiscountAmount":0,"couponDiscountRate":0,"couponId":0,"couponType":0,"discountAmount":0,"discountRate":0,"promotionId":0,"promotionType":0} |
||||
/// applyPrice : 0 |
||||
/// batch : 0 |
||||
/// buyNum : 0 |
||||
/// discountAmount : 0 |
||||
/// discountPercent : 0 |
||||
/// id : 0 |
||||
/// isDelete : 0 |
||||
/// orderId : 0 |
||||
/// postPay : 0 |
||||
/// productId : 0 |
||||
/// productName : "" |
||||
/// reason : "" |
||||
/// refundNum : 0 |
||||
/// sellPrice : 0 |
||||
/// skuId : 0 |
||||
/// skuImg : "" |
||||
/// skuNameStr : "" |
||||
/// status : true |
||||
/// storeId : 0 |
||||
/// tenantCode : "" |
||||
/// type : 0 |
||||
/// weight : 0 |
||||
|
||||
class OrderProductListBean { |
||||
ActInfoBean actInfo; |
||||
int applyPrice; |
||||
int batch; |
||||
int buyNum; |
||||
int discountAmount; |
||||
int discountPercent; |
||||
int id; |
||||
int isDelete; |
||||
int orderId; |
||||
int postPay; |
||||
int productId; |
||||
String productName; |
||||
String reason; |
||||
int refundNum; |
||||
int sellPrice; |
||||
int skuId; |
||||
String skuImg; |
||||
String skuNameStr; |
||||
bool status; |
||||
int storeId; |
||||
String tenantCode; |
||||
int type; |
||||
int weight; |
||||
|
||||
static OrderProductListBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
OrderProductListBean orderProductListBean = OrderProductListBean(); |
||||
orderProductListBean.actInfo = ActInfoBean.fromJson(map['actInfo']); |
||||
orderProductListBean.applyPrice = map['applyPrice']; |
||||
orderProductListBean.batch = map['batch']; |
||||
orderProductListBean.buyNum = map['buyNum']; |
||||
orderProductListBean.discountAmount = map['discountAmount']; |
||||
orderProductListBean.discountPercent = map['discountPercent']; |
||||
orderProductListBean.id = map['id']; |
||||
orderProductListBean.isDelete = map['isDelete']; |
||||
orderProductListBean.orderId = map['orderId']; |
||||
orderProductListBean.postPay = map['postPay']; |
||||
orderProductListBean.productId = map['productId']; |
||||
orderProductListBean.productName = map['productName']; |
||||
orderProductListBean.reason = map['reason']; |
||||
orderProductListBean.refundNum = map['refundNum']; |
||||
orderProductListBean.sellPrice = map['sellPrice']; |
||||
orderProductListBean.skuId = map['skuId']; |
||||
orderProductListBean.skuImg = map['skuImg']; |
||||
orderProductListBean.skuNameStr = map['skuNameStr']; |
||||
orderProductListBean.status = map['status']; |
||||
orderProductListBean.storeId = map['storeId']; |
||||
orderProductListBean.tenantCode = map['tenantCode']; |
||||
orderProductListBean.type = map['type']; |
||||
orderProductListBean.weight = map['weight']; |
||||
return orderProductListBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"actInfo": actInfo, |
||||
"applyPrice": applyPrice, |
||||
"batch": batch, |
||||
"buyNum": buyNum, |
||||
"discountAmount": discountAmount, |
||||
"discountPercent": discountPercent, |
||||
"id": id, |
||||
"isDelete": isDelete, |
||||
"orderId": orderId, |
||||
"postPay": postPay, |
||||
"productId": productId, |
||||
"productName": productName, |
||||
"reason": reason, |
||||
"refundNum": refundNum, |
||||
"sellPrice": sellPrice, |
||||
"skuId": skuId, |
||||
"skuImg": skuImg, |
||||
"skuNameStr": skuNameStr, |
||||
"status": status, |
||||
"storeId": storeId, |
||||
"tenantCode": tenantCode, |
||||
"type": type, |
||||
"weight": weight, |
||||
}; |
||||
} |
||||
|
||||
/// couponDiscountAmount : 0 |
||||
/// couponDiscountRate : 0 |
||||
/// couponId : 0 |
||||
/// couponType : 0 |
||||
/// discountAmount : 0 |
||||
/// discountRate : 0 |
||||
/// promotionId : 0 |
||||
/// promotionType : 0 |
||||
|
||||
class ActInfoBean { |
||||
int couponDiscountAmount; |
||||
int couponDiscountRate; |
||||
int couponId; |
||||
int couponType; |
||||
int discountAmount; |
||||
int discountRate; |
||||
int promotionId; |
||||
int promotionType; |
||||
|
||||
static ActInfoBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
ActInfoBean actInfoBean = ActInfoBean(); |
||||
actInfoBean.couponDiscountAmount = map['couponDiscountAmount']; |
||||
actInfoBean.couponDiscountRate = map['couponDiscountRate']; |
||||
actInfoBean.couponId = map['couponId']; |
||||
actInfoBean.couponType = map['couponType']; |
||||
actInfoBean.discountAmount = map['discountAmount']; |
||||
actInfoBean.discountRate = map['discountRate']; |
||||
actInfoBean.promotionId = map['promotionId']; |
||||
actInfoBean.promotionType = map['promotionType']; |
||||
return actInfoBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"couponDiscountAmount": couponDiscountAmount, |
||||
"couponDiscountRate": couponDiscountRate, |
||||
"couponId": couponId, |
||||
"couponType": couponType, |
||||
"discountAmount": discountAmount, |
||||
"discountRate": discountRate, |
||||
"promotionId": promotionId, |
||||
"promotionType": promotionType, |
||||
}; |
||||
} |
||||
|
||||
/// addressId : 0 |
||||
/// age : 0 |
||||
/// balance : 0 |
||||
/// birth : "" |
||||
/// createTime : "" |
||||
/// headimg : "" |
||||
/// isBind : true |
||||
/// level : 0 |
||||
/// memberRankVo : {"id":0,"nextId":0,"nextName":"","nextOrigin":0,"rankContent":"","rankImg":"","rankName":"","rankOrigin":0,"status":true} |
||||
/// money : 0 |
||||
/// nickname : "" |
||||
/// phone : "" |
||||
/// points : 0 |
||||
/// remark : "" |
||||
/// sex : "" |
||||
/// userType : true |
||||
/// vipNo : "" |
||||
|
||||
class MemberVOBean { |
||||
int addressId; |
||||
int age; |
||||
int balance; |
||||
String birth; |
||||
String createTime; |
||||
String headimg; |
||||
bool isBind; |
||||
int level; |
||||
MemberRankVoBean memberRankVo; |
||||
int money; |
||||
String nickname; |
||||
String phone; |
||||
int points; |
||||
String remark; |
||||
String sex; |
||||
bool userType; |
||||
String vipNo; |
||||
|
||||
static MemberVOBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
MemberVOBean memberVOBean = MemberVOBean(); |
||||
memberVOBean.addressId = map['addressId']; |
||||
memberVOBean.age = map['age']; |
||||
memberVOBean.balance = map['balance']; |
||||
memberVOBean.birth = map['birth']; |
||||
memberVOBean.createTime = map['createTime']; |
||||
memberVOBean.headimg = map['headimg']; |
||||
memberVOBean.isBind = map['isBind']; |
||||
memberVOBean.level = map['level']; |
||||
memberVOBean.memberRankVo = MemberRankVoBean.fromJson(map['memberRankVo']); |
||||
memberVOBean.money = map['money']; |
||||
memberVOBean.nickname = map['nickname']; |
||||
memberVOBean.phone = map['phone']; |
||||
memberVOBean.points = map['points']; |
||||
memberVOBean.remark = map['remark']; |
||||
memberVOBean.sex = map['sex']; |
||||
memberVOBean.userType = map['userType']; |
||||
memberVOBean.vipNo = map['vipNo']; |
||||
return memberVOBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"addressId": addressId, |
||||
"age": age, |
||||
"balance": balance, |
||||
"birth": birth, |
||||
"createTime": createTime, |
||||
"headimg": headimg, |
||||
"isBind": isBind, |
||||
"level": level, |
||||
"memberRankVo": memberRankVo, |
||||
"money": money, |
||||
"nickname": nickname, |
||||
"phone": phone, |
||||
"points": points, |
||||
"remark": remark, |
||||
"sex": sex, |
||||
"userType": userType, |
||||
"vipNo": vipNo, |
||||
}; |
||||
} |
||||
|
||||
/// id : 0 |
||||
/// nextId : 0 |
||||
/// nextName : "" |
||||
/// nextOrigin : 0 |
||||
/// rankContent : "" |
||||
/// rankImg : "" |
||||
/// rankName : "" |
||||
/// rankOrigin : 0 |
||||
/// status : true |
||||
|
||||
class MemberRankVoBean { |
||||
int id; |
||||
int nextId; |
||||
String nextName; |
||||
int nextOrigin; |
||||
String rankContent; |
||||
String rankImg; |
||||
String rankName; |
||||
int rankOrigin; |
||||
bool status; |
||||
|
||||
static MemberRankVoBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
MemberRankVoBean memberRankVoBean = MemberRankVoBean(); |
||||
memberRankVoBean.id = map['id']; |
||||
memberRankVoBean.nextId = map['nextId']; |
||||
memberRankVoBean.nextName = map['nextName']; |
||||
memberRankVoBean.nextOrigin = map['nextOrigin']; |
||||
memberRankVoBean.rankContent = map['rankContent']; |
||||
memberRankVoBean.rankImg = map['rankImg']; |
||||
memberRankVoBean.rankName = map['rankName']; |
||||
memberRankVoBean.rankOrigin = map['rankOrigin']; |
||||
memberRankVoBean.status = map['status']; |
||||
return memberRankVoBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"id": id, |
||||
"nextId": nextId, |
||||
"nextName": nextName, |
||||
"nextOrigin": nextOrigin, |
||||
"rankContent": rankContent, |
||||
"rankImg": rankImg, |
||||
"rankName": rankName, |
||||
"rankOrigin": rankOrigin, |
||||
"status": status, |
||||
}; |
||||
} |
||||
|
||||
/// allProduct : true |
||||
/// bizId : "" |
||||
/// bizType : 0 |
||||
/// couponId : 0 |
||||
/// discountAmount : 0 |
||||
/// discountPercent : 0 |
||||
/// fullAmount : 0 |
||||
/// fullNumber : 0 |
||||
/// id : 0 |
||||
/// mid : 0 |
||||
/// productList : [{"applyPrice":0,"attrStyle":0,"categoryId":0,"groupId":0,"id":0,"isDelete":0,"materialId":0,"needLogistics":0,"oversold":0,"posShow":true,"price":0,"printerFlag":"","productCode":"","productName":"","productNumber":0,"productType":0,"sellCount":0,"sellDesc":"","setMeal":0,"shortName":"","status":0,"stock":0,"storeId":0,"supplierName":"","weight":0}] |
||||
/// promotionId : 0 |
||||
/// promotionName : "" |
||||
/// publishEndTime : "" |
||||
/// publishStartTime : "" |
||||
/// receiveTime : "" |
||||
/// status : 0 |
||||
/// storeId : 0 |
||||
/// tenantCode : "" |
||||
/// type : 0 |
||||
/// usable : true |
||||
/// useEndTime : "" |
||||
/// useStartTime : "" |
||||
/// useTime : "" |
||||
|
||||
class CouponListBean { |
||||
bool allProduct; |
||||
String bizId; |
||||
int bizType; |
||||
int couponId; |
||||
int discountAmount; |
||||
int discountPercent; |
||||
int fullAmount; |
||||
int fullNumber; |
||||
int id; |
||||
int mid; |
||||
List<ProductListBean> productList; |
||||
int promotionId; |
||||
String promotionName; |
||||
String publishEndTime; |
||||
String publishStartTime; |
||||
String receiveTime; |
||||
int status; |
||||
int storeId; |
||||
String tenantCode; |
||||
int type; |
||||
bool usable; |
||||
String useEndTime; |
||||
String useStartTime; |
||||
String useTime; |
||||
|
||||
static CouponListBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
CouponListBean couponListBean = CouponListBean(); |
||||
couponListBean.allProduct = map['allProduct']; |
||||
couponListBean.bizId = map['bizId']; |
||||
couponListBean.bizType = map['bizType']; |
||||
couponListBean.couponId = map['couponId']; |
||||
couponListBean.discountAmount = map['discountAmount']; |
||||
couponListBean.discountPercent = map['discountPercent']; |
||||
couponListBean.fullAmount = map['fullAmount']; |
||||
couponListBean.fullNumber = map['fullNumber']; |
||||
couponListBean.id = map['id']; |
||||
couponListBean.mid = map['mid']; |
||||
couponListBean.productList = List()..addAll( |
||||
(map['productList'] as List ?? []).map((o) => ProductListBean.fromJson(o)) |
||||
); |
||||
couponListBean.promotionId = map['promotionId']; |
||||
couponListBean.promotionName = map['promotionName']; |
||||
couponListBean.publishEndTime = map['publishEndTime']; |
||||
couponListBean.publishStartTime = map['publishStartTime']; |
||||
couponListBean.receiveTime = map['receiveTime']; |
||||
couponListBean.status = map['status']; |
||||
couponListBean.storeId = map['storeId']; |
||||
couponListBean.tenantCode = map['tenantCode']; |
||||
couponListBean.type = map['type']; |
||||
couponListBean.usable = map['usable']; |
||||
couponListBean.useEndTime = map['useEndTime']; |
||||
couponListBean.useStartTime = map['useStartTime']; |
||||
couponListBean.useTime = map['useTime']; |
||||
return couponListBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"allProduct": allProduct, |
||||
"bizId": bizId, |
||||
"bizType": bizType, |
||||
"couponId": couponId, |
||||
"discountAmount": discountAmount, |
||||
"discountPercent": discountPercent, |
||||
"fullAmount": fullAmount, |
||||
"fullNumber": fullNumber, |
||||
"id": id, |
||||
"mid": mid, |
||||
"productList": productList, |
||||
"promotionId": promotionId, |
||||
"promotionName": promotionName, |
||||
"publishEndTime": publishEndTime, |
||||
"publishStartTime": publishStartTime, |
||||
"receiveTime": receiveTime, |
||||
"status": status, |
||||
"storeId": storeId, |
||||
"tenantCode": tenantCode, |
||||
"type": type, |
||||
"usable": usable, |
||||
"useEndTime": useEndTime, |
||||
"useStartTime": useStartTime, |
||||
"useTime": useTime, |
||||
}; |
||||
} |
||||
|
||||
/// applyPrice : 0 |
||||
/// attrStyle : 0 |
||||
/// categoryId : 0 |
||||
/// groupId : 0 |
||||
/// id : 0 |
||||
/// isDelete : 0 |
||||
/// materialId : 0 |
||||
/// needLogistics : 0 |
||||
/// oversold : 0 |
||||
/// posShow : true |
||||
/// price : 0 |
||||
/// printerFlag : "" |
||||
/// productCode : "" |
||||
/// productName : "" |
||||
/// productNumber : 0 |
||||
/// productType : 0 |
||||
/// sellCount : 0 |
||||
/// sellDesc : "" |
||||
/// setMeal : 0 |
||||
/// shortName : "" |
||||
/// status : 0 |
||||
/// stock : 0 |
||||
/// storeId : 0 |
||||
/// supplierName : "" |
||||
/// weight : 0 |
||||
|
||||
class ProductListBean { |
||||
int applyPrice; |
||||
int attrStyle; |
||||
int categoryId; |
||||
int groupId; |
||||
int id; |
||||
int isDelete; |
||||
int materialId; |
||||
int needLogistics; |
||||
int oversold; |
||||
bool posShow; |
||||
int price; |
||||
String printerFlag; |
||||
String productCode; |
||||
String productName; |
||||
int productNumber; |
||||
int productType; |
||||
int sellCount; |
||||
String sellDesc; |
||||
int setMeal; |
||||
String shortName; |
||||
int status; |
||||
int stock; |
||||
int storeId; |
||||
String supplierName; |
||||
int weight; |
||||
|
||||
static ProductListBean fromJson(Map<String, dynamic> map) { |
||||
if (map == null) return null; |
||||
ProductListBean productListBean = ProductListBean(); |
||||
productListBean.applyPrice = map['applyPrice']; |
||||
productListBean.attrStyle = map['attrStyle']; |
||||
productListBean.categoryId = map['categoryId']; |
||||
productListBean.groupId = map['groupId']; |
||||
productListBean.id = map['id']; |
||||
productListBean.isDelete = map['isDelete']; |
||||
productListBean.materialId = map['materialId']; |
||||
productListBean.needLogistics = map['needLogistics']; |
||||
productListBean.oversold = map['oversold']; |
||||
productListBean.posShow = map['posShow']; |
||||
productListBean.price = map['price']; |
||||
productListBean.printerFlag = map['printerFlag']; |
||||
productListBean.productCode = map['productCode']; |
||||
productListBean.productName = map['productName']; |
||||
productListBean.productNumber = map['productNumber']; |
||||
productListBean.productType = map['productType']; |
||||
productListBean.sellCount = map['sellCount']; |
||||
productListBean.sellDesc = map['sellDesc']; |
||||
productListBean.setMeal = map['setMeal']; |
||||
productListBean.shortName = map['shortName']; |
||||
productListBean.status = map['status']; |
||||
productListBean.stock = map['stock']; |
||||
productListBean.storeId = map['storeId']; |
||||
productListBean.supplierName = map['supplierName']; |
||||
productListBean.weight = map['weight']; |
||||
return productListBean; |
||||
} |
||||
|
||||
Map toJson() => { |
||||
"applyPrice": applyPrice, |
||||
"attrStyle": attrStyle, |
||||
"categoryId": categoryId, |
||||
"groupId": groupId, |
||||
"id": id, |
||||
"isDelete": isDelete, |
||||
"materialId": materialId, |
||||
"needLogistics": needLogistics, |
||||
"oversold": oversold, |
||||
"posShow": posShow, |
||||
"price": price, |
||||
"printerFlag": printerFlag, |
||||
"productCode": productCode, |
||||
"productName": productName, |
||||
"productNumber": productNumber, |
||||
"productType": productType, |
||||
"sellCount": sellCount, |
||||
"sellDesc": sellDesc, |
||||
"setMeal": setMeal, |
||||
"shortName": shortName, |
||||
"status": status, |
||||
"stock": stock, |
||||
"storeId": storeId, |
||||
"supplierName": supplierName, |
||||
"weight": weight, |
||||
}; |
||||
} |
Loading…
Reference in new issue