liujie
2023-05-15 6225c37d2f53adf26daf6b4859af5fb5c6fad088
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
package com.stylefeng.guns.modular.system.controller;
 
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.modular.system.utils.tips.ErrorTip;
import com.stylefeng.guns.modular.system.model.IndexInfo;
import com.stylefeng.guns.modular.system.service.ITOrderService;
import com.stylefeng.guns.modular.system.utils.tips.SuccessTip;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
 
/**
 * 控制器
 *
 * @author fengshuonan
 * @Date 2022-12-28 09:33:09
 */
@Controller
@Api(tags = "主页")
@RequestMapping("/api/index")
public class IndexController extends BaseController {
 
    @Autowired
    private ITOrderService orderService;
 
    /**
     * 获取首页信息
     */
    @ApiOperation(value = "卡车公司-首页信息",notes="首页信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(name = "time", value = "2000-01-01 - 2000-11-11", required = false, dataType = "String"),
            @ApiImplicitParam(name = "id", value = "卡车公司id", required = true, dataType = "String"),
    })
    @GetMapping(value = "/index")
    @ResponseBody
    public Object list(String time,int id) {
        IndexInfo vo =  orderService.indexList(time,id);
        return new SuccessTip(vo);
    }
 
}