puzhibing
2023-06-13 7860e5cb6db60aeb82c640651998f8294635df5b
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
59
60
61
62
63
64
package com.dsh.course.controller;
 
 
import com.dsh.course.model.vo.VersionWarpper;
import com.dsh.course.service.IVersionManagementService;
import com.dsh.guns.modular.system.util.ResultUtil;
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.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.Map;
 
/**
 * 版本管理
 */
@Api
@RestController
@RequestMapping("")
public class VersionManagementController {
 
    @Autowired
    private IVersionManagementService versionManagementService;
 
 
 
    @ResponseBody
    @PostMapping("/api/version/queryNewData")
    @ApiOperation(value = "Obtain the latest version data获取最新版本数据", tags = {"Client - Personal center用户端-个人中心", "Driver side - Personal center司机端-个人中心"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "1= client side, 2= driver side 1=用户端,2=司机端", name = "type", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<VersionWarpper> queryNewData(Integer type){
        try {
            Map<String, Object> map = versionManagementService.queryNewVersion(type);
            return ResultUtil.success(VersionWarpper.getVersionWarpper(map));
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
 
    @ResponseBody
    @PostMapping("/base/version/queryNewData1")
    @ApiOperation(value = "Obtain the latest version data获取最新版本数据", tags = {"Client - Personal center用户端-个人中心", "Driver side - Personal center司机端-个人中心"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "1= client side, 2= driver side 1=用户端,2=司机端", name = "type", required = true, dataType = "int"),
    })
    public ResultUtil<VersionWarpper> queryNewData1(Integer type){
        try {
            Map<String, Object> map = versionManagementService.queryNewVersion(type);
            return ResultUtil.success(VersionWarpper.getVersionWarpper(map));
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
}