|
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.management.platform.constant.Constant;
|
|
import com.management.platform.constant.Constant;
|
|
|
|
+import com.management.platform.constant.Parameter;
|
|
import com.management.platform.entity.PicContentKeywords;
|
|
import com.management.platform.entity.PicContentKeywords;
|
|
import com.management.platform.entity.Screenshot;
|
|
import com.management.platform.entity.Screenshot;
|
|
import com.management.platform.entity.vo.ScreenshotVO;
|
|
import com.management.platform.entity.vo.ScreenshotVO;
|
|
@@ -65,12 +66,12 @@ public class ScreenshotServiceImpl extends ServiceImpl<ScreenshotMapper, Screens
|
|
screenshot.setPicUrl(filePath);
|
|
screenshot.setPicUrl(filePath);
|
|
screenshot.setDateStr(DateTimeFormatter.ofPattern("yyyy-MM-dd").format(screenshotvo.getIndate()));
|
|
screenshot.setDateStr(DateTimeFormatter.ofPattern("yyyy-MM-dd").format(screenshotvo.getIndate()));
|
|
String accessToken = "";
|
|
String accessToken = "";
|
|
- if (redisUtil.existsKey("accessToken")) {
|
|
|
|
- accessToken = redisUtil.getKey("accessToken");
|
|
|
|
|
|
+ if (redisUtil.existsKey(Parameter.ACCESS_TOKEN.getName())) {
|
|
|
|
+ accessToken = redisUtil.getKey(Parameter.ACCESS_TOKEN.getName());
|
|
} else {
|
|
} else {
|
|
Map<String, Object> map = AuthService.getAuth(Constant.API_KEY, Constant.SECRET_KEY);
|
|
Map<String, Object> map = AuthService.getAuth(Constant.API_KEY, Constant.SECRET_KEY);
|
|
- accessToken = (String) map.get("access_token");
|
|
|
|
- redisUtil.setKeyWithExpireTime("accessToken", accessToken, (Long) map.get("expires_in"));
|
|
|
|
|
|
+ accessToken = (String) map.get(Parameter.ACCESS_TOKEN.getName());
|
|
|
|
+ redisUtil.setKeyWithExpireTime(Parameter.ACCESS_TOKEN.getName(), accessToken, (Long) map.get(Parameter.EXPIRES_IN.getName()));
|
|
}
|
|
}
|
|
log.info("accessToken-->" + accessToken);
|
|
log.info("accessToken-->" + accessToken);
|
|
//利用token去检测
|
|
//利用token去检测
|