PriceRuleController.ts
1.8 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
import { Page } from "autumn-vue/lib/core/page/Page";
import { AxiosResponse, AxiosStatic } from "axios";
// region 前端扩展导入包
import { PriceRule } from "lib/src/entity/vehicle/entity/PriceRule";
// endregion
/**
* 价格规则(PriceRule) PI接口
* @author gonglei
* @since 2025-10-13 12:18:11
*/
export const PriceRuleController = {
/**
* 新增价格规则
* @param priceRule
* @return PriceRule
*/
addPriceRule(axios: AxiosStatic, priceRule: any): Promise<AxiosResponse<PriceRule>> {
return axios.post("priceRule/addPriceRule", priceRule);
},
/**
* 根据id查询价格规则
* @param ruleId
* @return PriceRule
*/
getPriceRuleById(axios: AxiosStatic, ruleId: number): Promise<AxiosResponse<PriceRule>> {
return axios.get("priceRule/getPriceRuleById", { params: { ruleId } });
},
/**
*/
getReferencePriceByVehicleId(axios: AxiosStatic, vehicleId: number): Promise<AxiosResponse<number>> {
return axios.get("priceRule/getReferencePriceByVehicleId", { params: { vehicleId } });
},
/**
* 分页查询价格规则
* @param pagination
* @return Page
*/
pagePriceRule(axios: AxiosStatic, pagination: any): Promise<AxiosResponse<Page<PriceRule>>> {
return axios.post("priceRule/pagePriceRule", pagination);
},
PAGE_PRICE_RULE : "priceRule/pagePriceRule",
/**
* 删除价格规则
* @param ruleId
* @return int
*/
removePriceRuleById(axios: AxiosStatic, ruleId: number): Promise<AxiosResponse<number>> {
return axios.delete("priceRule/removePriceRuleById", { params: { ruleId } });
},
/**
* 修改价格规则
* @param priceRule
* @return PriceRule
*/
updatePriceRule(axios: AxiosStatic, priceRule: any): Promise<AxiosResponse<PriceRule>> {
return axios.post("priceRule/updatePriceRule", priceRule);
},
// region 前端扩展代码区
// endregion
};