fmk
3 years ago
4 changed files with 1329 additions and 0 deletions
@ -0,0 +1,37 @@ |
|||||||
|
// 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, |
||||||
|
}; |
@ -0,0 +1,41 @@ |
|||||||
|
// 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(), |
||||||
|
}; |
@ -0,0 +1,43 @@ |
|||||||
|
// 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; |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue