package com.hxzk.controller;
|
|
import com.github.pagehelper.PageInfo;
|
import com.hxzk.pojo.TbAchor;
|
import com.hxzk.pojo.TbLoragateway;
|
import com.hxzk.service.LoraGateWayService;
|
import com.hxzk.util.result;
|
import com.hxzk.util.resultutil;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.servlet.http.HttpServletResponse;
|
import java.io.IOException;
|
import java.util.List;
|
|
@RestController
|
@RequestMapping("/")
|
public class LoraGateWayController {
|
@Autowired
|
LoraGateWayService loraGateWayService;
|
|
@GetMapping("findLoraGateWay")
|
result<List<TbLoragateway>> findanchor(Integer page, Integer limit){
|
PageInfo<TbLoragateway> cz= loraGateWayService.findAll(page, limit);
|
return resultutil.returnSuccess(cz.getTotal(), cz.getList());
|
}
|
|
@GetMapping("deLoraGateWay")
|
public void deLoraGateWay(Integer id, HttpServletResponse response) throws IOException {
|
loraGateWayService.deLoraGateWay(id);
|
response.sendRedirect("/hxzkuwb/HouTai/WangGuan/WangGun.jsp");
|
}
|
}
|