xuhy
2024-05-28 5470d21a35286abe41fafc25a7deaabefd7c55da
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
package com.stylefeng.guns.modular.api;
 
 
import com.stylefeng.guns.modular.system.service.IVersionManagementService;
import com.stylefeng.guns.modular.system.util.ResultUtil;
import com.stylefeng.guns.modular.system.warpper.VersionManagementWarpper;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.Map;
 
@Api
@RestController
@RequestMapping("/api/version")
public class VersionManagementController {
 
    @Autowired
    private IVersionManagementService versionManagementService;
 
 
    /**
     * 获取最新版本
     * @return
     */
    @ResponseBody
    @RequestMapping(value = "/queryNewVersion", method = RequestMethod.POST)
    @ApiOperation(value = "获取最新版本", tags = {"调度端-设置"}, notes = "", response = VersionManagementWarpper.class)
    @ApiImplicitParams({
            @ApiImplicitParam(value = "改派订单id", name = "reassignId", required = true, dataType = "int"),
    })
    public ResultUtil<Object> queryNewVersion(){
        try {
            Map<String, Object> map = versionManagementService.queryNewVersion(4);
            return ResultUtil.success(VersionManagementWarpper.getVersionManagementWarpper(map));
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
}