|
|
|
// 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=$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;
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Future<BaseData<VipCountsInfo>> vipCounts(date) async {
|
|
|
|
ArgumentError.checkNotNull(date, 'date');
|
|
|
|
const _extra = <String, dynamic>{};
|
|
|
|
final queryParameters = <String, dynamic>{};
|
|
|
|
final _data = <String, dynamic>{};
|
|
|
|
final _result = await _dio.request<Map<String, dynamic>>(
|
|
|
|
'largeScreenReport/getDayCounts?date=$date',
|
|
|
|
queryParameters: queryParameters,
|
|
|
|
options: RequestOptions(
|
|
|
|
method: 'GET',
|
|
|
|
headers: <String, dynamic>{},
|
|
|
|
extra: _extra,
|
|
|
|
baseUrl: baseUrl),
|
|
|
|
data: _data);
|
|
|
|
final value = BaseData<VipCountsInfo>.fromJson(
|
|
|
|
_result.data,
|
|
|
|
(json) => VipCountsInfo.fromJson(json),
|
|
|
|
);
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|