Browse Source

safety

master
fmk 3 years ago
parent
commit
b25139adcb
  1. 70
      ios/Podfile.lock
  2. 45
      ios/Runner.xcodeproj/project.pbxproj
  3. 37
      lib/retrofit/data/base_data.g.dart
  4. 713
      lib/retrofit/data/min_order_info.dart
  5. 41
      lib/retrofit/data/page.g.dart
  6. 5
      lib/retrofit/data/placeOrderFirst.dart
  7. 9
      lib/retrofit/min_api.dart
  8. 338
      lib/retrofit/min_api.g.dart
  9. 1349
      lib/retrofit/retrofit_api.g.dart
  10. 119
      lib/settlement/settlement.dart
  11. 35
      lib/settlement/settlement_view/settlement_order_commodity.dart
  12. 2
      lib/store/store_order.dart
  13. 82
      lib/union/union_page.dart
  14. 18
      pubspec.yaml

70
ios/Podfile.lock

@ -1,4 +1,19 @@
PODS:
- AFNetworking (4.0.1):
- AFNetworking/NSURLSession (= 4.0.1)
- AFNetworking/Reachability (= 4.0.1)
- AFNetworking/Security (= 4.0.1)
- AFNetworking/Serialization (= 4.0.1)
- AFNetworking/UIKit (= 4.0.1)
- AFNetworking/NSURLSession (4.0.1):
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/Reachability (4.0.1)
- AFNetworking/Security (4.0.1)
- AFNetworking/Serialization (4.0.1)
- AFNetworking/UIKit (4.0.1):
- AFNetworking/NSURLSession
- BaiduMapKit/Base (6.2.0)
- BaiduMapKit/Map (6.2.0):
- BaiduMapKit/Base
@ -26,18 +41,19 @@ PODS:
- flutter_bmflocation (1.0.3):
- BMKLocationKit
- Flutter
- flutter_qr_reader (0.0.1):
- flutter_scankit (0.0.1):
- Flutter
- ScanKitFrameWork (~> 1.0.2.300)
- fluwx (0.0.1):
- Flutter
- WechatOpenSDK_Fuck (~> 1.9.2)
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- image_cropper (0.0.4):
- Flutter
- TOCropViewController (~> 2.6.0)
- image_picker (0.0.1):
- image_pickers (0.0.1):
- AFNetworking
- Flutter
- ZLPhotoBrowser-objc (= 1.0.4)
- mob_sharesdk (4.4.0):
- mob_sharesdk/ShareSDK (= 4.4.0)
- MOBFoundation (>= 3.2.9)
@ -68,6 +84,10 @@ PODS:
- Flutter
- "permission_handler (5.1.0+2)":
- Flutter
- ScanKitFrameWork (1.0.2.300)
- SDWebImage (5.12.1):
- SDWebImage/Core (= 5.12.1)
- SDWebImage/Core (5.12.1)
- shared_preferences (0.0.1):
- Flutter
- sharesdk_plugin (1.1.2):
@ -83,7 +103,6 @@ PODS:
- Flutter
- FMDB (>= 2.7.5)
- SSZipArchive (2.4.2)
- TOCropViewController (2.6.0)
- TPNS-iOS (1.3.3.0)
- tpns_flutter_plugin (1.1.2):
- Flutter
@ -96,6 +115,9 @@ PODS:
- Flutter
- webview_flutter (0.0.1):
- Flutter
- WechatOpenSDK_Fuck (1.9.2)
- ZLPhotoBrowser-objc (1.0.4):
- SDWebImage
DEPENDENCIES:
- Flutter (from `Flutter`)
@ -104,10 +126,9 @@ DEPENDENCIES:
- flutter_baidu_mapapi_search (from `.symlinks/plugins/flutter_baidu_mapapi_search/ios`)
- flutter_baidu_mapapi_utils (from `.symlinks/plugins/flutter_baidu_mapapi_utils/ios`)
- flutter_bmflocation (from `.symlinks/plugins/flutter_bmflocation/ios`)
- flutter_qr_reader (from `.symlinks/plugins/flutter_qr_reader/ios`)
- flutter_scankit (from `.symlinks/plugins/flutter_scankit/ios`)
- fluwx (from `.symlinks/plugins/fluwx/ios`)
- image_cropper (from `.symlinks/plugins/image_cropper/ios`)
- image_picker (from `.symlinks/plugins/image_picker/ios`)
- image_pickers (from `.symlinks/plugins/image_pickers/ios`)
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- permission_handler (from `.symlinks/plugins/permission_handler/ios`)
@ -123,14 +144,18 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- AFNetworking
- BaiduMapKit
- BMKLocationKit
- FMDB
- mob_sharesdk
- MOBFoundation
- ScanKitFrameWork
- SDWebImage
- SSZipArchive
- TOCropViewController
- TPNS-iOS
- WechatOpenSDK_Fuck
- ZLPhotoBrowser-objc
EXTERNAL SOURCES:
Flutter:
@ -145,14 +170,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_baidu_mapapi_utils/ios"
flutter_bmflocation:
:path: ".symlinks/plugins/flutter_bmflocation/ios"
flutter_qr_reader:
:path: ".symlinks/plugins/flutter_qr_reader/ios"
flutter_scankit:
:path: ".symlinks/plugins/flutter_scankit/ios"
fluwx:
:path: ".symlinks/plugins/fluwx/ios"
image_cropper:
:path: ".symlinks/plugins/image_cropper/ios"
image_picker:
:path: ".symlinks/plugins/image_picker/ios"
image_pickers:
:path: ".symlinks/plugins/image_pickers/ios"
package_info:
:path: ".symlinks/plugins/package_info/ios"
path_provider:
@ -177,6 +200,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/webview_flutter/ios"
SPEC CHECKSUMS:
AFNetworking: 7864c38297c79aaca1500c33288e429c3451fdce
BaiduMapKit: 907c6d9b74f66c3ff4741fc4b568ae0b339917f8
BMKLocationKit: 097814ef672b1e57e86e6c1968d7892fb78002bf
Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c
@ -185,28 +209,30 @@ SPEC CHECKSUMS:
flutter_baidu_mapapi_search: 4cffaa74e739a4114595c4f82f790e1783bb612d
flutter_baidu_mapapi_utils: a5bd582b91ecd35be1bc45558b38f49d5684f70a
flutter_bmflocation: 12f1ba91bae4b16d78d4f475023e0254ed351f1c
flutter_qr_reader: d930dde3b2cfe2b3d0bb7d66e5ff3e514300a5e5
fluwx: c64c2b84b965279aaa251a80b5b6a1cd0ef7bd45
flutter_scankit: 16936d86b3de3f83c122e763f4c24c5da214c78f
fluwx: c192ef1ea3617badb813fa1a761ffc5c9c12208a
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_cropper: f1668dd8d2cad2d357955caad15a40547856edcb
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
image_pickers: 25c8916d358bc9d2707cb470ba3d57497f105773
mob_sharesdk: c771f001e00739d24301a9fa250247601efe7a3c
MOBFoundation: 2abd23c80c33d1337d30dc4b0018ed914cef8f8e
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259
permission_handler: ccb20a9fad0ee9b1314a52b70b76b473c5f8dab0
ScanKitFrameWork: 0ad578f3db0ef9b64dd0f533d10d10a52ce93c80
SDWebImage: 4dc3e42d9ec0c1028b960a33ac6b637bb432207b
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sharesdk_plugin: 6d6634bb480174b607030f19fc9d84d68cfbf326
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
SSZipArchive: e7b4f3d9e780c2acc1764cd88fbf2de28f26e5b2
TOCropViewController: 3105367e808b7d3d886a74ff59bf4804e7d3ab38
TPNS-iOS: 57a146496858ba2fb5d43e5f240feb19243b69cb
tpns_flutter_plugin: a366649c8ad71f19dfb864d3c994ed0480b69daa
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
video_player: 9cc823b1d9da7e8427ee591e8438bfbcde500e6e
wakelock: bfc7955c418d0db797614075aabbc58a39ab5107
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
WechatOpenSDK_Fuck: aa8f4b0af902837e887a1d40c62f06c060c1dc98
ZLPhotoBrowser-objc: c7657d3bc85ae231884e058d0e3638f619164736
PODFILE CHECKSUM: 7092aa3092b9508e0ccea9e76cd5fa33505dbb46
COCOAPODS: 1.10.1
COCOAPODS: 1.11.2

45
ios/Runner.xcodeproj/project.pbxproj

@ -657,6 +657,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
120EAF7195D9AB3BB1E8FA2B /* [CP] Copy Pods Resources */,
8ADBB1E9F51ACB25060865A4 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -763,6 +764,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
8ADBB1E9F51ACB25060865A4 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@ -892,7 +910,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -935,8 +953,7 @@
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"",
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"",
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"",
"\"${PODS_ROOT}/Headers/Public/image_cropper\"",
"\"${PODS_ROOT}/Headers/Public/image_picker\"",
"\"${PODS_ROOT}/Headers/Public/image_pickers\"",
"\"${PODS_ROOT}/Headers/Public/path_provider\"",
"\"${PODS_ROOT}/Headers/Public/permission_handler\"",
"\"${PODS_ROOT}/Headers/Public/shared_preferences\"",
@ -949,6 +966,7 @@
"\"${PODS_ROOT}/Headers/Private/fluwx\"",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -966,8 +984,7 @@
"$(inherited)",
"-ObjC",
"-l\"c++\"",
"-l\"image_cropper\"",
"-l\"image_picker\"",
"-l\"image_pickers\"",
"-l\"path_provider\"",
"-l\"flutter_bmflocation\"",
"-l\"flutter_baidu_mapapi_utils\"",
@ -1078,7 +1095,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@ -1128,7 +1145,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@ -1171,8 +1188,7 @@
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"",
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"",
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"",
"\"${PODS_ROOT}/Headers/Public/image_cropper\"",
"\"${PODS_ROOT}/Headers/Public/image_picker\"",
"\"${PODS_ROOT}/Headers/Public/image_pickers\"",
"\"${PODS_ROOT}/Headers/Public/path_provider\"",
"\"${PODS_ROOT}/Headers/Public/permission_handler\"",
"\"${PODS_ROOT}/Headers/Public/shared_preferences\"",
@ -1185,6 +1201,7 @@
"\"${PODS_ROOT}/Headers/Private/fluwx\"",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -1202,8 +1219,7 @@
"$(inherited)",
"-ObjC",
"-l\"c++\"",
"-l\"image_cropper\"",
"-l\"image_picker\"",
"-l\"image_pickers\"",
"-l\"path_provider\"",
"-l\"flutter_bmflocation\"",
"-l\"flutter_baidu_mapapi_utils\"",
@ -1300,8 +1316,7 @@
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_search\"",
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_map\"",
"\"${PODS_ROOT}/Headers/Public/flutter_baidu_mapapi_base\"",
"\"${PODS_ROOT}/Headers/Public/image_cropper\"",
"\"${PODS_ROOT}/Headers/Public/image_picker\"",
"\"${PODS_ROOT}/Headers/Public/image_pickers\"",
"\"${PODS_ROOT}/Headers/Public/path_provider\"",
"\"${PODS_ROOT}/Headers/Public/permission_handler\"",
"\"${PODS_ROOT}/Headers/Public/shared_preferences\"",
@ -1314,6 +1329,7 @@
"\"${PODS_ROOT}/Headers/Private/fluwx\"",
);
INFOPLIST_FILE = Runner/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
@ -1331,8 +1347,7 @@
"$(inherited)",
"-ObjC",
"-l\"c++\"",
"-l\"image_cropper\"",
"-l\"image_picker\"",
"-l\"image_pickers\"",
"-l\"path_provider\"",
"-l\"flutter_bmflocation\"",
"-l\"flutter_baidu_mapapi_utils\"",

37
lib/retrofit/data/base_data.g.dart

@ -1,37 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'base_data.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
BaseData<T> _$BaseDataFromJson<T>(
Map<String, dynamic> json,
T Function(Object json) fromJsonT,
) {
return BaseData<T>()
..code = json['code'] as int
..data = fromJsonT(json['data'])
..extra = json['extra']
..isError = json['isError'] as bool
..isSuccess = json['isSuccess'] as bool
..msg = json['msg'] as String
..path = json['path'] as String
..timestamp = json['timestamp'] as String;
}
Map<String, dynamic> _$BaseDataToJson<T>(
BaseData<T> instance,
Object Function(T value) toJsonT,
) =>
<String, dynamic>{
'code': instance.code,
'data': toJsonT(instance.data),
'extra': instance.extra,
'isError': instance.isError,
'isSuccess': instance.isSuccess,
'msg': instance.msg,
'path': instance.path,
'timestamp': instance.timestamp,
};

713
lib/retrofit/data/min_order_info.dart

