zhengyiming
2025-02-21 bc9db06646fc925635dd5995d521bcf9fd05aa93
fix: 对接
10个文件已修改
3个文件已添加
789 ■■■■■ 已修改文件
packages/components/src/components/Dialog/ConfirmDialogInfoItem.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/hooks/index.ts 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/utils/index.ts 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/utils/lifeRecharge.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/utils/lifeRechargeConstants.ts 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/utils/lifeRechargeServices.ts 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/utils/validator.ts 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/PhoneBillRecharge/PhoneBillRecharge.vue 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/views/SelectPayTypeView/SelectPayTypeView.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/AliPayNotify.ts 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/LifePay.ts 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/Test.ts 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/services/api/typings.d.ts 146 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
packages/components/src/components/Dialog/ConfirmDialogInfoItem.vue
@@ -12,7 +12,7 @@
type Props = {
  label?: string;
  content?: string;
  content?: string | number;
  danger?: boolean;
};
packages/components/src/hooks/index.ts
New file
@@ -0,0 +1,59 @@
import {
  useLifeRechargeContext,
  LifePayRateListOutput,
  PhoneParValueOutput,
  PhoneParValueResponse,
} from '../utils';
import { useQuery } from '@tanstack/vue-query';
import { computed } from 'vue';
export function useGetRate() {
  const { blLifeRecharge } = useLifeRechargeContext();
  const { data: lifePayRateList, isLoading } = useQuery({
    queryKey: ['blLifeRecharge/getRate'],
    queryFn: async () => {
      return await blLifeRecharge.services.getRate({ showLoading: false });
    },
    placeholderData: () => [] as LifePayRateListOutput[],
  });
  const lifePayPhoneRate = computed(
    () =>
      lifePayRateList.value.find(
        (x) => x.rateType === blLifeRecharge.constants.LifePayRateTypeEnum.默认话费折扣
      )?.rate ?? 1
  );
  const lifePayElectricRate = computed(
    () =>
      lifePayRateList.value.find(
        (x) => x.rateType === blLifeRecharge.constants.LifePayRateTypeEnum.默认电费折扣
      )?.rate ?? 1
  );
  return {
    lifePayRateList,
    lifePayPhoneRate,
    lifePayElectricRate,
  };
}
export function useGetPhoneParValue() {
  const { blLifeRecharge } = useLifeRechargeContext();
  const { data: phoneParValueList, isLoading } = useQuery({
    queryKey: ['blLifeRecharge/getPhoneParValue'],
    queryFn: async () => {
      return await blLifeRecharge.services.getPhoneParValue({ showLoading: false });
    },
    select(data) {
      return data.phoneParValue ?? [];
    },
    placeholderData: () => ({} as PhoneParValueResponse),
  });
  return {
    phoneParValueList,
  };
}
packages/components/src/utils/index.ts
@@ -2,3 +2,4 @@
export * from './plugin';
export * from './lifeRechargeServices';
export * from './types';
export * from './validator';
packages/components/src/utils/lifeRecharge.ts
@@ -4,11 +4,15 @@
  RequestConfig,
} from './lifeRechargeServices';
import { IRequest, BlLifeRechargeOptions } from './types';
import { LifeRechargeConstants } from './lifeRechargeConstants';
export class BlLifeRecharge<T extends IRequest = IRequest> {
  services: BlLifeRechargeServices<T>;
  userId = '';
  static constants = LifeRechargeConstants;
  constants = LifeRechargeConstants;
  constructor(options: BlLifeRechargeOptions<T>) {
    this.services = new BlLifeRechargeServices(options);
    this.userId = options.userId || '';
packages/components/src/utils/lifeRechargeConstants.ts
New file
@@ -0,0 +1,49 @@
export namespace LifeRechargeConstants {
  export enum LifePayRateTypeEnum {
    '默认话费折扣' = 10,
    '默认电费折扣' = 10,
  }
  export enum LifePayTypeEnum {
    WxPay = 10,
    AliPay = 20,
  }
  export enum LifePayOrderTypeEnum {
    话费订单 = 10,
    电费订单 = 20,
  }
  export enum LifePayStatusEnum {
    未支付 = 10,
    已支付 = 20,
    待退款 = 30,
    已退款 = 40,
  }
  export enum LifePayOrderStatusEnum {
    待确认 = 10,
    已失败 = 20,
    已完成 = 30,
  }
  export enum IspCode {
    /**中国移动 */
    yidong = 'yidong',
    /**中国电信 */
    dianxin = 'dianxin',
    /**中国联通 */
    liantong = 'liantong',
  }
  export const IspCodeText = {
    [IspCode.yidong]: '中国移动',
    [IspCode.dianxin]: '中国电信',
    [IspCode.liantong]: '中国联通',
  };
}
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,180 @@
      ...(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 || {}),
      }
    );
  }
}
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;
  lifePayType?: LifeRechargeConstants.LifePayTypeEnum;
  productData?: LifePhoneData;
}
export interface LifePhoneData {
  /** 运营商编码,例如:"yidong", "dianxin", "liantong"。 */
  ispCode: string;
  /** 充值面额,单位为元。测试账户:parValue=100:缴费成功,parValue>100:缴费失败。 */
  parValue: number;
  /** 手机号。 */
  phone: string;
  /** 机主名称(电信手机号必填) */
  name?: string;
}
export interface CreateLifePayOrderOutput {
  orderNo?: string;
  payUrl?: string;
}
export interface LifeElectricDataCreateLifePayOrderInput {
  userId?: string;
  lifePayType?: LifeRechargeConstants.LifePayTypeEnum;
  productData?: LifeElectricData;
}
export interface LifeElectricData {
  /** 充值面额,单位为元。 */
  parValue: number;
  /** 电网类型,例如:"guowang"代表国家电网,"nanwang"代表南方电网。 */
  electricType: string;
  /** 电费类型,国网必传:住宅、企事业、店铺三个选项。 */
  electricAccountType: string;
  /** 电费户号。 */
  electricAccount: string;
  /** 省份。 */
  province: string;
  /** 城市。 */
  city: string;
  /** 客户身份证后6位,南网必传。 */
  sixID?: string;
}
export interface APIgetPayStatusByOrderNoParams {
  orderNo?: string;
}
packages/components/src/utils/validator.ts
New file
@@ -0,0 +1,115 @@
// import _ from 'lodash';
import { FormItemRuleWithoutValidator } from '@nutui/nutui-taro/dist/types/__VUE/form/types';
export class FormValidator {
  /**
   * 验证表单input-number 不为0
   */
  static validatorNumberNotNull(value: any, ruleCfg: FormItemRuleWithoutValidator) {
    // eslint-disable-next-line eqeqeq
    if (!value) {
      return Promise.reject(ruleCfg.message);
    }
    return Promise.resolve(true);
  }
  // static validatorArray(value: any, ruleCfg: FormItemRuleWithoutValidator) {
  //   if (!_.isArray(value) || !value?.length) {
  //     return Promise.reject(ruleCfg.message);
  //   }
  //   return Promise.resolve(true);
  // }
  static validatorUrl(value: string, ruleCfg: FormItemRuleWithoutValidator) {
    if (BoleRegExp.RegUrl.test(value)) {
      return Promise.resolve(true);
    }
    return Promise.reject(ruleCfg.message);
  }
  static validatorUrlWithRarameter(value: string, ruleCfg: FormItemRuleWithoutValidator) {
    if (BoleRegExp.RegUrlWithParameter.test(value)) {
      return Promise.resolve(true);
    }
    return Promise.reject(ruleCfg.message);
  }
  static validatorSocietyCreditCode(value: string, ruleCfg: FormItemRuleWithoutValidator) {
    if (!ruleCfg.required && !value) return Promise.resolve(true);
    if (/^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g.test(value)) {
      return Promise.resolve(true);
    }
    return Promise.reject(ruleCfg.message);
  }
  static validatorPhoneNumber(value: string, ruleCfg: FormItemRuleWithoutValidator) {
    console.log('value: ', value);
    if (BoleRegExp.RegPhoneNumber.test(value)) {
      return Promise.resolve(true);
    }
    return Promise.reject(ruleCfg.message);
  }
  static validatorTelNumber(value: string, ruleCfg: FormItemRuleWithoutValidator) {
    if (BoleRegExp.RegTelNumber.test(value)) {
      return Promise.resolve(true);
    }
    return Promise.reject(ruleCfg.message);
  }
  static validatorIDCard(value: string, ruleCfg: FormItemRuleWithoutValidator) {
    if (BoleRegExp.RegIDCard.test(value)) {
      return Promise.resolve(true);
    }
    return Promise.reject(ruleCfg.message);
  }
  static validatorNumber(value: string, ruleCfg: FormItemRuleWithoutValidator) {
    if (BoleRegExp.RegNumber.test(value)) {
      return Promise.resolve(true);
    }
    return Promise.reject(ruleCfg.message);
  }
  static validatorEmail(value: string, ruleCfg: FormItemRuleWithoutValidator) {
    if (!ruleCfg.required && !value) return Promise.resolve(true);
    if (BoleRegExp.RegEmail.test(value)) {
      return Promise.resolve(true);
    }
    return Promise.reject(ruleCfg.message);
  }
}
export class BoleRegExp {
  static RegIDCard =
    /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
  // static RegEmail =
  //   /^(([^<>()\\[\]\\.,;:\s@"]+(\.[^<>()\\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/;
  static RegEmail = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
  /**只有手机 */
  static RegPhoneNumber = /^1[3-9]\d{9}$/;
  /**座机 + 手机*/
  static RegTelNumber =
    /(^(0[0-9]{2,3})?[-\s]?([2-9][0-9]{6,7})+([0-9]{1,4})?$)|(^((\(\d{3}\))|(\d{3}[-\s]))?(1[3-9]\d{9})$)|(^(400)[-\s](\d{3})[-\s](\d{4})(.)(\d{1,4})$)|(^(400)(\d{3})(\d{4}$))/;
  /**只有座机 */
  static RegOnlyTelNumber =
    /(^(0[0-9]{2,3})?[-\s]?([2-9][0-9]{6,7})+([0-9]{1,4})?$)|(^(400)[-\s](\d{3})[-\s](\d{4})(.)(\d{1,4})$)|(^(400)(\d{3})(\d{4}$))/;
  static RegSocietyCreditCode = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g;
  static RegNumber = /^\d+$/;
  static RegFileName = /(.*\/)*([^.]+).*/gi;
  static RegCanPreview = /png|jpg|jpeg|doc|docx|txt|ppsx|xlsx|xls|pdf/gi;
  static RegDecimalNumber = /^\d+(\.\d{0,2}){0,1}$/;
  static RegBankCard = /^\d{16,30}$/;
  static RegUrl = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w+)*\/?$/;
  static RegUrlWithParameter =
    /^((http|ftp|https):\/\/)?[\w\-_]+(\.[\w\-_]+)+([\w\-\\.,@?^=%&:/~\\+#]*[\w\-\\@?^=%&/~\\+#])?$/;
  static RegUrlWithParameterExact =
    /^((http|ftp|https):\/\/)[\w\-_]+(\.[\w\-_]+)+([\w\-\\.,@?^=%&:/~\\+#]*[\w\-\\@?^=%&/~\\+#])?$/;
}
packages/components/src/views/PhoneBillRecharge/PhoneBillRecharge.vue
@@ -8,7 +8,12 @@
  >
    <FormItem label="选择运营商:" class="bole-form-item" prop="ispCode" required>
      <RadioGroup v-model="form.ispCode" direction="horizontal">
        <BlRadio :label="key" v-for="(val, key) in IspCodeText" :key="key">{{ val }}</BlRadio>
        <BlRadio
          :label="key"
          v-for="(val, key) in BlLifeRecharge.constants.IspCodeText"
          :key="key"
          >{{ val }}</BlRadio
        >
      </RadioGroup>
    </FormItem>
    <FormItem label="充值手机号" class="bole-form-item" prop="phone" required>
@@ -16,6 +21,20 @@
        v-model.trim="form.phone"
        class="bole-input-text"
        placeholder="请填写您需要充值的手机号码"
        type="text"
      />
    </FormItem>
    <FormItem
      label="姓名"
      class="bole-form-item"
      prop="name"
      required
      v-if="form.ispCode === BlLifeRecharge.constants.IspCode.dianxin"
    >
      <Input
        v-model.trim="form.name"
        class="bole-input-text"
        placeholder="请填写您的姓名"
        type="text"
      />
    </FormItem>
@@ -35,15 +54,17 @@
            </div>
            <div class="price-wrapper">
              <div class="price-text">折后</div>
              <div class="price">{{ blLifeRecharge.getRechargeParValue(item, rate) }}元</div>
              <div class="price">
                {{ blLifeRecharge.getRechargeParValue(item, lifePayPhoneRate) }}元
              </div>
            </div>
            <div class="discountTag">{{ rate * 100 }}折</div>
            <div class="discountTag">{{ lifePayPhoneRate * 100 }}折</div>
          </div>
        </Radio>
      </RadioGroup>
    </FormItem>
    <div class="common-content">
      <nut-button class="recharge-button" type="primary" @click="recharge">
      <nut-button class="recharge-button" type="primary" @click="handleSubmit">
        <div class="recharge-button-inner">
          <div>¥{{ form.parValue }}</div>
          <div class="recharge-button-text">立即充值</div>
@@ -53,9 +74,9 @@
    </div>
    <ConfirmDialog v-model:visible="confirmDialogVisible" @ok="goPay">
      <template #info>
        <ConfirmDialogInfoItem label="充值账号" content="18858418480" />
        <ConfirmDialogInfoItem label="充值金额" :content="`¥${form.parValue}`" danger />
        <ConfirmDialogInfoItem label="优惠金额" :content="`¥${discountParValue}`" />
        <ConfirmDialogInfoItem label="充值账号" :content="form.phone" />
        <ConfirmDialogInfoItem label="充值金额" :content="`¥${form.parValue.toFixed(2)}`" danger />
        <ConfirmDialogInfoItem label="优惠金额" :content="`¥${discountParValue.toFixed(2)}`" />
        <ConfirmDialogInfoItem label="实付金额" :content="`¥${realParValue}`" danger />
      </template>
    </ConfirmDialog>
@@ -67,36 +88,63 @@
import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types';
import { reactive, ref, computed } from 'vue';
import BlRadio from '../../components/Radio/Radio.vue';
import { IspCodeText, IspCode } from '../../constants';
import { useLifeRechargeContext } from '../../utils';
import {
  useLifeRechargeContext,
  BlLifeRecharge,
  LifePhoneDataCreateLifePayOrderInput,
  FormValidator,
} from '../../utils';
import RechargeTipsView from '../../components/RechargeTipsView/RechargeTipsView.vue';
import ConfirmDialog from '../../components/Dialog/ConfirmDialog.vue';
import ConfirmDialogInfoItem from '../../components/Dialog/ConfirmDialogInfoItem.vue';
import { useGetRate, useGetPhoneParValue } from '../../hooks';
defineOptions({
  name: 'PhoneBillRecharge',
});
const emit = defineEmits<{
  (e: 'goPay'): void;
}>();
const form = reactive({
  ispCode: IspCode.yidong,
  ispCode: BlLifeRecharge.constants.IspCode.yidong,
  phone: '',
  parValue: 100,
  parValue: 0,
  name: '',
});
const rate = 0.96;
const emit = defineEmits<{
  (
    e: 'goPay',
    form: {
      ispCode: typeof BlLifeRecharge.constants.IspCode;
      phone: string;
      parValue: number;
      name: string;
    }
  ): void;
}>();
const { lifePayPhoneRate } = useGetRate();
const { phoneParValueList } = useGetPhoneParValue();
const parValueList = [50, 100, 200];
const realParValue = computed(() => blLifeRecharge.getRechargeParValue(form.parValue, rate));
const realParValue = computed(() =>
  blLifeRecharge.getRechargeParValue(form.parValue, lifePayPhoneRate.value)
);
const discountParValue = computed(() => form.parValue - Number(realParValue.value));
const { blLifeRecharge } = useLifeRechargeContext();
const rules = reactive<FormRules>({});
const rules = reactive<FormRules>({
  ispCode: [{ required: true, message: '请选择运营商' }],
  phone: [
    { required: true, message: '请输入充值手机号' },
    { validator: FormValidator.validatorPhoneNumber, message: '请输入正确的手机号' },
  ],
  name: [{ required: true, message: '请输入姓名' }],
  parValue: [
    { required: true, message: '请选择充值金额', validator: FormValidator.validatorNumberNotNull },
  ],
});
const formRef = ref<any>(null);
@@ -104,6 +152,7 @@
  if (!formRef.value) return;
  formRef.value.validate().then(({ valid, errors }: any) => {
    if (valid) {
      recharge();
    }
  });
}
@@ -123,6 +172,22 @@
  confirmDialogVisible.value = true;
}
async function createLifePayPhoneOrder() {
  try {
    let params: LifePhoneDataCreateLifePayOrderInput = {
      userId: blLifeRecharge.userId,
      // lifePayType: 10,
      productData: {
        ispCode: form.ispCode,
        parValue: 0.1,
        phone: '18858418480',
        name: form.ispCode === BlLifeRecharge.constants.IspCode.dianxin ? form.name : '',
      },
    };
    let res = await blLifeRecharge.services.createLifePayPhoneOrder(params);
  } catch (error) {}
}
function goPay() {
  emit('goPay');
}
packages/components/src/views/SelectPayTypeView/SelectPayTypeView.vue
@@ -1,6 +1,6 @@
<template>
  <div class="select-pay-type-view">
    <div class="select-pay-type-view-item">
    <div class="select-pay-type-view-item" @click="handleAliPay">
      <img class="select-pay-type-view-item-icon" :src="IconAliPay" />
      <div class="select-pay-type-view-item-text">支付宝支付</div>
    </div>
@@ -22,4 +22,6 @@
// type Props = {};
// const props = withDefaults(defineProps<Props>(), {});
function handleAliPay() {}
</script>
packages/services/api/AliPayNotify.ts
@@ -2,8 +2,23 @@
// @ts-ignore
import { request } from '@/utils/request';
/** 此处后端没有提供注释 GET /api/AliPayNotify/AliRechargeNotify */
export async function aliRechargeNotify(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIaliRechargeNotifyParams,
  options?: API.RequestConfig
) {
  return request<any>('/api/AliPayNotify/AliRechargeNotify', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
/** 支付宝充值回调通知 POST /api/AliPayNotify/AliRechargeNotify */
export async function aliRechargeNotify(options?: API.RequestConfig) {
export async function aliRechargeNotify_2(options?: API.RequestConfig) {
  return request<any>('/api/AliPayNotify/AliRechargeNotify', {
    method: 'POST',
    ...(options || {}),
packages/services/api/LifePay.ts
@@ -7,7 +7,7 @@
  body: API.LifeElectricDataCreateLifePayOrderInput,
  options?: API.RequestConfig
) {
  return request<any>('/api/LifePay/CreateLifePayElectricOrder', {
  return request<API.CreateLifePayOrderOutput>('/api/LifePay/CreateLifePayElectricOrder', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
@@ -22,7 +22,7 @@
  body: API.LifePhoneDataCreateLifePayOrderInput,
  options?: API.RequestConfig
) {
  return request<any>('/api/LifePay/CreateLifePayPhoneOrder', {
  return request<API.CreateLifePayOrderOutput>('/api/LifePay/CreateLifePayPhoneOrder', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
@@ -40,6 +40,36 @@
  });
}
/** 获取订单分页数据 POST /api/LifePay/GetLifePayOrderPage */
export async function getLifePayOrderPage(
  body: API.QueryLifePayOrderListInput,
  options?: API.RequestConfig
) {
  return request<API.LifePayOrderListOutputPageOutput>('/api/LifePay/GetLifePayOrderPage', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 根据订单号获取支付状态 GET /api/LifePay/GetPayStatusByOrderNo */
export async function getPayStatusByOrderNo(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.APIgetPayStatusByOrderNoParams,
  options?: API.RequestConfig
) {
  return request<API.LifePayStatusEnum>('/api/LifePay/GetPayStatusByOrderNo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
/** 获取话费面值 GET /api/LifePay/GetPhoneParValue */
export async function getPhoneParValue(options?: API.RequestConfig) {
  return request<API.PhoneParValueResponse>('/api/LifePay/GetPhoneParValue', {
@@ -47,3 +77,68 @@
    ...(options || {}),
  });
}
/** 获取折扣 GET /api/LifePay/GetRate */
export async function getRate(options?: API.RequestConfig) {
  return request<API.LifePayRateListOutput[]>('/api/LifePay/GetRate', {
    method: 'GET',
    ...(options || {}),
  });
}
/** 获取我的订单分页数据 POST /api/LifePay/GetUserLifePayOrderPage */
export async function getUserLifePayOrderPage(
  body: API.QueryLifePayOrderListInput,
  options?: API.RequestConfig
) {
  return request<API.UserLifePayOrderOutputPageOutput>('/api/LifePay/GetUserLifePayOrderPage', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 获取用户分页数据 POST /api/LifePay/GetUserPage */
export async function getUserPage(body: API.PageInput, options?: API.RequestConfig) {
  return request<API.UserListOutputPageOutput>('/api/LifePay/GetUserPage', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 退款生活缴费订单 POST /api/LifePay/RefundLifePayOrder */
export async function refundLifePayOrder(
  body: API.RefundLifePayOrderInput,
  options?: API.RequestConfig
) {
  return request<any>('/api/LifePay/RefundLifePayOrder', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
/** 设置生活缴费支付类型 POST /api/LifePay/SetLifePayOrderPayType */
export async function setLifePayOrderPayType(
  body: API.SetLifePayOrderPayTypeInput,
  options?: API.RequestConfig
) {
  return request<string>('/api/LifePay/SetLifePayOrderPayType', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
packages/services/api/Test.ts
@@ -114,6 +114,14 @@
  });
}
/** 此处后端没有提供注释 GET /api/Test/TestAddLifePayRate */
export async function testAddLifePayRate(options?: API.RequestConfig) {
  return request<any>('/api/Test/TestAddLifePayRate', {
    method: 'GET',
    ...(options || {}),
  });
}
/** 此处后端没有提供注释 GET /api/Test/TestEventBusSendPhoneMessge */
export async function testEventBusSendPhoneMessge(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
packages/services/api/typings.d.ts
@@ -917,6 +917,12 @@
    id?: string;
  }
  interface APIaliRechargeNotifyParams {
    outTradeNo?: string;
    tradeNo?: string;
    success?: boolean;
  }
  interface APIapiDefinitionParams {
    includeTypes?: boolean;
  }
@@ -1558,6 +1564,10 @@
  interface APIgetParkRewardDetailParams {
    id?: string;
  }
  interface APIgetPayStatusByOrderNoParams {
    orderNo?: string;
  }
  interface APIgetPersonalAttestationParams {
@@ -3989,6 +3999,10 @@
    remark?: string;
  }
  interface CreateLifePayOrderOutput {
    orderNo?: string;
  }
  interface CreateOrEditAdvertiseBoardInput {
    /** Id */
    id?: string;
@@ -5454,7 +5468,7 @@
  interface ElectricParValueOutput {
    electricType?: string;
    areaName?: string;
    parValue?: number;
    parValue?: string;
    rate?: number;
    comments?: string;
  }
@@ -5471,7 +5485,7 @@
    code?: string;
    message?: string;
    detail?: string;
    electricParValue?: ElectricParValueOutput;
    electricParValue?: ElectricParValueOutput[];
  }
  interface EnableSearchSettingInput {
@@ -12154,9 +12168,56 @@
  interface LifeElectricDataCreateLifePayOrderInput {
    userId?: string;
    lifePayType?: LifePayTypeEnum;
    productData?: LifeElectricData;
  }
  interface LifePayOrderListOutput {
    id?: string;
    userId?: string;
    /** 用户手机号 */
    phoneNumber?: string;
    lifePayType?: LifePayTypeEnum;
    lifePayOrderType?: LifePayOrderTypeEnum;
    /** 订单号 */
    orderNo?: string;
    /** 充值金额 */
    rechargeAmount?: number;
    /** 优惠金额 */
    discountAmount?: number;
    /** 实付金额 */
    payAmount?: number;
    /** 支付时间 */
    payTime?: string;
    payStatus?: LifePayStatusEnum;
    /** 外部订单号 */
    outOrderNo?: string;
    lifePayOrderStatus?: LifePayOrderStatusEnum;
    /** 完成时间 */
    finishTime?: string;
    /** 退款凭证 */
    refundCredentialsImgUrl?: string;
    /** 下单时间 */
    creationTime?: string;
  }
  interface LifePayOrderListOutputPageOutput {
    pageModel?: Pagination;
    objectData?: any;
    data?: LifePayOrderListOutput[];
  }
  type LifePayOrderStatusEnum = 10 | 20 | 30;
  type LifePayOrderTypeEnum = 10 | 20;
  interface LifePayRateListOutput {
    rateType?: LifePayRateTypeEnum;
    rate?: number;
  }
  type LifePayRateTypeEnum = 10 | 20;
  type LifePayStatusEnum = 10 | 20 | 30 | 40;
  type LifePayTypeEnum = 10 | 20;
@@ -12167,11 +12228,12 @@
    parValue: number;
    /** 手机号。 */
    phone: string;
    /** 机主名称(电信手机号必填) */
    name?: string;
  }
  interface LifePhoneDataCreateLifePayOrderInput {
    userId?: string;
    lifePayType?: LifePayTypeEnum;
    productData?: LifePhoneData;
  }
@@ -13439,7 +13501,8 @@
    | 29
    | 30
    | 31
    | 32;
    | 32
    | 40;
  interface OrderChangedBzContentInput {
    outBizNo?: string;
@@ -14854,7 +14917,7 @@
  interface PhoneParValueOutput {
    ispCode?: string;
    ispName?: string;
    parValue?: number;
    parValue?: string;
    rate?: number;
    phoneSection?: string;
    comments?: string;
@@ -14872,7 +14935,7 @@
    code?: string;
    message?: string;
    detail?: string;
    phoneParValue?: PhoneParValueOutput;
    phoneParValue?: PhoneParValueOutput[];
  }
  interface PhoneToken {
@@ -15968,6 +16031,23 @@
    docId?: string;
  }
  interface QueryLifePayOrderListInput {
    pageModel?: Pagination;
    lifePayOrderType?: LifePayOrderTypeEnum;
    /** 开始支付时间 */
    beginPayTime?: string;
    /** 结束支付时间 */
    endPayTime?: string;
    payStatus?: LifePayStatusEnum;
    lifePayOrderStatus?: LifePayOrderStatusEnum;
    /** 开始完成时间 */
    beginFinishTime?: string;
    /** 结束完成时间 */
    endFinishTime?: string;
    /** 用户Id */
    userId?: string;
  }
  interface QueryMatchMakingApplyByOrderInput {
    pageModel?: Pagination;
    orderId?: string;
@@ -16625,6 +16705,11 @@
    refundDealRemark?: string;
    /** 状态:0待确认验收,10待评价,20交易完成,-10申请退款,-20退款成功,-30申请退款驳回 */
    status?: number;
  }
  interface RefundLifePayOrderInput {
    id?: string;
    refundCredentialsImgUrl?: string;
  }
  interface RefundOrderContactSignInput {
@@ -17325,6 +17410,11 @@
  interface SetInsureSettingPriceInput {
    prices?: InsurePriceModel[];
  }
  interface SetLifePayOrderPayTypeInput {
    orderNo: string;
    lifePayType?: LifePayTypeEnum;
  }
  interface SetManyContractTemplateHandSignKeyInput {
@@ -20101,6 +20191,48 @@
    certificationChannel?: UserCertificationChannelEnum;
  }
  interface UserLifePayOrderOutput {
    id?: string;
    lifePayType?: LifePayTypeEnum;
    lifePayOrderType?: LifePayOrderTypeEnum;
    /** 订单号 */
    orderNo?: string;
    /** 充值金额 */
    rechargeAmount?: number;
    /** 优惠金额 */
    discountAmount?: number;
    /** 实付金额 */
    payAmount?: number;
    /** 支付时间 */
    payTime?: string;
    payStatus?: LifePayStatusEnum;
    lifePayOrderStatus?: LifePayOrderStatusEnum;
    /** 完成时间 */
    finishTime?: string;
    /** 订单详细数据 */
    orderParamDetailJsonStr?: string;
  }
  interface UserLifePayOrderOutputPageOutput {
    pageModel?: Pagination;
    objectData?: any;
    data?: UserLifePayOrderOutput[];
  }
  interface UserListOutput {
    id?: string;
    /** 用户手机号 */
    phoneNumber?: string;
    lastLoginTime?: string;
    creationTime?: string;
  }
  interface UserListOutputPageOutput {
    pageModel?: Pagination;
    objectData?: any;
    data?: UserListOutput[];
  }
  interface UserMessageInfo {
    /** 消息Id */
    id?: string;