|
@@ -12,6 +12,8 @@ import cn.com.qmth.examcloud.app.service.CoreAuthService;
|
|
|
import cn.com.qmth.examcloud.app.service.CoreOeService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@@ -29,6 +31,7 @@ import static cn.com.qmth.examcloud.app.model.Constants.PARAM_APP_TOKEN;
|
|
|
@RequestMapping("${$rmp}/v2")
|
|
|
@Api(tags = "系统服务相关接口")
|
|
|
public class SystemRestController {
|
|
|
+ private static Logger log = LoggerFactory.getLogger(SystemRestController.class);
|
|
|
@Autowired
|
|
|
private CoreOeService oeService;
|
|
|
@Autowired
|
|
@@ -40,6 +43,13 @@ public class SystemRestController {
|
|
|
return oeService.getCurrentTime(key, token);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "获取Token接口")
|
|
|
+ @RequestMapping(value = "/token", method = {RequestMethod.POST})
|
|
|
+ public Result getToken(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token) throws Exception {
|
|
|
+ log.debug("key:" + key);
|
|
|
+ return new Result().success(token);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "获取短信验证码接口")
|
|
|
@RequestMapping(value = "/send/sms/code", method = {RequestMethod.POST})
|
|
|
public Result sendSmsCode(@RequestHeader(name = PARAM_APP_KEY) String key, @RequestHeader(name = PARAM_APP_TOKEN) String token, @RequestParam String phone) throws Exception {
|