From 848b21bacd06c45ee16d8522acbce800df57b3a6 Mon Sep 17 00:00:00 2001 From: zhengyiming <540361168@qq.com> Date: 星期一, 31 三月 2025 18:32:50 +0800 Subject: [PATCH] fix: 四期需求 --- packages/services/api/typings.d.ts | 137 ++++++++++++++++++++++ packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue | 2 packages/services/api/WxPayNotify.ts | 2 packages/components/src/views/Mine/Dashboard.vue | 43 +++++- packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue | 2 packages/core/src/lifeRechargeServices.ts | 45 +++++++ packages/services/api/UserRole.ts | 8 + packages/services/api/LifePay.ts | 97 +++++++++++++++ 8 files changed, 318 insertions(+), 18 deletions(-) diff --git a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue index 5314fe3..4e4ed7a 100644 --- a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue +++ b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue @@ -246,7 +246,7 @@ gasAccount: form.gasAccount, province: form.areaList?.[0] ?? '', city: form.areaList?.[1] ?? '', - name: form.name, + // name: form.name, }, }; let res = await blLifeRecharge.services.createLifePayGasOrder(params); diff --git a/packages/components/src/views/Mine/Dashboard.vue b/packages/components/src/views/Mine/Dashboard.vue index 2091d85..90f4cec 100644 --- a/packages/components/src/views/Mine/Dashboard.vue +++ b/packages/components/src/views/Mine/Dashboard.vue @@ -3,49 +3,55 @@ <NutGridItem> <div class="pro-statistics-wrapper"> <div class="pro-statistics-title">绱鏀舵</div> - <div class="pro-statistics-content">{{ toThousand(8888) }}</div> + <div class="pro-statistics-content"> + {{ toThousand(topStatistics?.accumulatedReceipts ?? 0) }} + </div> </div> </NutGridItem> <NutGridItem> <div class="pro-statistics-wrapper"> <div class="pro-statistics-title">鏄ㄦ棩鏀舵</div> - <div class="pro-statistics-content">{{ toThousand(8888) }}</div> + <div class="pro-statistics-content"> + {{ toThousand(topStatistics?.receiptsYesterday ?? 0) }} + </div> </div> </NutGridItem> <NutGridItem> <div class="pro-statistics-wrapper"> <div class="pro-statistics-title">绱鏀剁泭</div> - <div class="pro-statistics-content">{{ toThousand(8888) }}</div> + <div class="pro-statistics-content"> + {{ toThousand(topStatistics?.accumulatedIncome ?? 0) }} + </div> </div> </NutGridItem> <NutGridItem> <div class="pro-statistics-wrapper"> <div class="pro-statistics-title">绱涓嬪崟</div> - <div class="pro-statistics-content">{{ 8888 }}</div> + <div class="pro-statistics-content">{{ topStatistics?.accumulatedOrders ?? 0 }}</div> </div> </NutGridItem> <NutGridItem> <div class="pro-statistics-wrapper"> <div class="pro-statistics-title">鏄ㄦ棩涓嬪崟</div> - <div class="pro-statistics-content">{{ 8888 }}</div> + <div class="pro-statistics-content">{{ topStatistics?.ordersNumYesterday ?? 0 }}</div> </div> </NutGridItem> <NutGridItem> <div class="pro-statistics-wrapper"> <div class="pro-statistics-title">鏄ㄦ棩鎴愬姛</div> - <div class="pro-statistics-content">{{ 8888 }}</div> + <div class="pro-statistics-content">{{ topStatistics?.yesterdaySuccess ?? 0 }}</div> </div> </NutGridItem> <NutGridItem> <div class="pro-statistics-wrapper"> <div class="pro-statistics-title">绱鐢ㄦ埛</div> - <div class="pro-statistics-content">{{ 8888 }}</div> + <div class="pro-statistics-content">{{ topStatistics?.accumulatedUsers ?? 0 }}</div> </div> </NutGridItem> <NutGridItem> <div class="pro-statistics-wrapper"> <div class="pro-statistics-title">鏄ㄦ棩娲昏穬</div> - <div class="pro-statistics-content">{{ 8888 }}</div> + <div class="pro-statistics-content">{{ topStatistics?.yesterdayActiveUsers ?? 0 }}</div> </div> </NutGridItem> </NutGrid> @@ -54,8 +60,29 @@ <script setup lang="ts"> import { Grid as NutGrid, GridItem as NutGridItem } from '@nutui/nutui-taro'; import { toThousand } from '../../utils'; +import { useQuery } from '@tanstack/vue-query'; +import { useLifeRechargeContext, TopStatisticsOutput } from '@life-payment/core-vue'; +import { computed } from 'vue'; defineOptions({ name: 'Dashboard', }); + +const { blLifeRecharge } = useLifeRechargeContext(); + +const { data: topStatistics } = useQuery({ + queryKey: ['lifePayServices/getTopStatistics', blLifeRecharge.accountModel.userChannles], + queryFn: async () => { + return await blLifeRecharge.services.getTopStatistics( + { + channleId: '', + }, + { + showLoading: false, + } + ); + }, + placeholderData: () => ({} as TopStatisticsOutput), + enabled: computed(() => blLifeRecharge.accountModel.userChannles.length > 0), +}); </script> diff --git a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue index 3cc9c7b..e41b479 100644 --- a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue +++ b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue @@ -256,7 +256,7 @@ province: form.province, city: form.city, sixID: form.sixID, - name: form.name, + // name: form.name, }, }; let res = await blLifeRecharge.services.createLifePayElectricOrder(params); diff --git a/packages/core/src/lifeRechargeServices.ts b/packages/core/src/lifeRechargeServices.ts index 1bfa225..b04c09d 100644 --- a/packages/core/src/lifeRechargeServices.ts +++ b/packages/core/src/lifeRechargeServices.ts @@ -375,6 +375,21 @@ } ); } + + /** 鑾峰彇椤堕儴缁熻鏁版嵁 GET /api/LifePay/GetTopStatistics */ + async getTopStatistics( + // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) + params: APIgetTopStatisticsParams, + options?: RequestConfig + ) { + return this.request<TopStatisticsOutput>('/api/LifePay/GetTopStatistics', { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); + } } export interface PhoneMesssageCodeLoginInput { @@ -833,6 +848,7 @@ export interface ChannelOutput { name?: string; channlesNum?: string; + channlesId?: string; } export interface LifePayUserMesssageByIduserInput { @@ -841,3 +857,32 @@ /** 鐢ㄦ埛缂栧彿 */ id?: string; } + +export interface APIgetTopStatisticsParams { + channleId?: string; +} + +export interface TopStatisticsOutput { + /** 鍒涘缓鏃堕棿 */ + creationTime?: string; + /** 璐︽埛浣欓 */ + amount?: number; + /** 绱鏀舵 */ + accumulatedReceipts?: number; + /** 鏄ㄦ棩鏀舵 */ + receiptsYesterday?: number; + /** 绱鏀跺叆 */ + accumulatedIncome?: number; + /** 绱涓嬪崟 */ + accumulatedOrders?: number; + /** 鏄ㄦ棩涓嬪崟 */ + ordersNumYesterday?: number; + /** 鏄ㄦ棩鎴愬姛 */ + yesterdaySuccess?: number; + /** 鏄ㄦ棩澶辫触 */ + yesterdayFail?: number; + /** 绱鐢ㄦ埛 */ + accumulatedUsers?: number; + /** 鏄ㄦ棩娲昏穬鐢ㄦ埛 */ + yesterdayActiveUsers?: number; +} diff --git a/packages/services/api/LifePay.ts b/packages/services/api/LifePay.ts index d35ff51..a1b891b 100644 --- a/packages/services/api/LifePay.ts +++ b/packages/services/api/LifePay.ts @@ -176,6 +176,22 @@ }); } +/** 鍚屾璁㈠崟 GET /api/LifePay/GetAllChannlesRake */ +export async function getAllChannlesRake(options?: API.RequestConfig) { + return request<any>('/api/LifePay/GetAllChannlesRake', { + method: 'GET', + ...(options || {}), + }); +} + +/** 鍚屾璁㈠崟鏀舵敮淇℃伅 GET /api/LifePay/GetAllLifePayExpensesReceipts */ +export async function getAllLifePayExpensesReceipts(options?: API.RequestConfig) { + return request<any>('/api/LifePay/GetAllLifePayExpensesReceipts', { + method: 'GET', + ...(options || {}), + }); +} + /** 姝ゅ鍚庣娌℃湁鎻愪緵娉ㄩ噴 GET /api/LifePay/GetBillErceiptExport */ export async function getBillErceiptExport( // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) @@ -307,6 +323,57 @@ }); } +/** 鑾峰彇娓犻亾鍒嗕剑鍒嗛〉鍒楄〃 POST /api/LifePay/GetLifePayChannlesRakePage */ +export async function getLifePayChannlesRakePage( + body: API.LifePayChannlesRakePageInput, + options?: API.RequestConfig +) { + return request<API.LifePayChannlesRakeListOutputPageOutput>( + '/api/LifePay/GetLifePayChannlesRakePage', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + +/** 瀵煎嚭娓犻亾鍒嗕剑Excel POST /api/LifePay/GetLifePayChannlesRakePageExport */ +export async function getLifePayChannlesRakePageExport( + body: API.LifePayChannlesRakePageInput, + options?: API.RequestConfig +) { + return request<any>('/api/LifePay/GetLifePayChannlesRakePageExport', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + }); +} + +/** 鑾峰彇鏀舵敮娴佹按鍒嗛〉鏁版嵁 POST /api/LifePay/GetLifePayExpensesReceiptsPage */ +export async function getLifePayExpensesReceiptsPage( + body: API.LifePayExpensesReceiptsPageInput, + options?: API.RequestConfig +) { + return request<API.LifePayExpensesReceiptsListOutputPageOutput>( + '/api/LifePay/GetLifePayExpensesReceiptsPage', + { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + data: body, + ...(options || {}), + } + ); +} + /** 鑾峰彇璁㈠崟璇︽儏 GET /api/LifePay/GetLifePayOrderDetail */ export async function getLifePayOrderDetail( // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) @@ -357,7 +424,7 @@ body: API.LifePayRechargeReceiptsPageInput, options?: API.RequestConfig ) { - return request<API.LifePayRechargeReceiptsListOutputLifePayRechargeReceiptsPageOutput>( + return request<API.LifePayRechargeReceiptsListOutputPageOutput>( '/api/LifePay/GetLifePayRechargeReceiptsPage', { method: 'POST', @@ -482,9 +549,16 @@ } /** 鑾峰彇椤堕儴缁熻鏁版嵁 GET /api/LifePay/GetTopStatistics */ -export async function getTopStatistics(options?: API.RequestConfig) { +export async function getTopStatistics( + // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) + params: API.APIgetTopStatisticsParams, + options?: API.RequestConfig +) { return request<API.TopStatisticsOutput>('/api/LifePay/GetTopStatistics', { method: 'GET', + params: { + ...params, + }, ...(options || {}), }); } @@ -723,13 +797,28 @@ }); } -/** 姝ゅ鍚庣娌℃湁鎻愪緵娉ㄩ噴 GET /api/LifePay/WxPayDomesticRefundsQuery */ +/** 鏌ヨ寰俊閫�娆句俊鎭� GET /api/LifePay/WxPayDomesticRefundsQuery */ export async function wxPayDomesticRefundsQuery( // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) params: API.APIwxPayDomesticRefundsQueryParams, options?: API.RequestConfig ) { - return request<any>('/api/LifePay/WxPayDomesticRefundsQuery', { + return request<API.WxPayDomesticRefundsQueryReponse>('/api/LifePay/WxPayDomesticRefundsQuery', { + method: 'GET', + params: { + ...params, + }, + ...(options || {}), + }); +} + +/** 鏌ヨ寰俊璁㈠崟淇℃伅 GET /api/LifePay/WxPayTradeQuery */ +export async function wxPayTradeQuery( + // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄) + params: API.APIwxPayTradeQueryParams, + options?: API.RequestConfig +) { + return request<API.WxPayTradeQueryReponse>('/api/LifePay/WxPayTradeQuery', { method: 'GET', params: { ...params, diff --git a/packages/services/api/UserRole.ts b/packages/services/api/UserRole.ts index 2071439..f23690d 100644 --- a/packages/services/api/UserRole.ts +++ b/packages/services/api/UserRole.ts @@ -59,6 +59,14 @@ }); } +/** 鑾峰彇鐢ㄦ埛璐﹀彿璇︽儏 GET /api/UserRole/GetBackClientUserInfo */ +export async function getBackClientUserInfo(options?: API.RequestConfig) { + return request<API.BackClientUserInfoOutput>('/api/UserRole/GetBackClientUserInfo', { + method: 'GET', + ...(options || {}), + }); +} + /** 鍚庡彴绠$悊璐︽埛鍒楄〃 POST /api/UserRole/GetBackClientUsers */ export async function getBackClientUsers( body: API.GetBackClientUsersInput, diff --git a/packages/services/api/WxPayNotify.ts b/packages/services/api/WxPayNotify.ts index 34b3eff..fa00992 100644 --- a/packages/services/api/WxPayNotify.ts +++ b/packages/services/api/WxPayNotify.ts @@ -2,7 +2,7 @@ // @ts-ignore import { request } from '@/utils/request'; -/** 姝ゅ鍚庣娌℃湁鎻愪緵娉ㄩ噴 POST /api/WxPayNotify/WxPayDomesticRefundsNotify */ +/** 寰俊閫�娆鹃�氱煡鍥炶皟 POST /api/WxPayNotify/WxPayDomesticRefundsNotify */ export async function wxPayDomesticRefundsNotify( body: API.WxRechargeNotifyInput, options?: API.RequestConfig diff --git a/packages/services/api/typings.d.ts b/packages/services/api/typings.d.ts index ff0e189..83f7260 100644 --- a/packages/services/api/typings.d.ts +++ b/packages/services/api/typings.d.ts @@ -318,6 +318,10 @@ id: string; } + interface APIgetTopStatisticsParams { + channleId?: string; + } + interface APIgetUserAccountDetailParams { id?: string; } @@ -418,6 +422,10 @@ outTradeNo?: string; } + interface APIwxPayTradeQueryParams { + outTradeNo?: string; + } + interface ApplicationApiDescriptionModel { modules?: Record<string, any>; types?: Record<string, any>; @@ -485,6 +493,14 @@ quickQuery?: string; } + interface BackClientUserInfoOutput { + /** 鏄惁鏄悗鍙扮敤鎴� */ + isBackClientUser?: boolean; + isSystem?: boolean; + /** 娓犻亾鍙� */ + channleList?: ChannelOutput[]; + } + interface BaseAuthorizeDto { moduleType?: number; moduleId?: string; @@ -515,6 +531,7 @@ interface ChannelOutput { name?: string; channlesNum?: string; + channlesId?: string; } interface ChannelRateOutput { @@ -721,6 +738,8 @@ properties?: Record<string, any>; configuration?: Record<string, any>; } + + type ExpensesReceiptsTypeEnum = 10 | 20; interface ExtensionEnumDto { fields?: ExtensionEnumFieldDto[]; @@ -1086,6 +1105,8 @@ city?: string; /** 瀹㈡埛韬唤璇佸悗6浣嶏紝鍗楃綉蹇呬紶銆� */ sixID?: string; + /** 鎴蜂富濮撳悕 */ + name?: string; } interface LifeElectricDataCreateLifePayOrderInput { @@ -1121,7 +1142,85 @@ type LifePayChannelsStatsEnum = 10 | 20; + interface LifePayChannlesRakeListOutput { + /** 缂栧彿 */ + id?: string; + /** 骞冲彴璁㈠崟鍙� */ + orderNo?: string; + /** 鎴愪氦閲戦 */ + payAmount?: number; + /** 娓犻亾浣i噾姣斾緥 */ + channlesRakeRate?: number; + /** 浣i噾 */ + channlesRakePrice?: number; + /** 缁撶畻鏃堕棿 */ + finishTime?: string; + /** 涓嬪崟鏃堕棿 */ + creationTime?: string; + /** 鎷撳睍灞炴�� */ + extraProperties?: string; + /** 涓嬪崟娓犻亾 */ + channelId?: string; + } + + interface LifePayChannlesRakeListOutputPageOutput { + pageModel?: Pagination; + objectData?: any; + data?: LifePayChannlesRakeListOutput[]; + } + + interface LifePayChannlesRakePageInput { + pageModel?: Pagination; + checkChannelId?: string; + /** 鏌ヨ鏉′欢 */ + keyWord?: string; + /** 娓犻亾鍙� */ + channelId?: string; + /** 璧峰涓嬪崟鏃堕棿 */ + creationTimeBegin?: string; + /** 缁撴潫涓嬪崟鏃堕棿 */ + creationTimeEnd?: string; + /** 璧峰缁撶畻鏃堕棿 */ + finishTimeBegin?: string; + /** 缁堟缁撶畻鏃堕棿 */ + finishTimeEnd?: string; + } + type LifePayChannlesTypeEnum = 10 | 20; + + interface LifePayExpensesReceiptsListOutput { + /** 缂栧彿 */ + id?: string; + /** 骞冲彴璁㈠崟鍙� */ + orderNo?: string; + /** 娓犻亾娴佹按鍙� */ + outOrderNo?: string; + lifePayType?: LifePayTypeEnum; + expensesReceiptsType?: ExpensesReceiptsTypeEnum; + /** 浜ゆ槗閲戦 */ + amount?: number; + /** 浜ゆ槗鏃堕棿 */ + finishTime?: string; + } + + interface LifePayExpensesReceiptsListOutputPageOutput { + pageModel?: Pagination; + objectData?: any; + data?: LifePayExpensesReceiptsListOutput[]; + } + + interface LifePayExpensesReceiptsPageInput { + pageModel?: Pagination; + checkChannelId?: string; + /** 鏌ヨ鏉′欢 */ + keyWord?: string; + lifePayType?: LifePayTypeEnum; + expensesReceiptsType?: ExpensesReceiptsTypeEnum; + /** 浜ゆ槗寮�濮嬫椂闂� */ + timeBegin?: string; + /** 浜ゆ槗缁撴潫鏃堕棿 */ + timeEnd?: string; + } interface LifePayIntroInfoDetail { type?: IntroInfoTypeEnum; @@ -1344,12 +1443,10 @@ creationTime?: string; } - interface LifePayRechargeReceiptsListOutputLifePayRechargeReceiptsPageOutput { + interface LifePayRechargeReceiptsListOutputPageOutput { pageModel?: Pagination; objectData?: any; data?: LifePayRechargeReceiptsListOutput[]; - /** 绱鍏呭�� */ - totalRechargeAmount?: number; } interface LifePayRechargeReceiptsPageInput { @@ -1479,6 +1576,12 @@ timestamp?: string; timeExpire?: string; message?: string; + } + + interface ModelWxPayDomesticRefundsAmount { + refund?: number; + total?: number; + currency?: string; } interface ModuleApiDescriptionModel { @@ -2363,6 +2466,34 @@ unionId?: string; } + interface WxPayDomesticRefundsQueryReponse { + code?: string; + message?: string; + refundId?: string; + refundStatus?: string; + downloadUrl?: string; + transactionId?: string; + outTradeNo?: string; + channel?: string; + userReceivedAccount?: string; + successTime?: string; + createTime?: string; + status?: string; + amount?: ModelWxPayDomesticRefundsAmount; + } + + interface WxPayTradeQueryReponse { + code?: string; + message?: string; + outTradeNo?: string; + transactionId?: string; + tradeType?: string; + tradeState?: string; + tradeStateDesc?: string; + successTime?: string; + amount?: ModelWxPayDomesticRefundsAmount; + } + interface WxRechargeNotifyInput { id: string; createTime: string; -- Gitblit v1.9.1