|
|
|
// 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<ShoppingCart>> 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<ShoppingCart>.fromJson(
|
|
|
|
_result.data,
|
|
|
|
(json) => ShoppingCart.fromJson(json),
|
|
|
|
);
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|