Commit 14efdacd authored by ZWT's avatar ZWT

feat(吉林演示): 松原

1.新建气象局数据收集表,同时生成相关代码;
2.修改天气数据处理转换定时任务,增加处理保存气象局天气数据逻辑,同时解决接收数据入库重复问题;
3.修改风资源功率预测中期三天功率预测结果接口,增加风速等响应字段;
4.修改风资源功率预测中期十天功率预测结果接口,增加风速等响应字段;
5.修改风资源功率预测超短期4小时功率预测结果接口,增加风速等响应字段;
6.修复登录后没有清除验证码导致可以重复登录问题;

BREAKING CHANGE: 无

Closes 无

[skip ci]
parent 0a4ba39e
......@@ -5,6 +5,12 @@ import xstartup.cache.XCacheLife;
import xstartup.cache.XCacheObject;
import xstartup.cache.XSingleCache;
/**
* 登录验证码缓存
*
* @author ZWT
* @date 2024/08/30
*/
public class LoginVerCodeCache implements XCacheObject, XCacheLife {
private String codeKey;
private String code;
......@@ -12,25 +18,34 @@ public class LoginVerCodeCache implements XCacheObject, XCacheLife {
/**
* 检查缓存是否存在指定的code
*
* @param context
* @param code
* @return
* @param context 上下文
* @param codeIden 代码id
* @return {@link LoginVerCodeCache }
*/
public static LoginVerCodeCache exist(XContext context, String code) {
LoginVerCodeCache isExist = LoginVerCodeCache.Tool.get(LoginVerCodeCache.Tool.class).find(context, code, LoginVerCodeCache.class);
return isExist;
public static LoginVerCodeCache exist(XContext context, String codeIden) {
return Tool.get(Tool.class).find(context, codeIden, LoginVerCodeCache.class);
}
/**
* 设置缓存
*
* @param context
* @param cache
* @param context 上下文
* @param cache 隐藏物
*/
public static void set(XContext context, LoginVerCodeCache cache) {
LoginVerCodeCache.Tool.get(LoginVerCodeCache.Tool.class).set(context, cache);
}
/**
* 删除缓存
*
* @param context 上下文
* @param codeIden 代码id
*/
public static void delete(XContext context, String codeIden) {
LoginVerCodeCache.Tool.get(LoginVerCodeCache.Tool.class).delete(context, codeIden, LoginVerCodeCache.class);
}
public String getCode() {
return code;
}
......
......@@ -189,6 +189,9 @@ public class LoginService {
LoginVerCodeCache isUse = LoginVerCodeCache.exist(context, codeIden);
if (ObjectUtil.isNull(isUse)) {
throw new XServiceException(context, LoginError.NotUsedCode);
} else {
//清除验证码
LoginVerCodeCache.delete(context, codeIden);
}
if (!CharSequenceUtil.equalsAnyIgnoreCase(isUse.getCode(), code)) {
throw new XServiceException(context, LoginError.NotCompareCode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment