|
@@ -1,15 +1,12 @@
|
|
|
package com.genersoft.iot.vmp.extend.controller;
|
|
package com.genersoft.iot.vmp.extend.controller;
|
|
|
|
|
|
|
|
|
|
+import com.genersoft.iot.vmp.extend.dto.ExtendDevicePageDto;
|
|
|
import com.genersoft.iot.vmp.extend.entity.ExtendDevice;
|
|
import com.genersoft.iot.vmp.extend.entity.ExtendDevice;
|
|
|
import com.genersoft.iot.vmp.extend.service.ExtendDeviceService;
|
|
import com.genersoft.iot.vmp.extend.service.ExtendDeviceService;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
-import java.util.List;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping(value = "/internal/device")
|
|
@RequestMapping(value = "/internal/device")
|
|
@@ -18,9 +15,9 @@ public class ExtendDeviceController {
|
|
|
@Resource
|
|
@Resource
|
|
|
private ExtendDeviceService deviceService;
|
|
private ExtendDeviceService deviceService;
|
|
|
|
|
|
|
|
- @GetMapping("/page")
|
|
|
|
|
- public List<ExtendDevice> devices(){
|
|
|
|
|
- return deviceService.devices();
|
|
|
|
|
|
|
+ @PostMapping("/page")
|
|
|
|
|
+ public PageInfo<ExtendDevice> page(@RequestBody ExtendDevicePageDto dto) {
|
|
|
|
|
+ return deviceService.page(dto);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|