feat: 设备故障码、设备校验记录、测控一体机开关、设备充值记录、充值订单,代码提交。
This commit is contained in:
63
src/api/fishery/deviceCorrectRecord/index.ts
Normal file
63
src/api/fishery/deviceCorrectRecord/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeviceCorrectRecordVO, DeviceCorrectRecordForm, DeviceCorrectRecordQuery } from '@/api/fishery/deviceCorrectRecord/types';
|
||||
|
||||
/**
|
||||
* 查询设备校准记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDeviceCorrectRecord = (query?: DeviceCorrectRecordQuery): AxiosPromise<DeviceCorrectRecordVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设备校准记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDeviceCorrectRecord = (id: string | number): AxiosPromise<DeviceCorrectRecordVO> => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设备校准记录
|
||||
* @param data
|
||||
*/
|
||||
export const addDeviceCorrectRecord = (data: DeviceCorrectRecordForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设备校准记录
|
||||
* @param data
|
||||
*/
|
||||
export const updateDeviceCorrectRecord = (data: DeviceCorrectRecordForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设备校准记录
|
||||
* @param id
|
||||
*/
|
||||
export const delDeviceCorrectRecord = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/deviceCorrectRecord/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
143
src/api/fishery/deviceCorrectRecord/types.ts
Normal file
143
src/api/fishery/deviceCorrectRecord/types.ts
Normal file
@@ -0,0 +1,143 @@
|
||||
export interface DeviceCorrectRecordVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
serialNum: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType: number;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
valueDissolvedOxygen: number;
|
||||
|
||||
/**
|
||||
* 水温
|
||||
*/
|
||||
valueTemperature: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
valueSaturability: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceCorrectRecordForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
valueDissolvedOxygen?: number;
|
||||
|
||||
/**
|
||||
* 水温
|
||||
*/
|
||||
valueTemperature?: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
valueSaturability?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceCorrectRecordQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户信息(用户名或手机号)
|
||||
*/
|
||||
userInfo?: string;
|
||||
|
||||
/**
|
||||
* 设备序列号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 溶解氧
|
||||
*/
|
||||
valueDissolvedOxygen?: number;
|
||||
|
||||
/**
|
||||
* 水温
|
||||
*/
|
||||
valueTemperature?: number;
|
||||
|
||||
/**
|
||||
* 饱和度
|
||||
*/
|
||||
valueSaturability?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
63
src/api/fishery/deviceErrorCode/index.ts
Normal file
63
src/api/fishery/deviceErrorCode/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeviceErrorCodeVO, DeviceErrorCodeForm, DeviceErrorCodeQuery } from '@/api/fishery/deviceErrorCode/types';
|
||||
|
||||
/**
|
||||
* 查询设备故障码列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDeviceErrorCode = (query?: DeviceErrorCodeQuery): AxiosPromise<DeviceErrorCodeVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/deviceErrorCode/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设备故障码详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDeviceErrorCode = (id: string | number): AxiosPromise<DeviceErrorCodeVO> => {
|
||||
return request({
|
||||
url: '/fishery/deviceErrorCode/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设备故障码
|
||||
* @param data
|
||||
*/
|
||||
export const addDeviceErrorCode = (data: DeviceErrorCodeForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceErrorCode',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设备故障码
|
||||
* @param data
|
||||
*/
|
||||
export const updateDeviceErrorCode = (data: DeviceErrorCodeForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceErrorCode',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设备故障码
|
||||
* @param id
|
||||
*/
|
||||
export const delDeviceErrorCode = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/deviceErrorCode/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
78
src/api/fishery/deviceErrorCode/types.ts
Normal file
78
src/api/fishery/deviceErrorCode/types.ts
Normal file
@@ -0,0 +1,78 @@
|
||||
export interface DeviceErrorCodeVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId: string | number;
|
||||
|
||||
/**
|
||||
* 开关序号
|
||||
*/
|
||||
switchIndex: number;
|
||||
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
errorCode: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceErrorCodeForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 开关序号
|
||||
*/
|
||||
switchIndex?: number;
|
||||
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
errorCode?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceErrorCodeQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 开关序号
|
||||
*/
|
||||
switchIndex?: number;
|
||||
|
||||
/**
|
||||
* 故障码
|
||||
*/
|
||||
errorCode?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
63
src/api/fishery/deviceSwitch/index.ts
Normal file
63
src/api/fishery/deviceSwitch/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { DeviceSwitchVO, DeviceSwitchForm, DeviceSwitchQuery } from '@/api/fishery/deviceSwitch/types';
|
||||
|
||||
/**
|
||||
* 查询测控一体机开关列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listDeviceSwitch = (query?: DeviceSwitchQuery): AxiosPromise<DeviceSwitchVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/deviceSwitch/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询测控一体机开关详细
|
||||
* @param id
|
||||
*/
|
||||
export const getDeviceSwitch = (id: string | number): AxiosPromise<DeviceSwitchVO> => {
|
||||
return request({
|
||||
url: '/fishery/deviceSwitch/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增测控一体机开关
|
||||
* @param data
|
||||
*/
|
||||
export const addDeviceSwitch = (data: DeviceSwitchForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceSwitch',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改测控一体机开关
|
||||
* @param data
|
||||
*/
|
||||
export const updateDeviceSwitch = (data: DeviceSwitchForm) => {
|
||||
return request({
|
||||
url: '/fishery/deviceSwitch',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除测控一体机开关
|
||||
* @param id
|
||||
*/
|
||||
export const delDeviceSwitch = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/deviceSwitch/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
183
src/api/fishery/deviceSwitch/types.ts
Normal file
183
src/api/fishery/deviceSwitch/types.ts
Normal file
@@ -0,0 +1,183 @@
|
||||
export interface DeviceSwitchVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId: string | number;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
index: number;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
switchName: string;
|
||||
|
||||
/**
|
||||
* 当前测定电流
|
||||
*/
|
||||
detectElectricValue: number;
|
||||
|
||||
/**
|
||||
* 当前测定电压
|
||||
*/
|
||||
detectVoltageValue: number;
|
||||
|
||||
/**
|
||||
* 接线方式
|
||||
*/
|
||||
connectVoltageType: number;
|
||||
|
||||
/**
|
||||
* 塘口id
|
||||
*/
|
||||
pondId: string | number;
|
||||
|
||||
/**
|
||||
* 额定电流设置
|
||||
*/
|
||||
rateElectricValue: number;
|
||||
|
||||
/**
|
||||
* 当前开关状态
|
||||
*/
|
||||
isOpen: number;
|
||||
|
||||
/**
|
||||
* 电流告警开关
|
||||
*/
|
||||
electricWarnOpen: number;
|
||||
|
||||
/**
|
||||
* 上次操作开关时间
|
||||
*/
|
||||
lastTurnTime: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceSwitchForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
index?: number;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
switchName?: string;
|
||||
|
||||
/**
|
||||
* 当前测定电流
|
||||
*/
|
||||
detectElectricValue?: number;
|
||||
|
||||
/**
|
||||
* 当前测定电压
|
||||
*/
|
||||
detectVoltageValue?: number;
|
||||
|
||||
/**
|
||||
* 接线方式
|
||||
*/
|
||||
connectVoltageType?: number;
|
||||
|
||||
/**
|
||||
* 塘口id
|
||||
*/
|
||||
pondId?: string | number;
|
||||
|
||||
/**
|
||||
* 额定电流设置
|
||||
*/
|
||||
rateElectricValue?: number;
|
||||
|
||||
/**
|
||||
* 当前开关状态
|
||||
*/
|
||||
isOpen?: number;
|
||||
|
||||
/**
|
||||
* 联动控制id
|
||||
*/
|
||||
linkedCtrlId?: string | number;
|
||||
|
||||
/**
|
||||
* 电流告警开关
|
||||
*/
|
||||
electricWarnOpen?: number;
|
||||
|
||||
/**
|
||||
* 上次操作开关时间
|
||||
*/
|
||||
lastTurnTime?: string;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface DeviceSwitchQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
deviceId?: string | number;
|
||||
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
index?: number;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
switchName?: string;
|
||||
|
||||
/**
|
||||
* 接线方式
|
||||
*/
|
||||
connectVoltageType?: number;
|
||||
|
||||
/**
|
||||
* 塘口id
|
||||
*/
|
||||
pondId?: string | number;
|
||||
|
||||
/**
|
||||
* 当前开关状态
|
||||
*/
|
||||
isOpen?: number;
|
||||
|
||||
/**
|
||||
* 联动控制id
|
||||
*/
|
||||
linkedCtrlId?: string | number;
|
||||
|
||||
/**
|
||||
* 上次操作开关时间
|
||||
*/
|
||||
lastTurnTime?: string;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
63
src/api/fishery/payDevice/index.ts
Normal file
63
src/api/fishery/payDevice/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PayDeviceVO, PayDeviceForm, PayDeviceQuery } from '@/api/fishery/payDevice/types';
|
||||
|
||||
/**
|
||||
* 查询设备充值记录列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listPayDevice = (query?: PayDeviceQuery): AxiosPromise<PayDeviceVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/payDevice/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询设备充值记录详细
|
||||
* @param id
|
||||
*/
|
||||
export const getPayDevice = (id: string | number): AxiosPromise<PayDeviceVO> => {
|
||||
return request({
|
||||
url: '/fishery/payDevice/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增设备充值记录
|
||||
* @param data
|
||||
*/
|
||||
export const addPayDevice = (data: PayDeviceForm) => {
|
||||
return request({
|
||||
url: '/fishery/payDevice',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改设备充值记录
|
||||
* @param data
|
||||
*/
|
||||
export const updatePayDevice = (data: PayDeviceForm) => {
|
||||
return request({
|
||||
url: '/fishery/payDevice',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除设备充值记录
|
||||
* @param id
|
||||
*/
|
||||
export const delPayDevice = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/payDevice/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
148
src/api/fishery/payDevice/types.ts
Normal file
148
src/api/fishery/payDevice/types.ts
Normal file
@@ -0,0 +1,148 @@
|
||||
export interface PayDeviceVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
mobilePhone?: string;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType: number;
|
||||
|
||||
/**
|
||||
* 续费时长(月)
|
||||
*/
|
||||
addMonth: number;
|
||||
|
||||
/**
|
||||
* 最新到期时间
|
||||
*/
|
||||
deadTime: string;
|
||||
|
||||
/**
|
||||
* 续费金额(分)
|
||||
*/
|
||||
payAmount: number;
|
||||
|
||||
/**
|
||||
* 订单id
|
||||
*/
|
||||
orderId?: string | number;
|
||||
|
||||
/**
|
||||
* 续费方式
|
||||
*/
|
||||
payType: number;
|
||||
|
||||
/**
|
||||
* 分润状态
|
||||
*/
|
||||
profitStatus: number;
|
||||
|
||||
}
|
||||
|
||||
export interface PayDeviceForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 续费时长(月)
|
||||
*/
|
||||
addMonth?: number;
|
||||
|
||||
/**
|
||||
* 最新到期时间
|
||||
*/
|
||||
deadTime?: string;
|
||||
|
||||
/**
|
||||
* 续费金额(分)
|
||||
*/
|
||||
payAmount?: number;
|
||||
|
||||
/**
|
||||
* 续费方式
|
||||
*/
|
||||
payType?: number;
|
||||
|
||||
/**
|
||||
* 分润状态
|
||||
*/
|
||||
profitStatus?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface PayDeviceQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
serialNum?: string;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
deviceType?: number;
|
||||
|
||||
/**
|
||||
* 续费方式
|
||||
*/
|
||||
payType?: number;
|
||||
|
||||
/**
|
||||
* 分润状态
|
||||
*/
|
||||
profitStatus?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
63
src/api/fishery/payOrder/index.ts
Normal file
63
src/api/fishery/payOrder/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { PayOrderVO, PayOrderForm, PayOrderQuery } from '@/api/fishery/payOrder/types';
|
||||
|
||||
/**
|
||||
* 查询充值订单列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listPayOrder = (query?: PayOrderQuery): AxiosPromise<PayOrderVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/payOrder/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询充值订单详细
|
||||
* @param id
|
||||
*/
|
||||
export const getPayOrder = (id: string | number): AxiosPromise<PayOrderVO> => {
|
||||
return request({
|
||||
url: '/fishery/payOrder/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增充值订单
|
||||
* @param data
|
||||
*/
|
||||
export const addPayOrder = (data: PayOrderForm) => {
|
||||
return request({
|
||||
url: '/fishery/payOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改充值订单
|
||||
* @param data
|
||||
*/
|
||||
export const updatePayOrder = (data: PayOrderForm) => {
|
||||
return request({
|
||||
url: '/fishery/payOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除充值订单
|
||||
* @param id
|
||||
*/
|
||||
export const delPayOrder = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/payOrder/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
223
src/api/fishery/payOrder/types.ts
Normal file
223
src/api/fishery/payOrder/types.ts
Normal file
@@ -0,0 +1,223 @@
|
||||
export interface PayOrderVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId: string | number;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
userName?: string;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
mobilePhone?: string;
|
||||
|
||||
/**
|
||||
* 充值总金额(分)
|
||||
*/
|
||||
totalAmount: number;
|
||||
|
||||
/**
|
||||
* 有效期增加月数
|
||||
*/
|
||||
addMonth: number;
|
||||
|
||||
/**
|
||||
* 设备数量
|
||||
*/
|
||||
deviceCount: number;
|
||||
|
||||
/**
|
||||
* 用户支付金额(分)
|
||||
*/
|
||||
payerTotal: number;
|
||||
|
||||
/**
|
||||
* 支付完成时间
|
||||
*/
|
||||
successTime: string;
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
orderStatus: number;
|
||||
|
||||
/**
|
||||
* 分润状态
|
||||
*/
|
||||
profitStatus: number;
|
||||
|
||||
}
|
||||
|
||||
export interface PayOrderForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
userId?: string | number;
|
||||
|
||||
/**
|
||||
* 充值总金额(分)
|
||||
*/
|
||||
totalAmount?: number;
|
||||
|
||||
/**
|
||||
* 有效期增加月数
|
||||
*/
|
||||
addMonth?: number;
|
||||
|
||||
/**
|
||||
* 附加数据
|
||||
*/
|
||||
attachment?: string;
|
||||
|
||||
/**
|
||||
* 付款银行类型
|
||||
*/
|
||||
bankType?: string;
|
||||
|
||||
/**
|
||||
* 币种
|
||||
*/
|
||||
currency?: string;
|
||||
|
||||
/**
|
||||
* 订单描述
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* 设备数量
|
||||
*/
|
||||
deviceCount?: number;
|
||||
|
||||
/**
|
||||
* 支付的设备编号,json格式
|
||||
*/
|
||||
isonDeviceSerialNum?: string;
|
||||
|
||||
/**
|
||||
* 支付回调通知URL
|
||||
*/
|
||||
notifyUrl?: string;
|
||||
|
||||
/**
|
||||
* 商户系统内部订单号
|
||||
*/
|
||||
outTradeNumber?: string;
|
||||
|
||||
/**
|
||||
* 用户支付币种
|
||||
*/
|
||||
payerCurrency?: string;
|
||||
|
||||
/**
|
||||
* 用户支付金额(分)
|
||||
*/
|
||||
payerTotal?: number;
|
||||
|
||||
/**
|
||||
* 微信预交易订单号
|
||||
*/
|
||||
prepayId?: string | number;
|
||||
|
||||
/**
|
||||
* 支付完成时间
|
||||
*/
|
||||
successTime?: string;
|
||||
|
||||
/**
|
||||
* 交易状态
|
||||
*/
|
||||
tradeState?: string;
|
||||
|
||||
/**
|
||||
* 交易状态描述
|
||||
*/
|
||||
tradeStateDescription?: string;
|
||||
|
||||
/**
|
||||
* 交易类型
|
||||
*/
|
||||
tradeType?: string;
|
||||
|
||||
/**
|
||||
* 微信支付订单号
|
||||
*/
|
||||
transactionId?: string | number;
|
||||
|
||||
/**
|
||||
* 用户开放id
|
||||
*/
|
||||
wxOpenId?: string | number;
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
orderStatus?: number;
|
||||
|
||||
/**
|
||||
* 分润状态
|
||||
*/
|
||||
profitStatus?: number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface PayOrderQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 付款银行类型
|
||||
*/
|
||||
bankType?: string;
|
||||
|
||||
/**
|
||||
* 支付完成时间
|
||||
*/
|
||||
successTime?: string;
|
||||
|
||||
/**
|
||||
* 交易状态
|
||||
*/
|
||||
tradeState?: string;
|
||||
|
||||
/**
|
||||
* 交易类型
|
||||
*/
|
||||
tradeType?: string;
|
||||
|
||||
/**
|
||||
* 微信支付订单号
|
||||
*/
|
||||
transactionId?: string | number;
|
||||
|
||||
/**
|
||||
* 订单状态
|
||||
*/
|
||||
orderStatus?: number;
|
||||
|
||||
/**
|
||||
* 分润状态
|
||||
*/
|
||||
profitStatus?: number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
63
src/api/fishery/userRelation/index.ts
Normal file
63
src/api/fishery/userRelation/index.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
import request from '@/utils/request';
|
||||
import { AxiosPromise } from 'axios';
|
||||
import { UserRelationVO, UserRelationForm, UserRelationQuery } from '@/api/fishery/userRelation/types';
|
||||
|
||||
/**
|
||||
* 查询养殖用户子账号列表
|
||||
* @param query
|
||||
* @returns {*}
|
||||
*/
|
||||
|
||||
export const listUserRelation = (query?: UserRelationQuery): AxiosPromise<UserRelationVO[]> => {
|
||||
return request({
|
||||
url: '/fishery/userRelation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 查询养殖用户子账号详细
|
||||
* @param id
|
||||
*/
|
||||
export const getUserRelation = (id: string | number): AxiosPromise<UserRelationVO> => {
|
||||
return request({
|
||||
url: '/fishery/userRelation/' + id,
|
||||
method: 'get'
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 新增养殖用户子账号
|
||||
* @param data
|
||||
*/
|
||||
export const addUserRelation = (data: UserRelationForm) => {
|
||||
return request({
|
||||
url: '/fishery/userRelation',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 修改养殖用户子账号
|
||||
* @param data
|
||||
*/
|
||||
export const updateUserRelation = (data: UserRelationForm) => {
|
||||
return request({
|
||||
url: '/fishery/userRelation',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* 删除养殖用户子账号
|
||||
* @param id
|
||||
*/
|
||||
export const delUserRelation = (id: string | number | Array<string | number>) => {
|
||||
return request({
|
||||
url: '/fishery/userRelation/' + id,
|
||||
method: 'delete'
|
||||
});
|
||||
};
|
||||
63
src/api/fishery/userRelation/types.ts
Normal file
63
src/api/fishery/userRelation/types.ts
Normal file
@@ -0,0 +1,63 @@
|
||||
export interface UserRelationVO {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id: string | number;
|
||||
|
||||
/**
|
||||
* 父级账号id
|
||||
*/
|
||||
parentUserId: string | number;
|
||||
|
||||
/**
|
||||
* 子账号id
|
||||
*/
|
||||
childUserId: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark: string;
|
||||
|
||||
}
|
||||
|
||||
export interface UserRelationForm extends BaseEntity {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
id?: string | number;
|
||||
|
||||
/**
|
||||
* 父级账号id
|
||||
*/
|
||||
parentUserId?: string | number;
|
||||
|
||||
/**
|
||||
* 子账号id
|
||||
*/
|
||||
childUserId?: string | number;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
remark?: string;
|
||||
|
||||
}
|
||||
|
||||
export interface UserRelationQuery extends PageQuery {
|
||||
|
||||
/**
|
||||
* 父级账号id
|
||||
*/
|
||||
parentUserId?: string | number;
|
||||
|
||||
/**
|
||||
* 子账号id
|
||||
*/
|
||||
childUserId?: string | number;
|
||||
|
||||
/**
|
||||
* 日期范围参数
|
||||
*/
|
||||
params?: any;
|
||||
}
|
||||
Reference in New Issue
Block a user