mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
feat(支持springboot3): 支持springboot3框架
This commit is contained in:
@@ -80,7 +80,7 @@
|
||||
<!-- 通用http接口模块-->
|
||||
<dependency>
|
||||
<groupId>com.dtflys.forest</groupId>
|
||||
<artifactId>forest-spring-boot-starter</artifactId>
|
||||
<artifactId>forest-spring-boot3-starter</artifactId>
|
||||
<version>${forest.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
@@ -12,13 +12,13 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 设备定时任务
|
||||
*
|
||||
*
|
||||
* @author kerwincui
|
||||
*/
|
||||
@ApiModel(value = "DeviceJob", description = "设备定时任务 iot_device_job")
|
||||
|
||||
@@ -3,13 +3,10 @@ package com.fastbee.iot.mapper;
|
||||
import com.fastbee.iot.domain.Device;
|
||||
import com.fastbee.iot.domain.DeviceLog;
|
||||
import com.fastbee.iot.model.DeviceStatistic;
|
||||
import com.fastbee.iot.model.HistoryModel;
|
||||
import com.fastbee.iot.model.MonitorModel;
|
||||
import com.fastbee.iot.tdengine.service.model.TdLogDto;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -48,7 +45,7 @@ public interface DeviceLogMapper
|
||||
/**
|
||||
* 批量保存图片
|
||||
*/
|
||||
public int saveBatch(@Param("list") List<DeviceLog> list);
|
||||
public int saveBatch(List<DeviceLog> list);
|
||||
|
||||
/**
|
||||
* 修改设备日志
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.yomahub.liteflow.flow.LiteflowResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.fastbee.iot.domain.SocialUser;
|
||||
import me.zhyd.oauth.model.AuthCallback;
|
||||
import me.zhyd.oauth.model.AuthUser;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* 第三方登录Service接口
|
||||
|
||||
@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -48,7 +48,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.slf4j.LoggerFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import ch.qos.logback.classic.LoggerContext;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -41,8 +41,8 @@ import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -371,7 +371,7 @@ public class SocialLoginServiceImpl implements ISocialLoginService {
|
||||
socialUser.setUsername(authUser.getUsername());
|
||||
socialUser.setNickname(authUser.getNickname());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String genBindId(AuthUser authUser) {
|
||||
String bindId = Md5Utils.hash(authUser.getUuid() + authUser.getSource());
|
||||
String key = BIND_REDIS_KEY + bindId;
|
||||
@@ -391,14 +391,14 @@ public class SocialLoginServiceImpl implements ISocialLoginService {
|
||||
redisCache.setCacheObject(key, loginIdValue, LOGIN_SOCIAL_EXPIRE_TIME, TimeUnit.SECONDS);
|
||||
return loginId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String genErrorId(String msg) {
|
||||
String errorId = Md5Utils.hash(msg + RandomUtil.randomString(32));
|
||||
String key = LOGIN_ERROR_MSG_REDIS_KEY + errorId;
|
||||
redisCache.setCacheObject(key, msg, LOGIN_SOCIAL_EXPIRE_TIME, TimeUnit.SECONDS);
|
||||
return errorId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String genWxBindId(Long userId) {
|
||||
String wxBindId = Md5Utils.hash(userId + RandomUtil.randomString(32));
|
||||
String key = WX_BIND_REDIS_KEY + wxBindId;
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
||||
@@ -3,10 +3,6 @@ package com.fastbee.iot.util;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import sun.misc.BASE64Decoder;
|
||||
import sun.misc.BASE64Encoder;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.util.Base64;
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@ import com.fastbee.common.wechat.WeChatLoginResult;
|
||||
import com.fastbee.iot.wechat.vo.WxBindReqVO;
|
||||
import com.fastbee.iot.wechat.vo.WxCancelBindReqVO;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* 微信相关服务类
|
||||
|
||||
@@ -39,9 +39,9 @@ import me.zhyd.oauth.model.AuthUser;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ${packageName}.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -26,7 +26,7 @@ import com.fastbee.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* ${functionName}Controller
|
||||
*
|
||||
*
|
||||
* @author ${author}
|
||||
* @date ${datetime}
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.fastbee.system.domain;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -13,7 +13,7 @@ import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 参数配置表 sys_config
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@ApiModel(value = "SysConfig", description = "参数配置表 sys_config")
|
||||
@@ -101,7 +101,7 @@ public class SysConfig extends BaseEntity
|
||||
{
|
||||
this.configType = configType;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.fastbee.system.domain;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -12,7 +12,7 @@ import com.fastbee.common.xss.Xss;
|
||||
|
||||
/**
|
||||
* 通知公告表 sys_notice
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@ApiModel(value = "SysNotice", description = "通知公告表 sys_notice")
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package com.fastbee.system.domain;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Size;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@@ -14,7 +14,7 @@ import com.fastbee.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 岗位表 sys_post
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@ApiModel(value = "SysPost", description = "岗位表 sys_post")
|
||||
@@ -114,7 +114,7 @@ public class SysPost extends BaseEntity
|
||||
{
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
||||
@@ -13,7 +13,7 @@ import com.fastbee.system.mapper.SysClientMapper;
|
||||
import com.fastbee.system.service.ISysClientService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.fastbee.system.service.ISysConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import javax.validation.Validator;
|
||||
import jakarta.validation.Validator;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
Reference in New Issue
Block a user