1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-09-16 23:22:20 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

后台返回数据统一为CommonReturnType

This commit is contained in:
2022-03-15 13:48:58 +08:00
parent ae26ecc372
commit cbfc277c9c
7 changed files with 62 additions and 13 deletions

View File

@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiOperation;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import plus.bookshelf.Common.Response.CommonReturnType;
import java.lang.management.ManagementFactory;
import java.math.BigDecimal;
@@ -33,11 +34,11 @@ public class StatusController {
@ApiOperation(value = "系统状态", notes = "获取服务器当前系统负载。SystemLoadAverage返回-1时代表不支持。")
@RequestMapping(value = "get", method = {RequestMethod.GET})
@ResponseBody
public Object get() {
OperatingSystemMXBean operatingSystemMXBean = (OperatingSystemMXBean) ManagementFactory.getOperatingSystemMXBean();
HashMap<String, Object> hashMap = new HashMap<>();
hashMap.put("server", "OK");
return hashMap;
public CommonReturnType get() {
// HashMap<String, Object> hashMap = new HashMap<>();
// hashMap.put("server", "OK");
// return CommonReturnType.create(hashMap);
return CommonReturnType.create(null);
}
// @ApiOperation(value = "系统负载", notes = "获取服务器当前系统负载。SystemLoadAverage返回-1时代表不支持。")