From b823ca3d9f2e6dd6cdc2d388576d02c73d5f9896 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期一, 01 十二月 2025 13:20:45 +0800
Subject: [PATCH] release: @life-payment/core v0.0.4
---
packages/core/src/lifeRechargeServices.ts | 403 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 394 insertions(+), 9 deletions(-)
diff --git a/packages/core/src/lifeRechargeServices.ts b/packages/core/src/lifeRechargeServices.ts
index 908687f..0e89d24 100644
--- a/packages/core/src/lifeRechargeServices.ts
+++ b/packages/core/src/lifeRechargeServices.ts
@@ -16,7 +16,8 @@
this.ctx = ctx;
this.request = Request.create({
...axiosConfig,
- // baseURL: process.env.NODE_ENV === 'development' ? '/' : 'https://api.81812333.com',
+ //@ts-ignore
+ baseURL: typeof Global_BaseURL !== 'undefined' ? Global_BaseURL : axiosConfig.baseURL,
requestInterceptors: [
[
(config) => {
@@ -42,14 +43,17 @@
}
async lifePayPhoneMesssageCodeLogin(body: PhoneMesssageCodeLoginInput, options?: RequestConfig) {
- return this.request<string>('/api/Account/LifePayPhoneMesssageCodeLogin', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- data: body,
- ...(options || {}),
- });
+ return this.request<LifePayPhoneMesssageCodeLoginOutput>(
+ '/api/Account/LifePayPhoneMesssageCodeLogin',
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ }
+ );
}
/** 鑾峰彇鎶樻墸 GET /api/LifePay/GetRate */
@@ -326,6 +330,174 @@
...(options || {}),
});
}
+
+ /** 鑾峰彇娓犻亾鎶樻墸 GET /api/LifePay/GetChannelRate */
+ async getChannelRate(body: ChannelsBaseInput, options?: RequestConfig) {
+ return this.request<ChannelRateOutput>('/api/LifePay/GetChannelRate', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ });
+ }
+
+ /** 鑾峰彇鍦ㄧ嚎瀹㈡湇 GET /api/LifePay/GetOnlineService */
+ async getOnlineService(options?: RequestConfig) {
+ return this.request<string>('/api/LifePay/GetOnlineService', {
+ method: 'GET',
+ ...(options || {}),
+ });
+ }
+
+ /** 鑾峰彇鍏ㄩ儴缂磋垂娓犻亾 GET /api/LifePay/GetLifePayChannlesAllList */
+ async getLifePayChannlesAllList(body: QueryLifePayChannlesInput, options?: RequestConfig) {
+ return this.request<CreateEditPayChannelsInput[]>('/api/LifePay/GetLifePayChannlesAllList', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ });
+ }
+
+ /** 鏍规嵁鐢ㄦ埛ID鑾峰彇鐢ㄦ埛鏄惁涓哄悗鍙扮鐞嗗憳 POST /api/Account/LifePayUserMesssageByIduser */
+ async lifePayUserMesssageByIduser(
+ body: LifePayUserMesssageByIduserInput,
+ options?: RequestConfig
+ ) {
+ return this.request<LifePayPhoneMesssageCodeLoginOutput>(
+ '/api/Account/LifePayUserMesssageByIduser',
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ }
+ );
+ }
+
+ /** 鑾峰彇椤堕儴缁熻鏁版嵁 GET /api/LifePay/GetTopStatistics */
+ async getTopStatistics(
+ // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
+ body: TopStatisticsInput,
+ options?: RequestConfig
+ ) {
+ return this.request<TopStatisticsOutput>('/api/LifePay/GetTopStatistics', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ });
+ }
+
+ /** 鐐瑰嚮鏁�+1 POST /api/Promoter/SetClickCount */
+ async setClickCount(
+ // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
+ params: APIsetClickCountParams,
+ options?: RequestConfig
+ ) {
+ return this.request<any>('/api/Promoter/SetClickCount', {
+ method: 'POST',
+ params: {
+ ...params,
+ },
+ ...(options || {}),
+ });
+ }
+
+ /** 鐢宠娓犻亾鍜ㄨ POST /api/Promoter/CreateChannelConsultation */
+ async createChannelConsultation(body: CreateChannelConsultationInput, options?: RequestConfig) {
+ return this.request<string>('/api/Promoter/CreateChannelConsultation', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ });
+ }
+
+ /** 鍒涘缓鎴栨洿鏂版帹骞垮憳 POST /api/Promoter/CreateOrUpdatePromoter */
+ async createOrUpdatePromoter(body: CreateOrUpdatePromoterInput, options?: RequestConfig) {
+ return this.request<CreateOrUpdatePromoterOutput>('/api/Promoter/CreateOrUpdatePromoter', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ });
+ }
+
+ /** 鑾峰彇娓犻亾鍜ㄨId GET /api/Promoter/GetChannelConsultationById */
+ async getChannelConsultationById(
+ // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
+ params: APIgetChannelConsultationByIdParams,
+ options?: RequestConfig
+ ) {
+ return this.request<ChannelConsultationDto>('/api/Promoter/GetChannelConsultationById', {
+ method: 'GET',
+ params: {
+ ...params,
+ },
+ ...(options || {}),
+ });
+ }
+
+ /** 鑾峰彇鎺ㄥ箍鍛樹俊鎭� GET /api/Promoter/GetPromoter */
+ async getPromoter(
+ // 鍙犲姞鐢熸垚鐨凱aram绫诲瀷 (闈瀊ody鍙傛暟swagger榛樿娌℃湁鐢熸垚瀵硅薄)
+ params: APIgetPromoterParams,
+ options?: RequestConfig
+ ) {
+ return this.request<PromoterDto>('/api/Promoter/GetPromoter', {
+ method: 'GET',
+ params: {
+ ...params,
+ },
+ ...(options || {}),
+ });
+ }
+
+ /** 鑾峰彇褰撳墠灞曠ず涓殑鍏憡 POST /api/LifePayAnnouncement/GetShowingLifePayAnnouncement */
+ async getShowingLifePayAnnouncement(
+ body: GetShowingLifePayAnnouncementInput,
+ options?: RequestConfig
+ ) {
+ return this.request<CreateEditLifePayAnnouncementOutput>(
+ '/api/LifePayAnnouncement/GetShowingLifePayAnnouncement',
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ }
+ );
+ }
+
+ /** 鑾峰彇鎶樻墸閫氶亾閰嶇疆鍒楄〃 POST /api/LifePayRate/GetLifePayRateChannelAllList */
+ async getLifePayRateChannelAllList(body: QueryRateChannelInput, options?: RequestConfig) {
+ return this.request<CreateEditRateChannelOutput[]>(
+ '/api/LifePayRate/GetLifePayRateChannelAllList',
+ {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ data: body,
+ ...(options || {}),
+ }
+ );
+ }
}
export interface PhoneMesssageCodeLoginInput {
@@ -502,6 +674,8 @@
creationTime?: string;
/** 閫�娆炬椂闂� */
refundTime?: string;
+ /** 閫�娆剧敵璇锋椂闂� */
+ refundApplyTime?: string;
/** 閫�娆惧嚟璇� */
refundCredentialsImgUrl?: string;
refundApplyRemark?: string;
@@ -757,3 +931,214 @@
}
export type IntroInfoTypeEnum = 0 | 1 | 2 | 3 | 4;
+
+export interface ChannelRateOutput {
+ channlesRate?: number;
+}
+
+export interface CreateEditPayChannelsInput {
+ id?: string;
+ channlesName?: string;
+ channlesNum?: string;
+ channlesRate?: number;
+ channlesRakeRate?: number;
+}
+
+export interface LifePayPhoneMesssageCodeLoginOutput {
+ /** 鐢ㄦ埛Id */
+ userId?: string;
+ /** 鎺ㄥ箍鍛業D */
+ promoterIdNumber?: string;
+ /** 鏄惁鏄悗鍙扮敤鎴� */
+ isBackClientUser?: boolean;
+ /** 娓犻亾鍙� */
+ channlesNum?: ChannelOutput[];
+}
+
+export interface ChannelOutput {
+ name?: string;
+ channlesNum?: string;
+ channlesId?: string;
+ switchType?: LifeRechargeConstants.LifePaySwitchTypeEnum;
+}
+
+export interface LifePayUserMesssageByIduserInput {
+ pageModel?: Pagination;
+ checkChannelId?: string;
+ /** 鐢ㄦ埛缂栧彿 */
+ id?: string;
+}
+
+export interface TopStatisticsInput {
+ channleList?: 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;
+ /** 绱浣i噾 */
+ accumulatedChannlesRakePrice?: number;
+}
+
+export interface QueryLifePayChannlesInput {
+ status?: LifeRechargeConstants.LifePayChannelsStatsEnum;
+}
+
+export interface APIsetClickCountParams {
+ idnumber?: string;
+}
+
+export interface CreateChannelConsultationInput {
+ /** 瀹㈡埛绔敤鎴稩d 濡傛湁 */
+ userId?: string;
+ /** 鎺ㄥ箍浜篒d */
+ idNumber?: string;
+ /** 鍜ㄨ浜� */
+ name?: string;
+ agentType?: LifeRechargeConstants.LifePayChannelAgentType;
+ /** 鑱旂郴鏂瑰紡 */
+ phoneNumber?: string;
+ /** 鍏徃鍚嶇О */
+ companyName?: string;
+ /** 瀹㈡埛璧勬簮 */
+ customerResources?: string;
+}
+
+export interface CreateOrUpdatePromoterInput {
+ /** Id */
+ id?: string;
+ /** 瀹㈡埛绔敤鎴稩d 濡傛湁 */
+ userId?: string;
+ /** ID */
+ idNumber?: string;
+ /** 鎺ㄥ箍鍛� */
+ name?: string;
+ /** 鑱旂郴鏂瑰紡 */
+ phoneNumber?: string;
+ /** 澶囨敞 */
+ remark?: string;
+}
+
+export interface APIgetChannelConsultationByIdParams {
+ id?: string;
+}
+
+export type LifePayChannelAgentType = 1 | 2 | 3;
+
+export type LifePayChannelConsultationFollowupStatus = 1 | 2 | 3 | 4;
+
+export interface ChannelConsultationDto {
+ /** Id */
+ id?: string;
+ /** 鍜ㄨ鏃堕棿 */
+ creationTime?: string;
+ /** 鍜ㄨ浜� */
+ name?: string;
+ agentType?: LifePayChannelAgentType;
+ /** 鑱旂郴鏂瑰紡 */
+ phoneNumber?: string;
+ /** 鍏徃鍚嶇О */
+ companyName?: string;
+ /** 瀹㈡埛璧勬簮 */
+ customerResources?: string;
+ /** ID */
+ promoterIdNumber?: string;
+ /** 鎺ㄥ箍鍛� */
+ promoterName?: string;
+ /** 鑱旂郴鏂瑰紡 */
+ promoterPhoneNumber?: string;
+ followupStatus?: LifePayChannelConsultationFollowupStatus;
+ /** 鏈�杩戝洖璁� */
+ lastFollowupTime?: string;
+ /** 鍥炶璁板綍 */
+ followupRemark?: string;
+}
+
+export interface APIgetPromoterParams {
+ phoneNumber?: string;
+}
+
+export interface PromoterDto {
+ /** Id */
+ id?: string;
+ /** 鍜ㄨ鏃堕棿 */
+ creationTime?: string;
+ /** ID */
+ idNumber?: string;
+ /** 鎺ㄥ箍鍛� */
+ name?: string;
+ /** 鑱旂郴鏂瑰紡 */
+ phoneNumber?: string;
+ /** 鐐瑰嚮鏁� */
+ clickCount?: number;
+ /** 鐢宠鏁� */
+ applyCount?: number;
+ /** 澶囨敞 */
+ remark?: string;
+}
+
+export interface CreateOrUpdatePromoterOutput {
+ /** Id */
+ id?: string;
+ /** IdNumber */
+ idNumber?: string;
+}
+
+export interface GetShowingLifePayAnnouncementInput {
+ announcementType?: LifeRechargeConstants.AnnouncementTypeEnum;
+}
+
+export interface CreateEditLifePayAnnouncementOutput {
+ id?: string;
+ announcementType: LifeRechargeConstants.AnnouncementTypeEnum;
+ /** 鐢熸晥鏃ユ湡 */
+ startTime: string;
+ /** 鎴鏃ユ湡 */
+ endTime: string;
+ /** 鍏憡鍐呭 */
+ announcementContent: string;
+ creationTime?: string;
+ status?: LifeRechargeConstants.AnnouncementStatusEnum;
+}
+
+export interface QueryRateChannelInput {
+ status?: LifeRechargeConstants.LifePayRateChannelStatus;
+ lifePayOrderType?: LifeRechargeConstants.LifePayOrderTypeEnum;
+}
+
+export interface CreateEditRateChannelOutput {
+ id?: string;
+ lifePayOrderType: LifeRechargeConstants.LifePayOrderTypeEnum;
+ /** 閫氶亾 */
+ rateChannelName: string;
+ /** ID */
+ code: string;
+ /** 渚涘簲鍟嗘姌鎵� */
+ supplierRate: number;
+ /** 骞冲彴鎶樻墸 */
+ platformRate: number;
+ status: LifeRechargeConstants.LifePayRateChannelStatus;
+ /** 閫氱煡鍐呭 */
+ remark: string;
+ creationTime?: string;
+}
--
Gitblit v1.9.1