|
@@ -4,16 +4,16 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.shanghaichengdi.ghjgitem.constant.Constants;
|
|
|
import com.shanghaichengdi.ghjgitem.constant.HttpStatus;
|
|
|
-import com.shanghaichengdi.ghjgitem.domain.ReturnMsg;
|
|
|
import com.shanghaichengdi.ghjgitem.domain.SysDatashareUser;
|
|
|
import com.shanghaichengdi.ghjgitem.enums.OutsideInterface;
|
|
|
import com.shanghaichengdi.ghjgitem.service.RedisService;
|
|
|
-import com.shanghaichengdi.ghjgitem.service.SysDatashareAuthNewService;
|
|
|
import com.shanghaichengdi.ghjgitem.service.SysDatashareServiceNewService;
|
|
|
import com.shanghaichengdi.ghjgitem.service.SysDatashareUserService;
|
|
|
import com.shanghaichengdi.ghjgitem.util.ApiUtils;
|
|
|
import com.shanghaichengdi.ghjgitem.util.JwtUtils;
|
|
|
import com.shanghaichengdi.ghjgitem.vo.request.AuthRequest;
|
|
|
+import com.shanghaichengdi.ghjgitem.vo.request.FrequencyCacheReq;
|
|
|
+import com.shanghaichengdi.ghjgitem.vo.response.ReturnMsg;
|
|
|
import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
@@ -79,15 +79,17 @@ public class AuthController {
|
|
|
|
|
|
@GetMapping("/checkToken/{tokenString}")
|
|
|
public ReturnMsg checkToken(@PathVariable("tokenString") String tokenString) {
|
|
|
+ Objects.requireNonNull(tokenString,"tokenString不可为空");
|
|
|
Map<String, String> map = new HashMap<>();
|
|
|
map.put("token", tokenString);
|
|
|
String result = ApiUtils.api(map, OutsideInterface.AUTH_URL.getUrlString(), "checkToken");
|
|
|
return ReturnMsg.success(result);
|
|
|
}
|
|
|
|
|
|
- @PostMapping("/refresh")
|
|
|
- public void refresh() {
|
|
|
- datashareServiceNewService.initCacheAuthService();
|
|
|
+ @PostMapping("/refresh/frequency")
|
|
|
+ public ReturnMsg refreshFrequency(@RequestBody FrequencyCacheReq req) {
|
|
|
+ datashareServiceNewService.refreshFrequency(req.getClientList());
|
|
|
+ return ReturnMsg.success("缓存刷新成功");
|
|
|
}
|
|
|
|
|
|
@GetMapping("/test/{token}")
|