From 797fa07355a312a06541ca105a00928e95dbded6 Mon Sep 17 00:00:00 2001
From: zym2525 <540361168@qq.com>
Date: 星期日, 23 二月 2025 14:39:44 +0800
Subject: [PATCH] fix: some

---
 packages/components/src/utils/lifeRechargeServices.ts |  267 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 260 insertions(+), 7 deletions(-)

diff --git a/packages/components/src/utils/lifeRechargeServices.ts b/packages/components/src/utils/lifeRechargeServices.ts
index 7493a37..9b6957e 100644
--- a/packages/components/src/utils/lifeRechargeServices.ts
+++ b/packages/components/src/utils/lifeRechargeServices.ts
@@ -1,12 +1,6 @@
 import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
 import { IRequest, BlLifeRechargeServicesOptions } from './types';
-
-export interface PhoneMesssageCodeLoginInput {
-  /** 鎵嬫満鍙� */
-  phoneNumber: string;
-  /** 楠岃瘉鐮� */
-  code: string;
-}
+import { LifeRechargeConstants } from './lifeRechargeConstants';
 
 export interface RequestConfig {}
 
@@ -26,4 +20,263 @@
       ...(options || {}),
     });
   }
+
+  /** 鑾峰彇鎶樻墸 GET /api/LifePay/GetRate */
+  async getRate(options?: RequestConfig) {
+    return this.request<LifePayRateListOutput[]>('/api/LifePay/GetRate', {
+      method: 'GET',
+      ...(options || {}),
+    });
+  }
+
+  /** 鑾峰彇鐢佃垂闈㈠�� GET /api/LifePay/GetElectricParValue */
+  async getElectricParValue(options?: RequestConfig) {
+    return this.request<ElectricParValueResponse>('/api/LifePay/GetElectricParValue', {
+      method: 'GET',
+      ...(options || {}),
+    });
+  }
+
+  /** 鑾峰彇璇濊垂闈㈠�� GET /api/LifePay/GetPhoneParValue */
+  async getPhoneParValue(options?: RequestConfig) {
+    return this.request<PhoneParValueResponse>('/api/LifePay/GetPhoneParValue', {
+      method: 'GET',
+      ...(options || {}),
+    });
+  }
+
+  /** 鍒涘缓鐢熸椿缂磋垂璇濊垂璁㈠崟 POST /api/LifePay/CreateLifePayPhoneOrder */
+  async createLifePayPhoneOrder(
+    body: LifePhoneDataCreateLifePayOrderInput,
+    options?: RequestConfig
+  ) {
+    return this.request<CreateLifePayOrderOutput>('/api/LifePay/CreateLifePayPhoneOrder', {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+      data: body,
+      ...(options || {}),
+    });
+  }
+
+  /** 鍒涘缓鐢熸椿缂磋垂鐢佃垂璁㈠崟 POST /api/LifePay/CreateLifePayElectricOrder */
+  async createLifePayElectricOrder(
+    body: LifeElectricDataCreateLifePayOrderInput,
+    options?: RequestConfig
+  ) {
+    return this.request<CreateLifePayOrderOutput>('/api/LifePay/CreateLifePayElectricOrder', {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+      data: body,
+      ...(options || {}),
+    });
+  }
+
+  /** 鏍规嵁璁㈠崟鍙疯幏鍙栨敮浠樼姸鎬� GET /api/LifePay/GetPayStatusByOrderNo */
+  async getPayStatusByOrderNo(params: APIgetPayStatusByOrderNoParams, options?: RequestConfig) {
+    return this.request<LifeRechargeConstants.LifePayStatusEnum>(
+      '/api/LifePay/GetPayStatusByOrderNo',
+      {
+        method: 'GET',
+        params: {
+          ...params,
+        },
+        ...(options || {}),
+      }
+    );
+  }
+
+  async setLifePayOrderPayType(body: SetLifePayOrderPayTypeInput, options?: RequestConfig) {
+    return this.request<string>('/api/LifePay/SetLifePayOrderPayType', {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+      data: body,
+      ...(options || {}),
+    });
+  }
+
+  /** 鑾峰彇鎴戠殑璁㈠崟鍒嗛〉鏁版嵁 POST /api/LifePay/GetUserLifePayOrderPage */
+  async getUserLifePayOrderPage(body: QueryLifePayOrderListInput, options?: RequestConfig) {
+    return this.request<UserLifePayOrderOutputPageOutput>('/api/LifePay/GetUserLifePayOrderPage', {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+      data: body,
+      ...(options || {}),
+    });
+  }
+}
+
+export interface PhoneMesssageCodeLoginInput {
+  /** 鎵嬫満鍙� */
+  phoneNumber: string;
+  /** 楠岃瘉鐮� */
+  code: string;
+}
+
+export interface LifePayRateListOutput {
+  rateType?: LifeRechargeConstants.LifePayRateTypeEnum;
+  rate?: number;
+}
+
+export interface ElectricParValueResponse {
+  success?: string;
+  requestNo?: string;
+  partnerId?: string;
+  service?: string;
+  version?: string;
+  protocol?: string;
+  context?: string;
+  ext?: string;
+  code?: string;
+  message?: string;
+  detail?: string;
+  electricParValue?: ElectricParValueOutput[];
+}
+
+export interface ElectricParValueOutput {
+  electricType?: string;
+  areaName?: string;
+  parValue?: string;
+  rate?: number;
+  comments?: string;
+}
+
+export interface PhoneParValueResponse {
+  success?: string;
+  requestNo?: string;
+  partnerId?: string;
+  service?: string;
+  version?: string;
+  protocol?: string;
+  context?: string;
+  ext?: string;
+  code?: string;
+  message?: string;
+  detail?: string;
+  phoneParValue?: PhoneParValueOutput[];
+}
+
+export interface PhoneParValueOutput {
+  ispCode?: string;
+  ispName?: string;
+  parValue?: string;
+  rate?: number;
+  phoneSection?: string;
+  comments?: string;
+}
+
+export interface LifePhoneDataCreateLifePayOrderInput {
+  userId?: string;
+  productData?: LifePhoneData;
+}
+
+export interface LifePhoneData {
+  /** 杩愯惀鍟嗙紪鐮侊紝渚嬪锛�"yidong", "dianxin", "liantong"銆� */
+  ispCode: string;
+  /** 鍏呭�奸潰棰濓紝鍗曚綅涓哄厓銆傛祴璇曡处鎴凤細parValue=100:缂磋垂鎴愬姛锛宲arValue>100锛氱即璐瑰け璐ャ�� */
+  parValue: number;
+  /** 鎵嬫満鍙枫�� */
+  phone: string;
+  /** 鏈轰富鍚嶇О(鐢典俊鎵嬫満鍙峰繀濉�) */
+  name?: string;
+}
+
+export interface CreateLifePayOrderOutput {
+  orderNo?: string;
+}
+
+export interface LifeElectricDataCreateLifePayOrderInput {
+  userId?: string;
+  productData?: LifeElectricData;
+}
+
+export interface LifeElectricData {
+  /** 鍏呭�奸潰棰濓紝鍗曚綅涓哄厓銆� */
+  parValue: number;
+  /** 鐢电綉绫诲瀷锛屼緥濡傦細"guowang"浠h〃鍥藉鐢电綉锛�"nanwang"浠h〃鍗楁柟鐢电綉銆� */
+  electricType: string;
+  /** 鐢佃垂绫诲瀷锛屽浗缃戝繀浼狅細浣忓畢銆佷紒浜嬩笟銆佸簵閾轰笁涓�夐」銆� */
+  electricAccountType: string;
+  /** 鐢佃垂鎴峰彿銆� */
+  electricAccount: string;
+  /** 鐪佷唤銆� */
+  province: string;
+  /** 鍩庡競銆� */
+  city: string;
+  /** 瀹㈡埛韬唤璇佸悗6浣嶏紝鍗楃綉蹇呬紶銆� */
+  sixID?: string;
+}
+
+export interface APIgetPayStatusByOrderNoParams {
+  orderNo?: string;
+}
+
+export interface SetLifePayOrderPayTypeInput {
+  orderNo: string;
+  lifePayType?: LifeRechargeConstants.LifePayTypeEnum;
+}
+
+export interface QueryLifePayOrderListInput {
+  pageModel?: Pagination;
+  lifePayOrderType?: LifeRechargeConstants.LifePayOrderTypeEnum;
+  /** 寮�濮嬫敮浠樻椂闂� */
+  beginPayTime?: string;
+  /** 缁撴潫鏀粯鏃堕棿 */
+  endPayTime?: string;
+  payStatus?: LifeRechargeConstants.LifePayStatusEnum;
+  lifePayOrderStatus?: LifeRechargeConstants.LifePayOrderStatusEnum;
+  /** 寮�濮嬪畬鎴愭椂闂� */
+  beginFinishTime?: string;
+  /** 缁撴潫瀹屾垚鏃堕棿 */
+  endFinishTime?: string;
+  /** 鐢ㄦ埛Id */
+  userId?: string;
+}
+
+export interface Pagination {
+  rows?: number;
+  page?: number;
+  orderInput?: OrderInput[];
+  totalCount?: number;
+  totalPage?: number;
+}
+
+export interface OrderInput {
+  property?: string;
+  order?: any;
+}
+
+export interface UserLifePayOrderOutputPageOutput {
+  pageModel?: Pagination;
+  objectData?: any;
+  data?: UserLifePayOrderOutput[];
+}
+
+export interface UserLifePayOrderOutput {
+  id?: string;
+  lifePayType?: LifeRechargeConstants.LifePayTypeEnum;
+  lifePayOrderType?: LifeRechargeConstants.LifePayOrderTypeEnum;
+  /** 璁㈠崟鍙� */
+  orderNo?: string;
+  /** 鍏呭�奸噾棰� */
+  rechargeAmount?: number;
+  /** 浼樻儬閲戦 */
+  discountAmount?: number;
+  /** 瀹炰粯閲戦 */
+  payAmount?: number;
+  /** 鏀粯鏃堕棿 */
+  payTime?: string;
+  payStatus?: LifeRechargeConstants.LifePayStatusEnum;
+  lifePayOrderStatus?: LifeRechargeConstants.LifePayOrderStatusEnum;
+  /** 瀹屾垚鏃堕棿 */
+  finishTime?: string;
+  /** 璁㈠崟璇︾粏鏁版嵁 */
+  orderParamDetailJsonStr?: string;
 }

--
Gitblit v1.9.1