feat: 设备故障码、设备校验记录、测控一体机开关、设备充值记录、充值订单,代码提交。
This commit is contained in:
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'
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user