DictionaryController.ts 1.05 KB

import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import {Dictionary} from "lib/src/core/dictionary/Dictionary";
import {Diction} from "lib/src/core/dictionary/Diction";
// endregion

   /**
   * 字典表(Dictionary) 控制层
   * @since 2022-04-18 16:06:57
   */
export class DictionaryController{

   /**
   * 查询全部启用字典表
   * @param dictionaryName
   * @return List
   */
    static getDictionariesByName(axios:AxiosStatic, dictionaryName: string): Promise<AxiosResponse<Dictionary[]>> {
        return axios.get('dictionary/getDictionariesByName', {params: {dictionaryName: dictionaryName}});
    }

   /**
   * 查询租户下简单字典表
   * @param dictionaryName
   * @return List
   */
    static getEnabledDictionsByName(axios:AxiosStatic, dictionaryName: string): Promise<AxiosResponse<Diction[]>> {
        return axios.get('dictionary/getEnabledDictionsByName', {params: {dictionaryName: dictionaryName}});
    }

    // region 前端扩展代码区
    // endregion
}