FavoriteController.ts
1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { Page } from "autumn-vue/lib/core/page/Page";
import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包
import { Favorite } from "lib/src/entity/account/entity/Favorite";
// endregion
/**
* 收藏(Favorite) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11
*/
export const FavoriteController = {
/**
* 新增收藏
* @param favorite
* @return Favorite
*/
addFavorite(axios: AxiosStatic, favorite: any): Promise<AxiosResponse<Favorite>> {
return axios.post("favorite/addFavorite", favorite);
},
/**
* 分页查询收藏
* @param pagination
* @return Page
*/
pageFavorite(axios: AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Favorite>>> {
return axios.post("favorite/pageFavorite", pagination);
},
PAGE_FAVORITE : "favorite/pageFavorite",
/**
* 删除收藏
* @param favoriteId
* @return int
*/
removeFavoriteById(axios: AxiosStatic, accountId: number, aucvehId: number): Promise<AxiosResponse<number>> {
return axios.delete("favorite/removeFavoriteById", { params: { accountId, aucvehId } });
},
// region 前端扩展代码区
// endregion
};