package com.whyc.controller;
|
|
import com.whyc.dto.Response;
|
import com.whyc.pojo.db_batt.BattMonsLocation;
|
import com.whyc.service.BattMonsLocationService;
|
import io.swagger.annotations.Api;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* 电池单体的定位数据
|
*/
|
@RestController
|
@Api(tags = "电池单体的定位数据")
|
@RequestMapping("battMonsLocation")
|
public class BattMonsLocationController {
|
|
@Autowired
|
private BattMonsLocationService service;
|
|
@GetMapping("getPage")
|
public Response getPage(@RequestParam int pageNum, @RequestParam int pageSize) {
|
return service.getPage(pageNum,pageSize);
|
}
|
|
@PostMapping("add")
|
public Response add(@RequestBody BattMonsLocation battMonsLocation){
|
return service.add(battMonsLocation);
|
}
|
|
@PostMapping("updateById")
|
public Response updateById(@RequestBody BattMonsLocation battMonsLocation){
|
return service.updateById(battMonsLocation);
|
}
|
|
|
}
|