@ -0,0 +1,713 @@
import 'package:huixiang/retrofit/data/order_product_vo.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
class MinOrderInfo {
MinOrderInfo({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String tenantCode,
String storeId,
String storeName,
String tableId,
int orderType,
bool clearTable,
String mid,
String parentId,
String parentCode,
String orderCode,
String dayFlowCode,
int orderStatus,
int sendStatus,
int payStatus,
String memberAccount,
String logisticsId,
String shipperCode,
String logisticsName,
String logisticsNum,
dynamic logisticsCase,
int refundStatus,
dynamic addressExt,
String postFee,
String orderSum,
String paySum,
String paySumSub,
String accountPay,
String couponSubPrice,
String customPrice,
String removeDecimal,
bool isSubscribe,
dynamic subcribeTime,
dynamic sendTime,
dynamic confirmTime,
dynamic returnMoneyTime,
String notes,
dynamic prepayId,
dynamic payTime,
int payChannel,
dynamic payNum,
String promotionId,
String couponId,
int isDelete,
int isTakeOut,
int batch,
String orderDiscountPrice,
String dishesDiscountPrice,
String orderPercentPrice,
String finalPayPrice,
String activityNoPrice,
String activityDiscountPrice,
String totalDiscountPrice,
int orderSource,
dynamic address,
dynamic discountPercent,
dynamic discountAmount,
dynamic discountType,
dynamic discountMoney,
dynamic overTime,
List<OrderProductListBean> orderProductVOList,
dynamic moneyReturnList,
dynamic goodsReturnList,
dynamic moneyReturnVOList,
dynamic goodsReturnVOList,
dynamic moneyReturnActionHistoryList,
dynamic goodsReturnActionHistoryList,
String currentTime,
dynamic tablePrice,
String tableName,
String balance,
String money,
dynamic prodNum,
bool onCredit,
OrderInfoVo orderInfoVo,
String endPayTime,
String orderSumPrice,}){
this.id = id;
this.createTime = createTime;
this.createUser = createUser;
this.updateTime = updateTime;
this.updateUser = updateUser;
this.tenantCode = tenantCode;
this.storeId = storeId;
this.storeName = storeName;
this.tableId = tableId;
this.orderType = orderType;
this.clearTable = clearTable;
this.mid = mid;
this.parentId = parentId;
this.parentCode = parentCode;
this.orderCode = orderCode;
this.dayFlowCode = dayFlowCode;
this.orderStatus = orderStatus;
this.sendStatus = sendStatus;
this.payStatus = payStatus;
this.memberAccount = memberAccount;
this.logisticsId = logisticsId;
this.shipperCode = shipperCode;
this.logisticsName = logisticsName;
this.logisticsNum = logisticsNum;
this.logisticsCase = logisticsCase;
this.refundStatus = refundStatus;
this.addressExt = addressExt;
this.postFee = postFee;
this.orderSum = orderSum;
this.paySum = paySum;
this.paySumSub = paySumSub;
this.accountPay = accountPay;
this.couponSubPrice = couponSubPrice;
this.customPrice = customPrice;
this.removeDecimal = removeDecimal;
this.isSubscribe = isSubscribe;
this.subcribeTime = subcribeTime;
this.sendTime = sendTime;
this.confirmTime = confirmTime;
this.returnMoneyTime = returnMoneyTime;
this.notes = notes;
this.prepayId = prepayId;
this.payTime = payTime;
this.payChannel = payChannel;
this.payNum = payNum;
this.promotionId = promotionId;
this.couponId = couponId;
this.isDelete = isDelete;
this.isTakeOut = isTakeOut;
this.batch = batch;
this.orderDiscountPrice = orderDiscountPrice;
this.dishesDiscountPrice = dishesDiscountPrice;
this.orderPercentPrice = orderPercentPrice;
this.finalPayPrice = finalPayPrice;
this.activityNoPrice = activityNoPrice;
this.activityDiscountPrice = activityDiscountPrice;
this.totalDiscountPrice = totalDiscountPrice;
this.orderSource = orderSource;
this.address = address;
this.discountPercent = discountPercent;
this.discountAmount = discountAmount;
this.discountType = discountType;
this.discountMoney = discountMoney;
this.overTime = overTime;
this.orderProductVOList = orderProductVOList;
this.moneyReturnList = moneyReturnList;
this.goodsReturnList = goodsReturnList;
this.moneyReturnVOList = moneyReturnVOList;
this.goodsReturnVOList = goodsReturnVOList;
this.moneyReturnActionHistoryList = moneyReturnActionHistoryList;
this.goodsReturnActionHistoryList = goodsReturnActionHistoryList;
this.currentTime = currentTime;
this.tablePrice = tablePrice;
this.tableName = tableName;
this.balance = balance;
this.money = money;
this.prodNum = prodNum;
this.onCredit = onCredit;
this.orderInfoVo = orderInfoVo;
this.endPayTime = endPayTime;
this.orderSumPrice = orderSumPrice;
}
MinOrderInfo.fromJson(dynamic json) {
this.id = json['id'];
this.createTime = json['createTime'];
this.createUser = json['createUser'];
this.updateTime = json['updateTime'];
this.updateUser = json['updateUser'];
this.tenantCode = json['tenantCode'];
this.storeId = json['storeId'];
this.storeName = json['storeName'];
this.tableId = json['tableId'];
this.orderType = json['orderType'];
this.clearTable = json['clearTable'];
this.mid = json['mid'];
this.parentId = json['parentId'];
this.parentCode = json['parentCode'];
this.orderCode = json['orderCode'];
this.dayFlowCode = json['dayFlowCode'];
this.orderStatus = json['orderStatus'];
this.sendStatus = json['sendStatus'];
this.payStatus = json['payStatus'];
this.memberAccount = json['memberAccount'];
this.logisticsId = json['logisticsId'];
this.shipperCode = json['shipperCode'];
this.logisticsName = json['logisticsName'];
this.logisticsNum = json['logisticsNum'];
this.logisticsCase = json['logisticsCase'];
this.refundStatus = json['refundStatus'];
this.addressExt = json['addressExt'];
this.postFee = json['postFee'];
this.orderSum = json['orderSum'];
this.paySum = json['paySum'];
this.paySumSub = json['paySumSub'];
this.accountPay = json['accountPay'];
this.couponSubPrice = json['couponSubPrice'];
this.customPrice = json['customPrice'];
this.removeDecimal = json['removeDecimal'];
this.isSubscribe = json['isSubscribe'];
this.subcribeTime = json['subcribeTime'];
this.sendTime = json['sendTime'];
this.confirmTime = json['confirmTime'];
this.returnMoneyTime = json['returnMoneyTime'];
this.notes = json['notes'];
this.prepayId = json['prepayId'];
this.payTime = json['payTime'];
this.payChannel = json['payChannel'];
this.payNum = json['payNum'];
this.promotionId = json['promotionId'];
this.couponId = json['couponId'];
this.isDelete = json['isDelete'];
this.isTakeOut = json['isTakeOut'];
this.batch = json['batch'];
this.orderDiscountPrice = json['orderDiscountPrice'];
this.dishesDiscountPrice = json['dishesDiscountPrice'];
this.orderPercentPrice = json['orderPercentPrice'];
this.finalPayPrice = json['finalPayPrice'];
this.activityNoPrice = json['activityNoPrice'];
this.activityDiscountPrice = json['activityDiscountPrice'];
this.totalDiscountPrice = json['totalDiscountPrice'];
this.orderSource = json['orderSource'];
this.address = json['address'];
this.discountPercent = json['discountPercent'];
this.discountAmount = json['discountAmount'];
this.discountType = json['discountType'];
this.discountMoney = json['discountMoney'];
this.overTime = json['overTime'];
if (json['orderProductVOList'] != null) {
this.orderProductVOList = [];
json['orderProductVOList'].forEach((v) {
this.orderProductVOList.add(OrderProductListBean.fromJson(v));
});
}
this.moneyReturnList = json['moneyReturnList'];
this.goodsReturnList = json['goodsReturnList'];
this.moneyReturnVOList = json['moneyReturnVOList'];
this.goodsReturnVOList = json['goodsReturnVOList'];
this.moneyReturnActionHistoryList = json['moneyReturnActionHistoryList'];
this.goodsReturnActionHistoryList = json['goodsReturnActionHistoryList'];
this.currentTime = json['currentTime'];
this.tablePrice = json['tablePrice'];
this.tableName = json['tableName'];
this.balance = json['balance'];
this.money = json['money'];
this.prodNum = json['prodNum'];
this.onCredit = json['onCredit'];
this.orderInfoVo = json['orderInfoVo'] != null ? OrderInfoVo.fromJson(json['orderInfoVo']) : null;
this.endPayTime = json['endPayTime'];
this.orderSumPrice = json['orderSumPrice'];
}
String id;
String createTime;
String createUser;
String updateTime;
String updateUser;
String tenantCode;
String storeId;
String storeName;
String tableId;
int orderType;
bool clearTable;
String mid;
String parentId;
String parentCode;
String orderCode;
String dayFlowCode;
int orderStatus;
int sendStatus;
int payStatus;
String memberAccount;
String logisticsId;
String shipperCode;
String logisticsName;
String logisticsNum;
dynamic logisticsCase;
int refundStatus;
dynamic addressExt;
String postFee;
String orderSum;
String paySum;
String paySumSub;
String accountPay;
String couponSubPrice;
String customPrice;
String removeDecimal;
bool isSubscribe;
dynamic subcribeTime;
dynamic sendTime;
dynamic confirmTime;
dynamic returnMoneyTime;
String notes;
dynamic prepayId;
dynamic payTime;
int payChannel;
dynamic payNum;
String promotionId;
String couponId;
int isDelete;
int isTakeOut;
int batch;
String orderDiscountPrice;
String dishesDiscountPrice;
String orderPercentPrice;
String finalPayPrice;
String activityNoPrice;
String activityDiscountPrice;
String totalDiscountPrice;
int orderSource;
dynamic address;
dynamic discountPercent;
dynamic discountAmount;
dynamic discountType;
dynamic discountMoney;
dynamic overTime;
List<OrderProductListBean> orderProductVOList;
dynamic moneyReturnList;
dynamic goodsReturnList;
dynamic moneyReturnVOList;
dynamic goodsReturnVOList;
dynamic moneyReturnActionHistoryList;
dynamic goodsReturnActionHistoryList;
String currentTime;
dynamic tablePrice;
String tableName;
String balance;
String money;
dynamic prodNum;
bool onCredit;
OrderInfoVo orderInfoVo;
String endPayTime;
String orderSumPrice;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = this.id;
map['createTime'] = this.createTime;
map['createUser'] = this.createUser;
map['updateTime'] = this.updateTime;
map['updateUser'] = this.updateUser;
map['tenantCode'] = this.tenantCode;
map['storeId'] = this.storeId;
map['storeName'] = this.storeName;
map['tableId'] = this.tableId;
map['orderType'] = this.orderType;
map['clearTable'] = this.clearTable;
map['mid'] = this.mid;
map['parentId'] = this.parentId;
map['parentCode'] = this.parentCode;
map['orderCode'] = this.orderCode;
map['dayFlowCode'] = this.dayFlowCode;
map['orderStatus'] = this.orderStatus;
map['sendStatus'] = this.sendStatus;
map['payStatus'] = this.payStatus;
map['memberAccount'] = this.memberAccount;
map['logisticsId'] = this.logisticsId;
map['shipperCode'] = this.shipperCode;
map['logisticsName'] = this.logisticsName;
map['logisticsNum'] = this.logisticsNum;
map['logisticsCase'] = this.logisticsCase;
map['refundStatus'] = this.refundStatus;
map['addressExt'] = this.addressExt;
map['postFee'] = this.postFee;
map['orderSum'] = this.orderSum;
map['paySum'] = this.paySum;
map['paySumSub'] = this.paySumSub;
map['accountPay'] = this.accountPay;
map['couponSubPrice'] = this.couponSubPrice;
map['customPrice'] = this.customPrice;
map['removeDecimal'] = this.removeDecimal;
map['isSubscribe'] = this.isSubscribe;
map['subcribeTime'] = this.subcribeTime;
map['sendTime'] = this.sendTime;
map['confirmTime'] = this.confirmTime;
map['returnMoneyTime'] = this.returnMoneyTime;
map['notes'] = this.notes;
map['prepayId'] = this.prepayId;
map['payTime'] = this.payTime;
map['payChannel'] = this.payChannel;
map['payNum'] = this.payNum;
map['promotionId'] = this.promotionId;
map['couponId'] = this.couponId;
map['isDelete'] = this.isDelete;
map['isTakeOut'] = this.isTakeOut;
map['batch'] = this.batch;
map['orderDiscountPrice'] = this.orderDiscountPrice;
map['dishesDiscountPrice'] = this.dishesDiscountPrice;
map['orderPercentPrice'] = this.orderPercentPrice;
map['finalPayPrice'] = this.finalPayPrice;
map['activityNoPrice'] = this.activityNoPrice;
map['activityDiscountPrice'] = this.activityDiscountPrice;
map['totalDiscountPrice'] = this.totalDiscountPrice;
map['orderSource'] = this.orderSource;
map['address'] = this.address;
map['discountPercent'] = this.discountPercent;
map['discountAmount'] = this.discountAmount;
map['discountType'] = this.discountType;
map['discountMoney'] = this.discountMoney;
map['overTime'] = this.overTime;
if (this.orderProductVOList != null) {
map['orderProductVOList'] = this.orderProductVOList.map((v) => v.toJson()).toList();
}
map['moneyReturnList'] = this.moneyReturnList;
map['goodsReturnList'] = this.goodsReturnList;
map['moneyReturnVOList'] = this.moneyReturnVOList;
map['goodsReturnVOList'] = this.goodsReturnVOList;
map['moneyReturnActionHistoryList'] = this.moneyReturnActionHistoryList;
map['goodsReturnActionHistoryList'] = this.goodsReturnActionHistoryList;
map['currentTime'] = this.currentTime;
map['tablePrice'] = this.tablePrice;
map['tableName'] = this.tableName;
map['balance'] = this.balance;
map['money'] = this.money;
map['prodNum'] = this.prodNum;
map['onCredit'] = this.onCredit;
if (this.orderInfoVo != null) {
map['orderInfoVo'] = this.orderInfoVo.toJson();
}
map['endPayTime'] = this.endPayTime;
map['orderSumPrice'] = this.orderSumPrice;
return map;
}
}
/// orderNum : 0
/// productNum : 0
/// mins : 1
/// memberVO : {"vipNo":"1406879717390286848","nickname":"","headimg":"","userType":true,"sex":"0","level":1,"addressId":null,"remark":null,"phone":"15827991714","createTime":"2021-07-10 15:44:23","birth":"1993-02-19","balance":"0.00","money":"9999608.09","points":"1147","isBind":true,"memberRankVo":{"id":"1402947503522840576","rankName":"黄金会员","rankOrigin":8888,"rankContent":"","rankImg":"","status":true,"nextId":"1402947503522840577","nextName":"钻石会员","nextOrigin":null},"age":28}
/// postAge : "0.00"
/// price : "208.00"
/// orderSum : "208.00"
/// discountAmount : null
/// promotionInfoList : null
/// couponList : null
/// threshold : "0"
/// freePostAge : "0"
/// orderProductList : null
class OrderInfoVo {
OrderInfoVo({
int orderNum,
int productNum,
int mins,
MemberVO memberVO,
String postAge,
String price,
String orderSum,
dynamic discountAmount,
dynamic promotionInfoList,
dynamic couponList,
String threshold,
String freePostAge,
dynamic orderProductList,}){
this.orderNum = orderNum;
this.productNum = productNum;
this.mins = mins;
this.memberVO = memberVO;
this.postAge = postAge;
this.price = price;
this.orderSum = orderSum;
this.discountAmount = discountAmount;
this.promotionInfoList = promotionInfoList;
this.couponList = couponList;
this.threshold = threshold;
this.freePostAge = freePostAge;
this.orderProductList = orderProductList;
}
OrderInfoVo.fromJson(dynamic json) {
this.orderNum = json['orderNum'];
this.productNum = json['productNum'];
this.mins = json['mins'];
this.memberVO = json['memberVO'] != null ? MemberVO.fromJson(json['memberVO']) : null;
this.postAge = json['postAge'];
this.price = json['price'];
this.orderSum = json['orderSum'];
this.discountAmount = json['discountAmount'];
this.promotionInfoList = json['promotionInfoList'];
this.couponList = json['couponList'];
this.threshold = json['threshold'];
this.freePostAge = json['freePostAge'];
this.orderProductList = json['orderProductList'];
}
int orderNum;
int productNum;
int mins;
MemberVO memberVO;
String postAge;
String price;
String orderSum;
dynamic discountAmount;
dynamic promotionInfoList;
dynamic couponList;
String threshold;
String freePostAge;
dynamic orderProductList;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['orderNum'] = this.orderNum;
map['productNum'] = this.productNum;
map['mins'] = this.mins;
if (this.memberVO != null) {
map['memberVO'] = this.memberVO.toJson();
}
map['postAge'] = this.postAge;
map['price'] = this.price;
map['orderSum'] = this.orderSum;
map['discountAmount'] = this.discountAmount;
map['promotionInfoList'] = this.promotionInfoList;
map['couponList'] = this.couponList;
map['threshold'] = this.threshold;
map['freePostAge'] = this.freePostAge;
map['orderProductList'] = this.orderProductList;
return map;
}
}
/// vipNo : "1406879717390286848"
/// nickname : ""
/// headimg : ""
/// userType : true
/// sex : "0"
/// level : 1
/// addressId : null
/// remark : null
/// phone : "15827991714"
/// createTime : "2021-07-10 15:44:23"
/// birth : "1993-02-19"
/// balance : "0.00"
/// money : "9999608.09"
/// points : "1147"
/// isBind : true
/// memberRankVo : {"id":"1402947503522840576","rankName":"黄金会员","rankOrigin":8888,"rankContent":"","rankImg":"","status":true,"nextId":"1402947503522840577","nextName":"钻石会员","nextOrigin":null}
/// age : 28
class MemberVO {
MemberVO({
String vipNo,
String nickname,
String headimg,
bool userType,
String sex,
int level,
dynamic addressId,
dynamic remark,
String phone,
String createTime,
String birth,
String balance,
String money,
String points,
bool isBind,
MemberRankVo memberRankVo,
int age,}){
this.vipNo = vipNo;
this.nickname = nickname;
this.headimg = headimg;
this.userType = userType;
this.sex = sex;
this.level = level;
this.addressId = addressId;
this.remark = remark;
this.phone = phone;
this.createTime = createTime;
this.birth = birth;
this.balance = balance;
this.money = money;
this.points = points;
this.isBind = isBind;
this.memberRankVo = memberRankVo;
this.age = age;
}
MemberVO.fromJson(dynamic json) {
this.vipNo = json['vipNo'];
this.nickname = json['nickname'];
this.headimg = json['headimg'];
this.userType = json['userType'];
this.sex = json['sex'];
this.level = json['level'];
this.addressId = json['addressId'];
this.remark = json['remark'];
this.phone = json['phone'];
this.createTime = json['createTime'];
this.birth = json['birth'];
this.balance = json['balance'];
this.money = json['money'];
this.points = json['points'];
this.isBind = json['isBind'];
this.memberRankVo = json['memberRankVo'] != null ? MemberRankVo.fromJson(json['memberRankVo']) : null;
this.age = json['age'];
}
String vipNo;
String nickname;
String headimg;
bool userType;
String sex;
int level;
dynamic addressId;
dynamic remark;
String phone;
String createTime;
String birth;
String balance;
String money;
String points;
bool isBind;
MemberRankVo memberRankVo;
int age;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['vipNo'] = this.vipNo;
map['nickname'] = this.nickname;
map['headimg'] = this.headimg;
map['userType'] = this.userType;
map['sex'] = this.sex;
map['level'] = this.level;
map['addressId'] = this.addressId;
map['remark'] = this.remark;
map['phone'] = this.phone;
map['createTime'] = this.createTime;
map['birth'] = this.birth;
map['balance'] = this.balance;
map['money'] = this.money;
map['points'] = this.points;
map['isBind'] = this.isBind;
if (this.memberRankVo != null) {
map['memberRankVo'] = this.memberRankVo.toJson();
}
map['age'] = this.age;
return map;
}
}
/// id : "1402947503522840576"
/// rankName : "黄金会员"
/// rankOrigin : 8888
/// rankContent : ""
/// rankImg : ""
/// status : true
/// nextId : "1402947503522840577"
/// nextName : "钻石会员"
/// nextOrigin : null
class MemberRankVo {
MemberRankVo({
String id,
String rankName,
int rankOrigin,
String rankContent,
String rankImg,
bool status,
String nextId,
String nextName,
dynamic nextOrigin,}){
this.id = id;
this.rankName = rankName;
this.rankOrigin = rankOrigin;
this.rankContent = rankContent;
this.rankImg = rankImg;
this.status = status;
this.nextId = nextId;
this.nextName = nextName;
this.nextOrigin = nextOrigin;
}
MemberRankVo.fromJson(dynamic json) {
this.id = json['id'];
this.rankName = json['rankName'];
this.rankOrigin = json['rankOrigin'];
this.rankContent = json['rankContent'];
this.rankImg = json['rankImg'];
this.status = json['status'];
this.nextId = json['nextId'];
this.nextName = json['nextName'];
this.nextOrigin = json['nextOrigin'];
}
String id;
String rankName;
int rankOrigin;
String rankContent;
String rankImg;
bool status;
String nextId;
String nextName;
dynamic nextOrigin;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = this.id;
map['rankName'] = this.rankName;
map['rankOrigin'] = this.rankOrigin;
map['rankContent'] = this.rankContent;
map['rankImg'] = this.rankImg;
map['status'] = this.status;
map['nextId'] = this.nextId;
map['nextName'] = this.nextName;
map['nextOrigin'] = this.nextOrigin;
return map;
}
}

