| | |
| | | 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.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("battery") |
| | | @Api(tags = "电池实时") |
| | | @Api(tags = "电池实时统计") |
| | | public class BatteryRTController { |
| | | |
| | | @Autowired |
| | |
| | | */ |
| | | @GetMapping("status") |
| | | @ApiOperation(value = "电池状态") |
| | | public Response<Map> getStatus(HttpServletRequest request){ |
| | | int userId = CommonUtil.getUser(request).getId(); |
| | | public Response<Map> getStatus(@RequestParam Integer userId){ |
| | | Response<Map> response = service.getStatus(userId); |
| | | return response; |
| | | } |