/** * @description 删除统计周期 * @throws Exception code * TIME_PERIOD_NOT_FOUND:统计周期不存在 * @p1-test * 无 * @p2-test * TIME_PERIOD_NOT_FOUND:删除一个不存在的统计周期 */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** statPeriodId */ statPeriodId: number; } export const init = undefined; export async function request(params = {}) { return Request({ url: '/api/statPeriod/{statPeriodId}', params, method: 'delete', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'DELETE', url: getUrl('/api/statPeriod/{statPeriodId}', params, 'DELETE'), params, init, }; }; }