dataease-dm/backend/src/main/java/io/dataease/controller/IndexController.java

54 lines
1.3 KiB
Java
Raw Normal View History

2021-02-20 10:07:25 +08:00
package io.dataease.controller;
2021-08-11 14:58:29 +08:00
import io.dataease.commons.license.DefaultLicenseService;
import io.dataease.commons.license.F2CLicenseResponse;
2021-02-20 10:07:25 +08:00
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
2021-08-11 14:58:29 +08:00
import javax.annotation.Resource;
2021-02-20 10:07:25 +08:00
@Controller
@RequestMapping
public class IndexController {
2021-08-11 14:58:29 +08:00
@Resource
private DefaultLicenseService defaultLicenseService;
2021-02-20 10:07:25 +08:00
@GetMapping(value = "/")
public String index() {
return "index.html";
}
@GetMapping(value = "/login")
public String login() {
2021-03-25 18:58:05 +08:00
return "index.html";
}
@GetMapping("/link")
public String link() {
return "link.html";
2021-02-20 10:07:25 +08:00
}
2021-03-25 18:58:05 +08:00
@GetMapping("/test")
public String test() {
return "test.html";
}
2021-08-11 14:58:29 +08:00
@GetMapping("/deApi")
public String deApi() {
F2CLicenseResponse f2CLicenseResponse = defaultLicenseService.validateLicense();
switch (f2CLicenseResponse.getStatus()) {
case valid:
return "doc.html";
default:
// DataEaseException.throwException("Invalid License.");
2021-11-02 13:38:48 +08:00
/* return "nolic.html"; */
return "doc.html";
2021-08-11 14:58:29 +08:00
}
// return "index.html";
}
2021-03-25 18:58:05 +08:00
2021-02-20 10:07:25 +08:00
}