YD_Event.Web/src/api/match/eventRecord.js
2026-04-13 06:59:37 +08:00

74 lines
2.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { BaseApi } from '../baseApi';
import { http } from '../../utils/request';
// ==================== 参赛记录管理 ====================
/**
* 分页查询参赛记录
* @param {Object} params - 查询参数
* @param {number} [params.AppUserId] - 普通用户ID(AppUser表的Id)
* @param {number} [params.SysUserId] - 系统用户ID(SysUser表的Id,用于单位用户)
* @param {number} [params.MerchantId] - 商户ID(已弃用,使用SysUserId)
* @param {string} [params.EventName] - 赛事名称 (模糊查询)
* @param {number} [params.PaymentStatus] - 支付状态 (0:未支付/待审核, 1:已支付/审核通过, 2:支付失败/审核拒绝, 3:已退款, 4:已取消)
* @param {string} [params.StartTime] - 开始时间
* @param {string} [params.EndTime] - 结束时间
* @param {number} [params.PageNo] - 当前页码
* @param {number} [params.PageSize] - 每页条数
* @param {number} [params.refresh] - 刷新标记(用于强制刷新数据)
* @returns {Promise<{
* pageNo: number,
* pageSize: number,
* pages: number,
* total: number,
* rows: Array<{
* id: number,
* eventName: string,
* eventType: string,
* startTime: string,
* endTime: string,
* registrationStatus: number,
* eventId: number,
* contactName: string,
* contactPhone: string,
* teamName: string
* }>
* }>}
*/
export const eventrecordPageGet = (params) => {
return http.get('/eventrecord/page', { params });
};
/**
* 获取证书列表
* @param {number} registrationid - 报名记录ID (路径参数)
* @returns {Promise<Array<{
* id: number,
* name: string,
* awardLevel: string,
* certificateType: string,
* imageUrl: string
* }>>}
*/
export const eventrecordCertificatesGet = (registrationid) => {
return http.get(`/eventrecord/${registrationid}/certificates`);
};
/**
* 删除参赛记录
* @param {Object} data - 删除参数
* @param {number} data.id - 参赛记录ID
*/
export const eventrecordDeleteDelete = (data) => {
return http.delete('/eventrecord/delete', { data });
};
/**
* 修改参赛记录状态
* @param {Object} data - 状态参数
* @param {number} data.id - 参赛记录ID
* @param {string} data.status - 状态 (Enable=启用, Disable=禁用)
*/
export const eventrecordSetstatusPatch = (data) => {
return http.patch('/eventrecord/setstatus', data);
};