xufenglei
2018-01-22 9b23af5cecdcea86540738dd04f4431cd03efbf8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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;
    }
}