// 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 annoToken(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>('anno/token', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == null ? null : json, ); return value; } @override Future> getDayCounts(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'comprehensiveReport/getDayCounts', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == "" ? null : DayCount.fromJson(json), ); return value; } @override Future> popularList(offsetDay) async { ArgumentError.checkNotNull(offsetDay, 'offsetDay'); const _extra = {}; final queryParameters = {}; final _data = {}; final _result = await _dio.request>( 'dashBoard/store/?offsetDay=$offsetDay', queryParameters: queryParameters, options: RequestOptions( method: 'GET', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => PopularSalesList.fromJson(json), ); return value; } @override Future>> orderTrend() async { const _extra = {}; final queryParameters = {}; final _data = {}; final _result = await _dio.request>('trend/orderTrend', queryParameters: queryParameters, options: RequestOptions( method: 'GET', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData>.fromJson( _result.data, (json) => (json as List) .map( (i) => OrderTrend.fromJson(i as Map)) .toList()); return value; } @override Future> vipCounts(date) async { ArgumentError.checkNotNull(date, 'date'); const _extra = {}; final queryParameters = {}; final _data = {}; final _result = await _dio.request>( 'largeScreenReport/getDayCounts?date=$date', queryParameters: queryParameters, options: RequestOptions( method: 'GET', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => VipCountsInfo.fromJson(json), ); return value; } @override Future>> dayFlow(yearMonth, isMonth) async { ArgumentError.checkNotNull(yearMonth, 'yearMonth'); ArgumentError.checkNotNull(isMonth, 'isMonth'); const _extra = {}; final queryParameters = {}; final _data = {}; final _result = await _dio.request>( 'dashBoard/order?yearMonth=$yearMonth&isMonth=$isMonth', queryParameters: queryParameters, options: RequestOptions( method: 'GET', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData>.fromJson( _result.data, (json) => (json as List) .map( (i) => DayFlowList.fromJson(i as Map)) .toList()); return value; } @override Future>> singleSales(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'audit/salesLeaderboard', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData>.fromJson( _result.data, (json) => (json as List) .map( (i) => SingleSalesList.fromJson(i as Map)) .toList()); return value; } @override Future>> goodsSalesList(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'audit/allKindsSalesStatistics', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData>.fromJson( _result.data, (json) => (json as List) .map( (i) => GoodsTypeSalesList.fromJson(i as Map)) .toList()); return value; } @override Future> saleBusinessAnalysis(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'largeScreenReport/saleBusinessAnalysis', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == "" ? null : TradeSummaryList.fromJson(json), ); return value; } @override Future> findAdminOrderList(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'order/findAdminOrderList', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == "" ? null : BusinessOrderList.fromJson(json), ); return value; } @override Future> getAdminOrderDetail(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'order/getAdminOrderDetail', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == "" ? null : BusinessOrderDetailInfo.fromJson(json), ); return value; } @override Future> refundReason(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>('reason/page', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == "" ? null : RefundReasonList.fromJson(json), ); return value; } @override Future refundOrder(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'order/refundOrder', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == null ? null : json, ); return value; } @override Future> productGroup(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'productGroup/page', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == "" ? null : ProductGroupList.fromJson(json), ); return value; } @override Future> findAdminProductLis(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>( 'product/findAdminProductListNew', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == "" ? null : BusinessGoods.fromJson(json), ); return value; } @override Future modifyPassword(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>('user', queryParameters: queryParameters, options: RequestOptions( method: 'PUT', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == null ? null : json, ); return value; } @override Future goodsUpdate(param) async { ArgumentError.checkNotNull(param, 'param'); const _extra = {}; final queryParameters = {}; final _data = {}; _data.addAll(param ?? {}); final _result = await _dio.request>('product/update', queryParameters: queryParameters, options: RequestOptions( method: 'POST', headers: {}, extra: _extra, baseUrl: baseUrl), data: _data); final value = BaseData.fromJson( _result.data, (json) => json == null ? null : json, ); return value; } }