package com.zhujizheng.IHome.rnupdate.controller; import com.zhujizheng.IHome.rnupdate.service.PYRNUpdateService; import com.zhujizheng.IHome.rnupdate.vo.PYRNUpdateVO; import com.zhujizheng.IHome.util.response.ResponseResult; import com.zhujizheng.IHome.util.response.RestResultGenerator; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Api("RNUpdate相关") @RestController @RequestMapping("/rnupdate") public class PYRNUpdateController { @Autowired private PYRNUpdateService updateService; @ApiOperation("获取RNUpdate信息") @ApiImplicitParam(name = "packageVersion", value = "应用包版本", paramType = "path", required = true, dataType = "String") @GetMapping("/select/{packageVersion}") public ResponseResult selectInfo(@PathVariable String packageVersion) { PYRNUpdateVO updateVO = updateService.selectInfo(packageVersion); if (updateVO == null) { return RestResultGenerator.genErrorResult("获取RNUpdate信息失败"); } return RestResultGenerator.genResult(updateVO, "获取RNUpdate信息成功"); } }