zhengyiming
2025-03-31 848b21bacd06c45ee16d8522acbce800df57b3a6
fix: 四期需求
8个文件已修改
336 ■■■■■ 已修改文件
packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/Mine/Dashboard.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/core/src/lifeRechargeServices.ts 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/LifePay.ts 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/UserRole.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/WxPayNotify.ts 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/typings.d.ts 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);
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>
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);
packages/core/src/lifeRechargeServices.ts
@@ -375,6 +375,21 @@
      }
    );
  }
  /** 获取顶部统计数据 GET /api/LifePay/GetTopStatistics */
  async getTopStatistics(
    // 叠加生成的Param类型 (非body参数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;
}
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(
  // 叠加生成的Param类型 (非body参数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(
  // 叠加生成的Param类型 (非body参数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(
  // 叠加生成的Param类型 (非body参数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(
  // 叠加生成的Param类型 (非body参数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(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIwxPayTradeQueryParams,
  options?: API.RequestConfig
) {
  return request<API.WxPayTradeQueryReponse>('/api/LifePay/WxPayTradeQuery', {
    method: 'GET',
    params: {
      ...params,
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,
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
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;
    /** 渠道佣金比例 */
    channlesRakeRate?: number;
    /** 佣金 */
    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;