AgreementController.ts
2.03 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import {AxiosResponse, AxiosStatic} from 'axios';
import dayjs,{Dayjs} from 'dayjs';
// region 前端扩展导入包
import {Agreement} from "lib/src/entity/business/entity/Agreement";
import {Page} from "autumn-vue/lib/core/page/Page";
// endregion
/**
* 协议管理(Agreement) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11
*/
export class AgreementController{
/**
* 新增协议管理
* @param agreement
* @return Agreement
*/
static addAgreement(axios:AxiosStatic, agreement: any): Promise<AxiosResponse<Agreement>> {
return axios.post('agreement/addAgreement', agreement);
}
/**
* 根据id查询协议管理
* @param agreementId
* @return Agreement
*/
static getAgreementById(axios:AxiosStatic, agreementId: number): Promise<AxiosResponse<Agreement>> {
return axios.get('agreement/getAgreementById', {params: {agreementId: agreementId}});
}
/**
*/
static getAgreementsByKey(axios:AxiosStatic, agreementKey: any): Promise<AxiosResponse<Agreement[]>> {
return axios.get('agreement/getAgreementsByKey', {params: {agreementKey: agreementKey}});
}
/**
* 分页查询协议管理
* @param pagination
* @return Page
*/
static pageAgreement(axios:AxiosStatic, pagination: any): Promise<AxiosResponse<Page<Agreement>>> {
return axios.post('agreement/pageAgreement', pagination);
}
static PAGE_AGREEMENT = 'agreement/pageAgreement';
/**
* 删除协议管理
* @param agreementId
* @return int
*/
static removeAgreementById(axios:AxiosStatic, agreementId: number): Promise<AxiosResponse<number>> {
return axios.delete('agreement/removeAgreementById', {params: {agreementId: agreementId}});
}
/**
* 修改协议管理
* @param agreement
* @return Agreement
*/
static updateAgreement(axios:AxiosStatic, agreement: any): Promise<AxiosResponse<Agreement>> {
return axios.post('agreement/updateAgreement', agreement);
}
// region 前端扩展代码区
// endregion
}