| New file |
| | |
| | | package com.zy.asrs.controller; |
| | | |
| | | import com.core.common.R; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import java.util.HashMap; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/openapi") |
| | | public class OpenController { |
| | | |
| | | @Value("${app.version:1.0.0}") |
| | | private String appVersion; |
| | | @Value("${app.version-type:stable}") |
| | | private String appVersionType; |
| | | |
| | | @GetMapping("/systemStatus") |
| | | public R systemStatus() { |
| | | return R.ok(); |
| | | } |
| | | |
| | | @GetMapping("/getSystemVersion") |
| | | public R getSystemVersion() { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("version", appVersion); |
| | | map.put("versionType", appVersionType); |
| | | return R.ok().add(map); |
| | | } |
| | | |
| | | } |