mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-10 20:57:14 +08:00
fix: 修复合并冲突后的若干错误
1.完善 @Serial 2.完善 javax => jakarta 3.修复 canAccess() 使用错误 4.兼容 JustAuth Spring Boot Starter 5.CI 脚本更新 JDK 8 => 17
This commit is contained in:
@@ -154,10 +154,6 @@ limitations under the License.
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson-spring-data-27</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Easy Captcha(Java 图形验证码,支持 gif、中文、算术等类型,可用于 Java Web、JavaSE 等项目) -->
|
||||
<dependency>
|
||||
|
@@ -19,8 +19,6 @@ package top.charles7c.cnadmin.common.base;
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
||||
import jakarta.validation.groups.Default;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
|
@@ -250,7 +250,6 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseDO,
|
||||
public void fillDetail(Object detailObj) {
|
||||
if (detailObj instanceof BaseDetailResp detail) {
|
||||
this.fill(detail);
|
||||
|
||||
Long updateUser = detail.getUpdateUser();
|
||||
if (null == updateUser) {
|
||||
return;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
package top.charles7c.cnadmin.common.base;
|
||||
|
||||
import javax.validation.groups.Default;
|
||||
import jakarta.validation.groups.Default;
|
||||
|
||||
/**
|
||||
* 分组校验
|
||||
|
@@ -16,19 +16,21 @@
|
||||
|
||||
package top.charles7c.cnadmin.common.handler;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import static top.charles7c.cnadmin.common.annotation.CrudRequestMapping.Api;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
||||
import org.springframework.web.util.pattern.PathPatternParser;
|
||||
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
import top.charles7c.cnadmin.common.annotation.CrudRequestMapping;
|
||||
import top.charles7c.cnadmin.common.util.ExceptionUtils;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import static top.charles7c.cnadmin.common.annotation.CrudRequestMapping.Api;
|
||||
|
||||
/**
|
||||
* CRUD 请求映射器处理器映射器
|
||||
*
|
||||
|
@@ -20,9 +20,9 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
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 lombok.extern.slf4j.Slf4j;
|
||||
|
||||
|
@@ -16,6 +16,7 @@
|
||||
|
||||
package top.charles7c.cnadmin.common.model.query;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -41,6 +42,7 @@ import top.charles7c.cnadmin.common.constant.StringConsts;
|
||||
@Schema(description = "排序查询条件")
|
||||
public class SortQuery implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
@@ -20,7 +20,6 @@ import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -65,7 +64,6 @@ public class QueryHelper {
|
||||
if (null == query) {
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
// 获取查询条件中所有的字段
|
||||
List<Field> fieldList = ReflectUtils.getNonStaticFields(query.getClass());
|
||||
fieldList.forEach(field -> buildQuery(query, field, queryWrapper));
|
||||
@@ -87,7 +85,7 @@ public class QueryHelper {
|
||||
* 查询数据类型
|
||||
*/
|
||||
private static <Q, R> void buildQuery(Q query, Field field, QueryWrapper<R> queryWrapper) {
|
||||
boolean accessible = field.canAccess(null);
|
||||
boolean accessible = field.canAccess(query);
|
||||
try {
|
||||
field.setAccessible(true);
|
||||
// 没有 @Query,直接返回
|
||||
|
Reference in New Issue
Block a user