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 queryNewVersion(){ try { Map map = versionManagementService.queryNewVersion(4); return ResultUtil.success(VersionManagementWarpper.getVersionManagementWarpper(map)); }catch (Exception e){ e.printStackTrace(); return ResultUtil.runErr(); } } }