去除接口多余的分隔符
This commit is contained in:
@@ -232,7 +232,7 @@ public class DeviceQuery {
|
|||||||
|
|
||||||
@Operation(summary = "添加设备信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
@Operation(summary = "添加设备信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "device", description = "设备", required = true)
|
@Parameter(name = "device", description = "设备", required = true)
|
||||||
@PostMapping("/device/add/")
|
@PostMapping("/device/add")
|
||||||
public void addDevice(Device device){
|
public void addDevice(Device device){
|
||||||
|
|
||||||
if (device == null || device.getDeviceId() == null) {
|
if (device == null || device.getDeviceId() == null) {
|
||||||
@@ -250,8 +250,8 @@ public class DeviceQuery {
|
|||||||
|
|
||||||
@Operation(summary = "更新设备信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
@Operation(summary = "更新设备信息", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||||
@Parameter(name = "device", description = "设备", required = true)
|
@Parameter(name = "device", description = "设备", required = true)
|
||||||
@PostMapping("/device/update/")
|
@PostMapping("/device/update")
|
||||||
public void updateDevice(Device device){
|
public void updateDevice(@RequestBody Device device){
|
||||||
if (device == null || device.getDeviceId() == null || device.getId() <= 0) {
|
if (device == null || device.getDeviceId() == null || device.getId() <= 0) {
|
||||||
throw new ControllerException(ErrorCode.ERROR400);
|
throw new ControllerException(ErrorCode.ERROR400);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,8 +109,8 @@ export default {
|
|||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
this.$axios({
|
this.$axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url:`/api/device/query/device/${this.isEdit?'update':'add'}/`,
|
url:`/api/device/query/device/${this.isEdit?'update':'add'}`,
|
||||||
params: this.form
|
data: this.form
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res.data)
|
console.log(res.data)
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user