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();
|
}
|
}
|
}
|