/** * @description 获取一个业务板块 * @throws Exception code * BIZ_UNIT_NOT_FOUND:业务板块找不到 * @p1-test * bizUnitId:配置不存在bizUnitId=-1 [BIZ_UNIT_NOT_FOUND] */ import { getUrl } from 'src/utils/getUrl'; import Request from 'src/utils/requests'; import * as defs from '../../baseClass'; export class Params { /** bizUnitId */ bizUnitId: number; } export const init = new defs.BizUnitDTO(); export async function request(params = {}) { return Request({ url: '/api/bizUnit/{bizUnitId}', params, method: 'get', }); } export function createFetchAction(types, stateKey) { return (params = {}, meta?: any) => { return { types, meta, stateKey, method: 'GET', url: getUrl('/api/bizUnit/{bizUnitId}', params, 'GET'), params, init, }; }; }