dashboard-api

This commit is contained in:
none 2023-03-07 14:04:37 +08:00
parent 65ec26c545
commit aaec8bfb82
2 changed files with 29 additions and 0 deletions

View File

@ -2,6 +2,8 @@ package xyz.playedu.api.constant;
public class SystemConstant { public class SystemConstant {
public final static String VERSION = "v1.0-beta1";
public final static String ENV_PROD = "prod"; public final static String ENV_PROD = "prod";
public final static String REDIS_PREFIX = "playedu:"; public final static String REDIS_PREFIX = "playedu:";

View File

@ -0,0 +1,27 @@
package xyz.playedu.api.controller.backend;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.playedu.api.constant.SystemConstant;
import xyz.playedu.api.types.JsonResponse;
import java.util.HashMap;
/**
* @Author 杭州白书科技有限公司
* @create 2023/3/7 13:55
*/
@RestController
@RequestMapping("/backend/v1/dashboard")
public class DashboardController {
@GetMapping("/index")
public JsonResponse index() {
HashMap<String, Object> data = new HashMap<>();
data.put("version", SystemConstant.VERSION);
return JsonResponse.data(data);
}
}