41
lib/retrofit/data/page.g.dart

@ -1,41 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'page.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
PageInfo<D> _$PageInfoFromJson<D>(
Map<String, dynamic> json,
D Function(Object json) fromJsonD,
) {
return PageInfo<D>()
..pageNum = json['pageNum'] as int
..current = json['current']
..pageSize = json['pageSize'] as int
..size = json['size']
..pages = json['pages']
..hasPreviousPage = json['hasPreviousPage'] as bool
..hasNextPage = json['hasNextPage'] as bool
..total = json['total'] as String
..list = (json['list'] as List)?.map(fromJsonD)?.toList()
..records = (json['records'] as List)?.map(fromJsonD)?.toList();
}
Map<String, dynamic> _$PageInfoToJson<D>(
PageInfo<D> instance,
Object Function(D value) toJsonD,
) =>
<String, dynamic>{
'pageNum': instance.pageNum,
'current': instance.current,
'pageSize': instance.pageSize,
'size': instance.size,
'pages': instance.pages,
'hasPreviousPage': instance.hasPreviousPage,
'hasNextPage': instance.hasNextPage,
'total': instance.total,
'list': instance.list?.map(toJsonD)?.toList(),
'records': instance.records?.map(toJsonD)?.toList(),
};

5
lib/retrofit/data/placeOrderFirst.dart

