forked from dyf/fys-Multi-tenant
设备绑定,解绑
This commit is contained in:
@ -0,0 +1,52 @@
|
||||
package com.fuyuanshen.app.controller;
|
||||
|
||||
import com.fuyuanshen.common.core.domain.R;
|
||||
import com.fuyuanshen.common.mybatis.core.page.PageQuery;
|
||||
import com.fuyuanshen.common.mybatis.core.page.TableDataInfo;
|
||||
import com.fuyuanshen.common.web.core.BaseController;
|
||||
import com.fuyuanshen.equipment.domain.dto.AppDeviceBo;
|
||||
import com.fuyuanshen.equipment.domain.query.DeviceQueryCriteria;
|
||||
import com.fuyuanshen.equipment.domain.vo.AppDeviceVo;
|
||||
import com.fuyuanshen.equipment.service.DeviceService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* APP 设备信息管理
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/app/device")
|
||||
public class AppDeviceController extends BaseController {
|
||||
|
||||
private final DeviceService deviceService;
|
||||
|
||||
/**
|
||||
* 查询文件列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<AppDeviceVo> list(DeviceQueryCriteria bo, PageQuery pageQuery) {
|
||||
|
||||
return deviceService.queryAppDeviceList(bo,pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 绑定设备
|
||||
*/
|
||||
@PostMapping("/bind")
|
||||
public R<Void> bind(@RequestBody AppDeviceBo bo) {
|
||||
return toAjax(deviceService.bindDevice(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 解绑设备
|
||||
*/
|
||||
@Delete("/unBind")
|
||||
public R<Void> unBind(Long id) {
|
||||
return toAjax(deviceService.unBindDevice(id));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user