import http from "../http"; export interface HotWordVO { id: number; word: string; pinyinList: string[]; isPublic: number; creatorId: number; matchStrategy: number; category: string; weight: number; status: number; isSynced: number; remark?: string; createdAt: string; updatedAt: string; } export interface HotWordDTO { id?: number; word: string; pinyinList?: string[]; matchStrategy: number; category?: string; weight: number; status: number; remark?: string; } export const getHotWordPage = (params: { current: number; size: number; word?: string; category?: string; matchStrategy?: number }) => { return http.get( "/api/biz/hotword/page", { params } ); }; export const syncHotWord = (id: number) => { return http.post( `/api/biz/hotword/${id}/sync` ); }; export const saveHotWord = (data: HotWordDTO) => { return http.post( "/api/biz/hotword", data ); }; export const updateHotWord = (data: HotWordDTO) => { return http.put( "/api/biz/hotword", data ); }; export const deleteHotWord = (id: number) => { return http.delete( `/api/biz/hotword/${id}` ); }; export const getPinyinSuggestion = (word: string) => { return http.get( "/api/biz/hotword/pinyin", { params: { word } } ); };