package com.moral.controller;
|
|
import com.moral.common.bean.PageBean;
|
import com.moral.common.bean.ResultBean;
|
import com.moral.service.DeviceService;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
@RestController
|
@RequestMapping("device")
|
@CrossOrigin(origins = "*", maxAge = 3600)
|
public class DeviceController {
|
@Resource
|
DeviceService deviceService;
|
@GetMapping("page-list")
|
public PageBean pageList(PageBean pageBean) {
|
return deviceService.queryByPageBean(pageBean);
|
}
|
@PostMapping("delete-by-ids")
|
public ResultBean deleteByIds(@RequestBody Integer [] ids){
|
deviceService.deleteByIds(ids);
|
ResultBean resultBean = new ResultBean(ResultBean.SUCCESS);
|
return resultBean;
|
}
|
}
|