From f2025539d8bf4798b90a5ab8a47c5a379ab68e9b Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 11 三月 2025 17:51:43 +0800
Subject: [PATCH] fix: 二期需求

---
 packages/core/src/lifeRechargeServices.ts |  145 +++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 143 insertions(+), 2 deletions(-)

diff --git a/packages/core/src/lifeRechargeServices.ts b/packages/core/src/lifeRechargeServices.ts
index 6e3e758..865a7e2 100644
--- a/packages/core/src/lifeRechargeServices.ts
+++ b/packages/core/src/lifeRechargeServices.ts
@@ -7,7 +7,17 @@
 export class BlLifeRechargeServices<TResponse = any, TRequestOptions = any> {
   private request: IRequest;
   constructor({ axiosConfig }: BlLifeRechargeServicesOptions<TResponse, TRequestOptions>) {
-    this.request = Request.create(axiosConfig);
+    this.request = Request.create({
+      ...axiosConfig,
+      // baseURL: process.env.NODE_ENV === 'development' ? '/' : 'https://api.81812333.com',
+      timeout: 10 * 1000,
+      headers: {
+        Accept: 'application/json, text/plain, */*',
+        'Content-Type': 'application/json',
+        'X-Requested-With': 'XMLHttpRequest',
+      },
+      withCredentials: true,
+    });
   }
 
   async lifePayPhoneMesssageCodeLogin(body: PhoneMesssageCodeLoginInput, options?: RequestConfig) {
@@ -146,13 +156,57 @@
       ...(options || {}),
     });
   }
+
+  /** 鑾峰彇鎴戠殑鍏ㄩ儴鎴峰彿鍒楄〃 POST /api/LifePay/GetUserAccountAllList */
+  async getUserAccountAllList(body: QueryUserAccountAllListInput, options?: RequestConfig) {
+    return this.request<UserAccountListOutput[]>('/api/LifePay/GetUserAccountAllList', {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+      data: body,
+      ...(options || {}),
+    });
+  }
+
+  /** 娣诲姞鎴栦慨鏀规垜鐨勬埛鍙� POST /api/LifePay/AddUpdateUserAccount */
+  async addUpdateUserAccount(body: AddUpdateUserAccountInput, options?: RequestConfig) {
+    return this.request<number>('/api/LifePay/AddUpdateUserAccount', {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+      data: body,
+      ...(options || {}),
+    });
+  }
+
+  /** 鍒涘缓鐢熸椿缂磋垂鐕冩皵璁㈠崟 POST /api/LifePay/CreateLifePayGasOrder */
+  async createLifePayGasOrder(body: LifeGasDataCreateLifePayOrderInput, options?: RequestConfig) {
+    return this.request<CreateLifePayOrderOutput>('/api/LifePay/CreateLifePayGasOrder', {
+      method: 'POST',
+      headers: {
+        'Content-Type': 'application/json',
+      },
+      data: body,
+      ...(options || {}),
+    });
+  }
+
+  /** 鑾峰彇鐕冩皵闈㈠�� GET /api/LifePay/GetGasParValue */
+  async getGasParValue(options?: RequestConfig) {
+    return this.request<GasParValueResponse>('/api/LifePay/GetGasParValue', {
+      method: 'GET',
+      ...(options || {}),
+    });
+  }
 }
 
 export interface PhoneMesssageCodeLoginInput {
   /** 鎵嬫満鍙� */
   phoneNumber: string;
   /** 楠岃瘉鐮� */
-  code: string;
+  // code: string;
 }
 
 export interface LifePayRateListOutput {
@@ -370,6 +424,7 @@
   lifePayType?: LifeRechargeConstants.LifePayTypeEnum;
   openId?: string;
   attach?: string;
+  payAppId?: string;
 }
 
 export interface ModelPaymentMiniPay {
@@ -381,3 +436,89 @@
   timeExpire?: string;
   message?: string;
 }
+
+export interface QueryUserAccountAllListInput {
+  /** 鐢ㄦ埛Id */
+  userId?: string;
+  lifePayOrderType?: LifeRechargeConstants.LifePayOrderTypeEnum;
+}
+
+export interface UserAccountListOutput {
+  id?: string;
+  lifePayType?: LifeRechargeConstants.LifePayOrderTypeEnum;
+  /** 杩愯惀鍟� */
+  operators?: string;
+  /** 鎵嬫満鍙�/鎴峰彿 */
+  content?: string;
+  /** 鐪� */
+  province?: string;
+  /** 甯� */
+  city?: string;
+  /** 鎷撳睍瀛楁锛堢數璐圭被鍨嬶級 */
+  extraProperties?: string;
+  /** 澶囨敞 */
+  remark?: string;
+  /** 鍒涘缓鏃堕棿 */
+  creationTime?: string;
+  isDeleted?: boolean;
+}
+
+export interface AddUpdateUserAccountInput {
+  id?: string;
+  /** 鐢ㄦ埛缂栧彿 */
+  userId?: string;
+  lifePayType?: LifeRechargeConstants.LifePayOrderTypeEnum;
+  /** 杩愯惀鍟� */
+  operators?: string;
+  /** 鎵嬫満鍙�/鎴峰彿 */
+  content?: string;
+  /** 鐪� */
+  province?: string;
+  /** 甯� */
+  city?: string;
+  /** 鎷撳睍瀛楁锛堢數璐圭被鍨嬶級 */
+  extraProperties?: string;
+  /** 澶囨敞 */
+  remark?: string;
+}
+
+export interface LifeGasDataCreateLifePayOrderInput {
+  userId?: string;
+  productData?: LifeGasData;
+}
+
+export interface LifeGasData {
+  /** 鍏呭�奸潰棰濓紝鍗曚綅涓哄厓銆� */
+  parValue: number;
+  /** 澶╃劧姘斿叕鍙哥被鍨嬶紝"zhong_ran"浠h〃涓噧鐕冩皵锛�"bei_jing"浠h〃鍖椾含鐕冩皵銆� */
+  gasOrgType: string;
+  /** 鐕冩皵鎴峰彿 */
+  gasAccount: string;
+  /** 鐪佷唤 */
+  province: string;
+  /** 鍩庡競 */
+  city?: string;
+}
+
+export interface GasParValueResponse {
+  success?: boolean;
+  requestNo?: string;
+  partnerId?: string;
+  service?: string;
+  version?: string;
+  protocol?: string;
+  context?: string;
+  ext?: any;
+  code?: string;
+  message?: string;
+  detail?: string;
+  gasParValue?: GasParValueOutput;
+}
+
+export interface GasParValueOutput {
+  gasOrgName?: string;
+  gasOrgCode?: string;
+  parValue?: string[];
+  rate?: number;
+  comments?: string;
+}

--
Gitblit v1.9.1