@ -1,5 +1,6 @@
import 'package:huixiang/retrofit/data/down_order.dart';
import 'package:huixiang/retrofit/data/order_product_vo.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/retrofit/data/shoppingCart.dart';
class PlaceOrderFirst {
@ -20,7 +21,7 @@ class PlaceOrderFirst {
PromotionInfoDTOBean promotionInfoDTO;
String recMobile;
List<OrderProductVOList> orderProductVOList;
List<ShoppingCartSkuItemListBean> shoppingCartSkuItemList;
List<OrderProductListBean> shoppingCartSkuItemList;
List<dynamic> skuItemDTOList;
num source;
String storeId;
@ -75,7 +76,7 @@ class PlaceOrderFirst {
placeOrderFirst.recMobile = json['recMobile'];
placeOrderFirst.shoppingCartSkuItemList = []..addAll(
(json['shoppingCartSkuItemList'] as List ?? [])
.map((o) => ShoppingCartSkuItemListBean.fromJson(o)));
.map((o) => OrderProductListBean.fromJson(o)));
placeOrderFirst.orderProductVOList = []..addAll(
(json['orderProductVOList'] as List ?? [])
.map((o) => OrderProductVOList.fromJson(o)));

9
lib/retrofit/min_api.dart

@ -10,6 +10,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/address.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/down_order.dart';
import 'package:huixiang/retrofit/data/min_order_info.dart';
import 'package:huixiang/retrofit/data/placeOrderFirst.dart';
import 'package:huixiang/retrofit/data/settlement_bean.dart';
import 'package:huixiang/retrofit/data/wx_pay.dart';
@ -166,6 +167,10 @@ abstract class MinApiService {
@POST("order/getOrderInfo")
Future<BaseData<SettleOrderInfo>> getOrderInfo(@Body() Map<String, dynamic> param);
///
@POST("order/getOrderDetail")
Future<BaseData<MinOrderInfo>> getOrderDetails(@Body() Map<String, dynamic> param);
///
@GET("address/queryMemberAddress")
Future<BaseData<List<Address>>> queryAddress();
@ -174,6 +179,10 @@ abstract class MinApiService {
@POST("order/placeOrderFirst")
Future<BaseData<DownOrder>> placeOrderFirst(@Body() Map<String, dynamic> param);
///
@POST("order/addOrder")
Future<BaseData<DownOrder>> addOrder(@Body() Map<String, dynamic> param);
///
@POST("order/settlement")
Future<BaseData<WxPay>> settlementWx(@Body() Map<String, dynamic> param);

338
lib/retrofit/min_api.g.dart

@ -1,338 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'min_api.dart';
// **************************************************************************
// RetrofitGenerator
// **************************************************************************
class _MinApiService implements MinApiService {
_MinApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= 'http://192.168.10.236:8765/app/';
}
final Dio _dio;
String baseUrl;
@override
Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'product/findMiNiGroupList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<FindMiNiGroupList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<FindMiNiGroupList>(
(i) => FindMiNiGroupList.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<MiNiDetail>> miNiDetail(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/product/queryMiNiProductDetail?id=$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<MiNiDetail>.fromJson(
_result.data,
(json) => MiNiDetail.fromJson(json),
);
return value;
}
@override
Future<BaseData<List<ShoppingCart>>> addShoppingCart(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('shoppingcart',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<List<ShoppingCart>>> getShoppingCart(tableId) async {
ArgumentError.checkNotNull(tableId, 'tableId');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{r'tableId': tableId};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>('shoppingcart',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<bool>> clearShoppingCart() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'shoppingcart/delCart',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<bool>.fromJson(
_result.data,
(json) => json as bool,
);
return value;
}
@override
Future<BaseData<List<ShoppingCart>>> shoppingCart1(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('shoppingcart',
queryParameters: queryParameters,
options: RequestOptions(
method: 'PUT',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<List<ShoppingCart>>> shoppingCartSingle(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'shoppingcart/single',
queryParameters: queryParameters,
options: RequestOptions(
method: 'PUT',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<ShoppingCart>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<ShoppingCart>(
(i) => ShoppingCart.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<SettleOrderInfo>> getOrderInfo(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'order/getOrderInfo',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<SettleOrderInfo>.fromJson(
_result.data,
(json) => SettleOrderInfo.fromJson(json),
);
return value;
}
@override
Future<BaseData<List<Address>>> queryAddress() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'address/queryMemberAddress',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<Address>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<Address>((i) => Address.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
@override
Future<BaseData<DownOrder>> placeOrderFirst(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'order/placeOrderFirst',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<DownOrder>.fromJson(
_result.data,
(json) => DownOrder.fromJson(json),
);
return value;
}
@override
Future<BaseData<WxPay>> settlementWx(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('order/settlement',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<WxPay>.fromJson(
_result.data,
(json) => WxPay.fromJson(json),
);
return value;
}
@override
Future<BaseData<dynamic>> settlementApi(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('order/settlement',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<dynamic>> queryStoreInfo1(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>('/store/getStore',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData<dynamic>> getParentInfo(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'/order/getParentInfo/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
}

1349
lib/retrofit/retrofit_api.g.dart

File diff suppressed because it is too large Load Diff

119
lib/settlement/settlement.dart

@ -9,6 +9,7 @@ import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/address.dart';
import 'package:huixiang/retrofit/data/base_data.dart';
import 'package:huixiang/retrofit/data/down_order.dart';
import 'package:huixiang/retrofit/data/min_order_info.dart';
import 'package:huixiang/retrofit/data/placeOrderFirst.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/retrofit/data/settlement_bean.dart';
@ -45,23 +46,35 @@ class _Settlement extends State<Settlement> {
MinApiService minService;
Function(int type) callback;
StoreInfo storeInfo;
ShoppingCart shopCarGoods;
// ShoppingCart shopCarGoods;
SettleOrderInfo settleOrderInfo;
MinOrderInfo minOrderInfo;
int selectedBtn = 0;
String remakers = "";
String parentCode = "";
String parentId = "";
int payChannel = 4;
String tableId = "0";
int tableId = 0;
Address address;
CouponListBean couponListBean;
PromotionInfoListBean promotion;
String mobile;
bool placeOrder = false;
@override
void initState() {
super.initState();
tableId = widget.arguments["tableId"] ?? 0;
parentCode = widget.arguments["parentCode"] ?? "";
parentId = widget.arguments["parentId"] ?? "";
storeInfo = widget.arguments["storeInfo"];
shopCarGoods = widget.arguments["shoppingCart"];
if (tableId == 0) {
placeOrder = true;
}
SharedPreferences.getInstance().then((value) {
String minToken = value.getString("minToken");
@ -80,7 +93,12 @@ class _Settlement extends State<Settlement> {
///
queryOrderInfo(
addressId, isTake, memberCouponId, orderId, promotionId) async {
addressId,
isTake,
memberCouponId,
orderId,
promotionId,
) async {
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId": addressId,
"isTake": isTake,
@ -95,6 +113,18 @@ class _Settlement extends State<Settlement> {
}
}
///
queryOrderDetails(id) async {
BaseData<MinOrderInfo> baseData = await minService.getOrderDetails({
"id": id,
}).catchError((error) {});
if (baseData != null && baseData.isSuccess) {
setState(() {
minOrderInfo = baseData.data;
});
}
}
queryAddress(int selectedBtn) async {
this.selectedBtn = selectedBtn;
if (address != null) {
@ -141,18 +171,21 @@ class _Settlement extends State<Settlement> {
}
}
PlaceOrderFirst placeOrderFirst;
DownOrder downOrder;
///
queryPlaceOrderFirst() async {
for (int i = 0; i < shopCarGoods.shoppingCartSkuItemList.length; i++) {
for (int i = 0; i < settleOrderInfo.orderProductList.length; i++) {
settleOrderInfo.orderProductList.forEach((element1) {
if (shopCarGoods.shoppingCartSkuItemList[i].productId ==
if (settleOrderInfo.orderProductList[i].productId ==
element1.productId) {
shopCarGoods.shoppingCartSkuItemList[i].skuId = element1.skuId;
settleOrderInfo.orderProductList[i].skuId = element1.skuId;
}
});
}
PlaceOrderFirst placeOrderFirst = PlaceOrderFirst();
placeOrderFirst = PlaceOrderFirst();
placeOrderFirst.cartNum = settleOrderInfo.orderNum;
placeOrderFirst.cartSum = settleOrderInfo.price;
placeOrderFirst.addressId = address == null ? null : address.id;
@ -163,8 +196,8 @@ class _Settlement extends State<Settlement> {
placeOrderFirst.orderSource = 2;
placeOrderFirst.orderType = "0";
placeOrderFirst.orderTypeId = 0;
placeOrderFirst.parentCode = ""; //
placeOrderFirst.parentId = "0"; //
placeOrderFirst.parentCode = parentCode; //
placeOrderFirst.parentId = parentId; //
placeOrderFirst.payChannel = payChannel;
placeOrderFirst.promotionInfoDTO = PromotionInfoDTOBean();
placeOrderFirst.promotionInfoDTO.promotionId =
@ -173,26 +206,66 @@ class _Settlement extends State<Settlement> {
couponListBean != null ? couponListBean.id : "";
placeOrderFirst.recMobile =
(mobile == null || mobile == "") ? mobile : storeInfo.headMobile;
placeOrderFirst.shoppingCartSkuItemList =
shopCarGoods.shoppingCartSkuItemList;
placeOrderFirst.shoppingCartSkuItemList = settleOrderInfo.orderProductList;
placeOrderFirst.skuItemDTOList = [];
placeOrderFirst.source = 1;
placeOrderFirst.storeId = storeInfo.id;
placeOrderFirst.subcribeTime = null;
placeOrderFirst.tableId = tableId;
placeOrderFirst.tableId = "$tableId";
if (tableId == 0) {///
BaseData<DownOrder> baseData = await minService
.placeOrderFirst(placeOrderFirst.toJson())
.catchError((error) {
print("error: $error");
});
if (baseData != null && baseData.isSuccess) {
querySettlement(placeOrderFirst, baseData.data);
placeOrder = true;
this.downOrder = baseData.data;
querySettlement();
}
} else { ///
BaseData<DownOrder> baseData;
if (parentId == "") {
baseData = await minService
.placeOrderFirst(placeOrderFirst.toJson())
.catchError((error) {
print("error: $error");
});
} else {
baseData = await minService
.addOrder(placeOrderFirst.toJson())
.catchError((error) {
print("error: $error");
});
}
if (baseData != null && baseData.isSuccess) {
placeOrder = true;
this.downOrder = baseData.data;
queryOrderDetails(parentId);
setState(() {});
}
}
}
//Undefined symbols for architecture armv7:
// "_OBJC_CLASS_$_HmsBitMap", referenced from:
// objc-class-ref in libflutter_scankit.a(FLScanKitView.o)
// objc-class-ref in libflutter_scankit.a(FlutterScankitPlugin.o)
// "_OBJC_CLASS_$_HmsDefaultScanViewController", referenced from:
// objc-class-ref in libflutter_scankit.a(FlutterScankitPlugin.o)
// "_OBJC_CLASS_$_HmsCustomScanViewController", referenced from:
// objc-class-ref in libflutter_scankit.a(FLScanKitView.o)
// "_OBJC_CLASS_$_HmsScanOptions", referenced from:
// objc-class-ref in libflutter_scankit.a(FLScanKitView.o)
// objc-class-ref in libflutter_scankit.a(FlutterScankitPlugin.o)
// ld: symbol(s) not found for architecture armv7
// clang: error: linker command failed with exit code 1 (use -v to see invocation)
///
querySettlement(PlaceOrderFirst placeOrderFirst, DownOrder downOrder) async {
placeOrderFirst.id = downOrder.id;
querySettlement() async {
placeOrderFirst.id = parentId != "" ? parentId : downOrder.id;
placeOrderFirst.orderProductVOList = downOrder.orderProductVOList;
if (placeOrderFirst.payChannel == 1) {
if (!(await Min.isInitialize())) {
@ -236,9 +309,12 @@ class _Settlement extends State<Settlement> {
}
toOrderDetails(String orderId) {
Navigator.of(context).popAndPushNamed('/router/order_details', arguments: {
Navigator.of(context).popAndPushNamed(
'/router/order_details',
arguments: {
"id": orderId,
});
},
);
}
@override
@ -297,6 +373,7 @@ class _Settlement extends State<Settlement> {
SettlementOrderCommodity(
selectedBtn,
settleOrderInfo,
minOrderInfo,
),
////
@ -333,7 +410,9 @@ class _Settlement extends State<Settlement> {
),
),
Text(
"${settleOrderInfo == null ? "" : settleOrderInfo.price}",
minOrderInfo != null ?
"${minOrderInfo.orderSumPrice}" :
"${settleOrderInfo == null ? "0" : settleOrderInfo.price}",
style: TextStyle(
fontSize: 20.sp,
fontWeight: MyFontWeight.semi_bold,
@ -346,7 +425,7 @@ class _Settlement extends State<Settlement> {
RoundButton(
width: 103.w,
height: 54.h,
text: S.current.jiesuan,
text: placeOrder ? S.current.jiesuan : "下单",
textColor: Colors.white,
fontWeight: MyFontWeight.regular,
backgroup: Color(0xFF32A060),

35
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/findMiNiGroupList.dart';
import 'package:huixiang/retrofit/data/min_order_info.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
@ -11,13 +11,16 @@ class SettlementOrderCommodity extends StatefulWidget {
final int isTakeOut;
final SettleOrderInfo settleOrderInfo;
final MinOrderInfo minOrderInfo;
SettlementOrderCommodity(this.isTakeOut, this.settleOrderInfo);
SettlementOrderCommodity(
this.isTakeOut, this.settleOrderInfo, this.minOrderInfo);
@override
State<StatefulWidget> createState() {
return _SettlementOrderCommodity();
}
}
class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
@ -67,7 +70,12 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
List<Widget> commodityList() {
if (widget.settleOrderInfo == null) return [];
List<Widget> widgets = [];
if (widget.settleOrderInfo != null) {
if (widget.minOrderInfo != null) {
widgets.addAll(widget.minOrderInfo.orderProductVOList
.map((e) => commodityItem(e))
.toList());
} else if (widget.settleOrderInfo != null) {
widgets.addAll(widget.settleOrderInfo.orderProductList
.map((e) => commodityItem(e))
.toList());
@ -76,13 +84,18 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
if (widget.isTakeOut != 0) {
//
widgets.add(discountItem(
widgets.add(
discountItem(
Color(0xFFFF7A1A),
widget.isTakeOut == 1
? S.of(context).peisongfei
: S.of(context).yunfei,
"",
"+${widget.settleOrderInfo?.postAge ?? "0"}"));
(widget.minOrderInfo != null)
? "+${widget.minOrderInfo?.postFee ?? "0"}"
: "+${widget.settleOrderInfo?.postAge ?? "0"}",
),
);
}
widgets.add(Container(
@ -310,7 +323,11 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
children: [
Expanded(
child: Text(
S.of(context).gongjijianshangpin((widget.settleOrderInfo != null)
S.of(context).gongjijianshangpin((widget.minOrderInfo != null)
? ((widget.minOrderInfo != null)
? widget.minOrderInfo.orderProductVOList.length
: "0")
: (widget.settleOrderInfo != null)
? widget.settleOrderInfo.orderProductList.length
: "0"),
style: TextStyle(
@ -323,7 +340,7 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
),
Container(
child: Text(
"已优惠:¥${widget.settleOrderInfo.discountAmount}",
"已优惠:¥${(widget.minOrderInfo != null) ? (widget.minOrderInfo.discountAmount ?? "0") : (widget.settleOrderInfo.discountAmount ?? "0")}",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7B7B7B),
@ -362,6 +379,10 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
}
String totalPrice() {
if (widget.minOrderInfo != null &&
widget.minOrderInfo.orderProductVOList != null) {
return "${widget.minOrderInfo.orderSumPrice}";
}
if (widget.settleOrderInfo.orderProductList == null) return "";
return "${widget.settleOrderInfo.price}";
}

2
lib/store/store_order.dart

@ -489,7 +489,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
toDownOrder() async {
int num = count();
if (num == 0) {
if (tableId > 0 && num == 0) {
SmartDialog.showToast("请先选择您要购买的商品!~");
return;
}

82
lib/union/union_page.dart

@ -302,55 +302,55 @@ class _UnionPage extends State<UnionPage>
}
toScan(Store store) async {
Navigator.of(context).pushNamed(
'/router/store_order',
arguments: {
"id": store.id,
"tenant": store.tenantCode,
"storeName": store.storeName,
"tableId": 1315903669597634560,
},
);
// if (await Permission.camera.isPermanentlyDenied) {
// showCupertinoDialog(
// context: context,
// builder: (context) {
// return RequestPermission(
// "assets/image/icon_camera_permission_tips.png",
// S.of(context).ninxiangjiquanxianweikaiqi,
// S.of(context).weilekaipaizhaoxuanzhetouxiang,
// S.of(context).kaiqiquanxian,
// (result) async {
// if (result) {
// await openAppSettings();
// }
// },
// heightRatioWithWidth: 0.82,
// );
// });
// } else if (await Permission.camera.isGranted) {
// var result = await Navigator.of(context).pushNamed('/router/qr_scan');
//
// if (result != null && result != "") {
// Uri uri = Uri.parse(result);
// String table = uri.queryParameters["tableId"];
// if (table != null && table != "") {
// int tableId = int.tryParse(table);
// Navigator.of(context).pushNamed(
// '/router/store_order',
// arguments: {
// "id": store.id,
// "tenant": store.tenantCode,
// "storeName": store.storeName,
// "tableId": tableId,
// "tableId": 1315903669597634560,
// },
// );
// }
// }
// } else {
// await Permission.camera.request();
// }
if (await Permission.camera.isPermanentlyDenied) {
showCupertinoDialog(
context: context,
builder: (context) {
return RequestPermission(
"assets/image/icon_camera_permission_tips.png",
S.of(context).ninxiangjiquanxianweikaiqi,
S.of(context).weilekaipaizhaoxuanzhetouxiang,
S.of(context).kaiqiquanxian,
(result) async {
if (result) {
await openAppSettings();
}
},
heightRatioWithWidth: 0.82,
);
});
} else if (await Permission.camera.isGranted) {
var result = await Navigator.of(context).pushNamed('/router/qr_scan');
if (result != null && result != "") {
Uri uri = Uri.parse(result);
String table = uri.queryParameters["tableId"];
if (table != null && table != "") {
int tableId = int.tryParse(table);
Navigator.of(context).pushNamed(
'/router/store_order',
arguments: {
"id": store.id,
"tenant": store.tenantCode,
"storeName": store.storeName,
"tableId": tableId,
},
);
}
}
} else {
await Permission.camera.request();
}
}
Widget buildSearchItem() {

18
pubspec.yaml

@ -21,11 +21,9 @@ dependencies:
git:
url: git://github.com/TencentCloud/TPNS-Flutter-Plugin
ref: V1.1.2
# tpns_flutter_plugin: ^1.1.0
like_button: ^2.0.2
cupertino_icons: ^1.0.2
# flutter_swiper_null_safety: ^1.0.2
flutter_swiper: ^1.1.6
flutter_staggered_grid_view: ^0.4.0 # Null safety
pull_to_refresh: ^2.0.0 # Null safety
@ -54,24 +52,14 @@ dependencies:
flutter_smart_dialog: ^2.1.6
barcode_widget: ^2.0.1
# flutter_qr_reader: ^1.0.5
qr_flutter: ^4.0.0
url_launcher: ^5.0.0
# image_cropper: ^1.4.1
# image_picker_gallery_camera: ^0.1.6
#多图, 裁剪
image_pickers: ^2.0.0
flutter_scankit: ^1.2.0
# 数量,视频时长
# images_picker: ^1.2.4
# 多图,带UI
# wechat_assets_picker: ^4.2.2
path_provider: ^1.2.0
cached_network_image: ^2.0.0
@ -79,7 +67,6 @@ dependencies:
webview_flutter: ^1.0.7
chewie_audio: ^1.1.2
# camera: ^0.5.8+17
photo_view: ^0.11.1
video_player: ^1.0.1
@ -95,11 +82,8 @@ dependencies:
flutter_svg: ^0.20.0-nullsafety.3
font_awesome_flutter: ^9.1.0
# flutter_bugly: ^0.3.3
# bitmap: ^0.1.2
# decimal: ^1.3.0
ai_decimal_accuracy: ^1.1.0
# zefyr: ^0.12.0
dev_dependencies:
flutter_test:

Loading…
Cancel
Save