You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

115 lines
3.5 KiB

// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'business_api.dart';
// **************************************************************************
// RetrofitGenerator
// **************************************************************************
class _BusinessApiService implements BusinessApiService {
_BusinessApiService(this._dio, {this.baseUrl}) {
ArgumentError.checkNotNull(_dio, '_dio');
baseUrl ??= kReleaseMode ? serviceBaseUrl : localBaseUrl;
}
final Dio _dio;
String baseUrl;
@override
void dispose() {
_dio.close(force: true);
}
@override
Future<BaseData> annoToken(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>>(
'anno/token',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => json == null ? null : json,
);
return value;
}
@override
Future<BaseData<DayCount>> getDayCounts(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>>(
'comprehensiveReport/getDayCounts',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<DayCount>.fromJson(
_result.data,
(json) => json == "" ? null :DayCount.fromJson(json),
);
return value;
}
@override
Future<BaseData<PopularSalesList>> popularList(offsetDay) async {
ArgumentError.checkNotNull(offsetDay, 'offsetDay');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'dashBoard/store/$offsetDay',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<PopularSalesList>.fromJson(
_result.data,
(json) => PopularSalesList.fromJson(json),
);
return value;
}
@override
Future<BaseData<List<OrderTrend>>> orderTrend() async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'trend/orderTrend',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<List<OrderTrend>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
.map<OrderTrend>(
(i) => OrderTrend.fromJson(i as Map<String, dynamic>))
.toList());
return value;
}
}