| | |
| | | package com.doumee.api.web; |
| | | |
| | | import com.doumee.core.annotation.LoginRequired; |
| | | import com.doumee.core.annotation.pr.PreventRepeat; |
| | | import com.doumee.core.annotation.trace.Trace; |
| | | import com.doumee.core.model.ApiResponse; |
| | | import com.doumee.dao.business.web.response.HomeResponse; |
| | | import com.doumee.dao.business.web.response.RidesDetailResponse; |
| | | import com.doumee.jtt808.web.service.Jtt808Service; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.yzh.commons.model.APIResult; |
| | | import org.yzh.protocol.t808.T0201_0500; |
| | | import org.yzh.protocol.t808.T0805; |
| | | import org.yzh.protocol.t808.T8500; |
| | | |
| | | /** |
| | | * Created by IntelliJ IDEA. |
| | |
| | | @Slf4j |
| | | public class HomeApi extends ApiController{ |
| | | |
| | | @Autowired |
| | | private GoodsorderService goodsorderService; |
| | | @Autowired |
| | | private Jtt808Service jtt808Service; |
| | | |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "首页信息", notes = "首页信息") |
| | | @GetMapping("/home") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "用户token值", required = true) |
| | | }) |
| | | public ApiResponse<HomeResponse> home() { |
| | | HomeResponse homeResponse = goodsorderService.getHome(getMemberId()); |
| | | return ApiResponse.success("查询成功",homeResponse); |
| | | } |
| | | @ApiOperation(value = "测试电池控制", notes = "测试电池控制") |
| | | @PostMapping("/testControl") |
| | | public ApiResponse<APIResult<T0201_0500>> testControl(@RequestBody T8500 param) { |
| | | return ApiResponse.success( jtt808Service.bikeControl(param)); |
| | | } |
| | | |
| | | } |