Browse Source

Merge branches 'dev' and 'master' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	lib/retrofit/data/miNiDetail.dart
	lib/retrofit/min_api.g.dart
	lib/store/store_order.dart
	lib/store/store_view/store_order_list.dart
master
fmk 3 years ago
parent
commit
9d4667d049
  1. 10
      lib/retrofit/data/shoppingCart.dart
  2. 3
      lib/retrofit/min_api.dart
  3. 33
      lib/retrofit/min_api.g.dart
  4. 2
      lib/store/store_order.dart

10
lib/retrofit/data/shoppingCart.dart

@ -15,14 +15,14 @@ class ShoppingCart {
String storeName; String storeName;
int tableId; int tableId;
static ShoppingCart fromMap(Map<String, dynamic> map) { static ShoppingCart fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
ShoppingCart shoppingCartBean = ShoppingCart(); ShoppingCart shoppingCartBean = ShoppingCart();
shoppingCartBean.cartSum = map['cartSum']; shoppingCartBean.cartSum = map['cartSum'];
shoppingCartBean.numberOfPeople = map['numberOfPeople']; shoppingCartBean.numberOfPeople = map['numberOfPeople'];
shoppingCartBean.selected = map['selected']; shoppingCartBean.selected = map['selected'];
shoppingCartBean.shoppingCartSkuItemList = List()..addAll( shoppingCartBean.shoppingCartSkuItemList = List()..addAll(
(map['shoppingCartSkuItemList'] as List ?? []).map((o) => ShoppingCartSkuItemListBean.fromMap(o)) (map['shoppingCartSkuItemList'] as List ?? []).map((o) => ShoppingCartSkuItemListBean.fromJon(o))
); );
shoppingCartBean.storeId = map['storeId']; shoppingCartBean.storeId = map['storeId'];
shoppingCartBean.storeName = map['storeName']; shoppingCartBean.storeName = map['storeName'];
@ -72,7 +72,7 @@ class ShoppingCartSkuItemListBean {
int storeId; int storeId;
int tableId; int tableId;
static ShoppingCartSkuItemListBean fromMap(Map<String, dynamic> map) { static ShoppingCartSkuItemListBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
ShoppingCartSkuItemListBean shoppingCartSkuItemListBean = ShoppingCartSkuItemListBean(); ShoppingCartSkuItemListBean shoppingCartSkuItemListBean = ShoppingCartSkuItemListBean();
shoppingCartSkuItemListBean.buyNum = map['buyNum']; shoppingCartSkuItemListBean.buyNum = map['buyNum'];
@ -80,7 +80,7 @@ class ShoppingCartSkuItemListBean {
shoppingCartSkuItemListBean.groupId = map['groupId']; shoppingCartSkuItemListBean.groupId = map['groupId'];
shoppingCartSkuItemListBean.id = map['id']; shoppingCartSkuItemListBean.id = map['id'];
shoppingCartSkuItemListBean.platterList = List()..addAll( shoppingCartSkuItemListBean.platterList = List()..addAll(
(map['platterList'] as List ?? []).map((o) => PlatterListBean.fromMap(o)) (map['platterList'] as List ?? []).map((o) => PlatterListBean.fromJon(o))
); );
shoppingCartSkuItemListBean.productId = map['productId']; shoppingCartSkuItemListBean.productId = map['productId'];
shoppingCartSkuItemListBean.productName = map['productName']; shoppingCartSkuItemListBean.productName = map['productName'];
@ -125,7 +125,7 @@ class PlatterListBean {
bool required; bool required;
int skuId; int skuId;
static PlatterListBean fromMap(Map<String, dynamic> map) { static PlatterListBean fromJon(Map<String, dynamic> map) {
if (map == null) return null; if (map == null) return null;
PlatterListBean platterListBean = PlatterListBean(); PlatterListBean platterListBean = PlatterListBean();
platterListBean.deleted = map['deleted']; platterListBean.deleted = map['deleted'];

3
lib/retrofit/min_api.dart

@ -13,6 +13,7 @@ import 'package:retrofit/retrofit.dart';
import 'data/findMiNiGroupList.dart'; import 'data/findMiNiGroupList.dart';
import 'data/miNiDetail.dart'; import 'data/miNiDetail.dart';
import 'data/shoppingCart.dart';
part 'min_api.g.dart'; part 'min_api.g.dart';
// const base_url = "https://pos.platform.lotus-wallet.com/app/"; /// // const base_url = "https://pos.platform.lotus-wallet.com/app/"; ///
@ -127,7 +128,7 @@ abstract class MinApiService {
/// ///
@POST("shoppingcart") @POST("shoppingcart")
Future<BaseData<FindMiNiGroupList>> shoppingCart( Future<BaseData<ShoppingCart>> shoppingCart(
@Body() Map<String, dynamic> param,Map<String, dynamic> header); @Body() Map<String, dynamic> param,Map<String, dynamic> header);

33
lib/retrofit/min_api.g.dart

@ -17,18 +17,22 @@ class _MinApiService implements MinApiService {
String baseUrl; String baseUrl;
@override @override
Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList(param) async { Future<BaseData<List<FindMiNiGroupList>>> findMiNiGroupList(
param, header) async {
ArgumentError.checkNotNull(param, 'param'); ArgumentError.checkNotNull(param, 'param');
ArgumentError.checkNotNull(header, 'header');
const _extra = <String, dynamic>{}; const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{}; final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{}; final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{}); _data.addAll(param ?? <String, dynamic>{});
final _header= <String, dynamic>{};
_header.addAll(header ?? <String,dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>( final _result = await _dio.request<Map<String, dynamic>>(
'product/findMiNiGroupList', 'product/findMiNiGroupList',
queryParameters: queryParameters, queryParameters: queryParameters,
options: RequestOptions( options: RequestOptions(
method: 'POST', method: 'POST',
headers: <String, dynamic>{}, headers: _header,
extra: _extra, extra: _extra,
baseUrl: baseUrl), baseUrl: baseUrl),
data: _data); data: _data);
@ -58,30 +62,7 @@ class _MinApiService implements MinApiService {
data: _data); data: _data);
final value = BaseData<MiNiDetail>.fromJson( final value = BaseData<MiNiDetail>.fromJson(
_result.data, _result.data,
(json) => MiNiDetail.fromJson(json), (json) => MiNiDetail.fromMap(json),
);
return value;
}
@override
Future<BaseData<FindMiNiGroupList>> shoppingCart(param, header) async {
ArgumentError.checkNotNull(param, 'param');
ArgumentError.checkNotNull(header, 'header');
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<FindMiNiGroupList>.fromJson(
_result.data,
(json) => FindMiNiGroupList.fromJson(json),
); );
return value; return value;
} }

2
lib/store/store_order.dart

@ -80,7 +80,7 @@ class _StoreOrderPage extends State<StoreOrderPage>
activitys, activitys,
), ),
]; ];
minLogin();
queryStoreInfo(); queryStoreInfo();
} }

Loading…
Cancel
Save