FavoriteController.ts
1.2 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
45
import { AxiosResponse, AxiosStatic } from "axios";
import dayjs, { Dayjs } from "dayjs";
// region 前端扩展导入包
import { Favorite } from "lib/src/entity/account/entity/Favorite";
import { Page } from "autumn-vue/lib/core/page/Page";
// endregion
/**
* 收藏(Favorite) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11
*/
export class FavoriteController {
/**
* 新增收藏
* @param favorite
* @return Favorite
*/
static addFavorite(axios: AxiosStatic, favorite: any): Promise<AxiosResponse<Favorite>> {
return axios.post("favorite/addFavorite", favorite);
}
/**
* 分页查询收藏
* @param pagination
* @return Page
*/
static pageFavorite(axios: AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Favorite>>> {
return axios.post("favorite/pageFavorite", pagination);
}
static PAGE_FAVORITE = "favorite/pageFavorite";
/**
* 删除收藏
* @param favoriteId
* @return int
*/
static removeFavoriteById(axios: AxiosStatic, accountId: number, aucvehId: number): Promise<AxiosResponse<number>> {
return axios.delete("favorite/removeFavoriteById", { params: { accountId: accountId, aucvehId: aucvehId } });
}
// region 前端扩展代码区
// endregion
}