|
@@ -3,6 +3,8 @@ package cn.aiyangniu.api.controller.other;
|
|
import cn.aiyangniu.api.common.util.AuthUtil;
|
|
import cn.aiyangniu.api.common.util.AuthUtil;
|
|
import cn.aiyangniu.api.common.util.RedisUtil;
|
|
import cn.aiyangniu.api.common.util.RedisUtil;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -21,6 +23,7 @@ import java.util.Map;
|
|
* @since 2019-10-22
|
|
* @since 2019-10-22
|
|
*/
|
|
*/
|
|
@RestController
|
|
@RestController
|
|
|
|
+@Api(tags="常用的接口")
|
|
@RequestMapping("/others")
|
|
@RequestMapping("/others")
|
|
public class OtherController {
|
|
public class OtherController {
|
|
|
|
|
|
@@ -33,6 +36,7 @@ public class OtherController {
|
|
/**
|
|
/**
|
|
* getSysTime 获取当前服务器系统时间
|
|
* getSysTime 获取当前服务器系统时间
|
|
*/
|
|
*/
|
|
|
|
+ @ApiOperation(value = "获取当前服务器系统时间")
|
|
@RequestMapping(value="/getSysTime", method= RequestMethod.GET)
|
|
@RequestMapping(value="/getSysTime", method= RequestMethod.GET)
|
|
public Map<String, Object> getSysTime(HttpServletRequest req) {
|
|
public Map<String, Object> getSysTime(HttpServletRequest req) {
|
|
Map<String, Object> result = new HashMap<>();
|
|
Map<String, Object> result = new HashMap<>();
|
|
@@ -47,6 +51,7 @@ public class OtherController {
|
|
/**
|
|
/**
|
|
* getSysRandom 获取随机数返回给前端,同时存储到缓冲数据库中
|
|
* getSysRandom 获取随机数返回给前端,同时存储到缓冲数据库中
|
|
*/
|
|
*/
|
|
|
|
+ @ApiOperation(value = "获取请求的随机码")
|
|
@RequestMapping(value="/getSysRandom", method= RequestMethod.GET)
|
|
@RequestMapping(value="/getSysRandom", method= RequestMethod.GET)
|
|
public Map<String, Object> getSysRandom(HttpServletRequest req) {
|
|
public Map<String, Object> getSysRandom(HttpServletRequest req) {
|
|
Map<String, Object> result = new HashMap<>();
|
|
Map<String, Object> result = new HashMap<>();
|