Commit 78fbc7e5 authored by 喻训浩's avatar 喻训浩

fix:分页添加

parent 90c96d5d
package net.vtstar.zhongtong.avi.equipment.controller; package net.vtstar.zhongtong.avi.equipment.controller;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.vtstar.utils.domain.Return; import net.vtstar.utils.domain.Return;
import net.vtstar.zhongtong.avi.equipment.service.EquipmentService; import net.vtstar.zhongtong.avi.equipment.service.EquipmentService;
import net.vtstar.zhongtong.avi.stamping.domain.LaserCuttingMachine;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
@Slf4j @Slf4j
@Api(description = "设备模块") @Api(description = "设备模块")
@RequestMapping("/api/equipment") @RequestMapping("/api/equipment")
...@@ -24,6 +28,7 @@ public class EquipmentController { ...@@ -24,6 +28,7 @@ public class EquipmentController {
@GetMapping(value = "/realTime/data") @GetMapping(value = "/realTime/data")
private Return getRealTimeData(@RequestParam("ShopCode") String ShopCode,@RequestParam("equipType") String equipType){ private Return getRealTimeData(@RequestParam("ShopCode") String ShopCode,@RequestParam("equipType") String equipType){
Object realTimeData = equipmentService.findRealTimeData(); Object realTimeData = equipmentService.findRealTimeData();
return Return.success(realTimeData); ArrayList<LaserCuttingMachine> data = (ArrayList<LaserCuttingMachine>) realTimeData;
return Return.success(new PageInfo<>(data));
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment