k94314517
2025-02-17 291354e580dbe8686d3d53ac69c825df75da9098
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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.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.
 *
 * @Author : Rk
 * @create 2023/10/7 14:43
 */
 
@Api(tags = "2、首页业务")
@Trace(exclude = true)
@RestController
@RequestMapping("/web/home")
@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));
    }
 
}