mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 04:59:21 +08:00
chore: 升级依赖
SpringBoot 3.1.11 => 3.2.7 SnailJob 1.1.0-beta1 => 1.1.0 MyBatisPlus 3.5.5 => 3.5.7 MyBatisFlex 1.8.9 => 1.9.3 dynamic-datasource 4.3.0 => 4.3.1 JetCache 2.7.5 => 2.7.6 Redisson 3.30.0 => 3.32.0 CosID 2.6.8 => 2.9.1 EasyExcel 3.3.4 => 4.0.1 XFileStorage 2.1.0 => 2.2.0 Crane4j 2.8.0 => 2.9.0 Hutool 5.8.27 => 5.8.29 AWS S3 1.12.720 => 1.12.761 IP2Region 3.1.11 => 3.2.6
This commit is contained in:
@@ -22,8 +22,8 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.autoconfigure.AutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.boot.task.TaskExecutorCustomizer;
|
||||
import org.springframework.boot.task.TaskSchedulerCustomizer;
|
||||
import org.springframework.boot.task.ThreadPoolTaskExecutorCustomizer;
|
||||
import org.springframework.boot.task.ThreadPoolTaskSchedulerCustomizer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
@@ -53,7 +53,7 @@ public class ThreadPoolAutoConfiguration {
|
||||
*/
|
||||
@Bean
|
||||
@ConditionalOnProperty(prefix = "spring.task.execution.extension", name = PropertiesConstants.ENABLED, matchIfMissing = true)
|
||||
public TaskExecutorCustomizer taskExecutorCustomizer(ThreadPoolExtensionProperties properties) {
|
||||
public ThreadPoolTaskExecutorCustomizer threadPoolTaskExecutorCustomizer(ThreadPoolExtensionProperties properties) {
|
||||
return executor -> {
|
||||
// 核心(最小)线程数
|
||||
executor.setCorePoolSize(corePoolSize);
|
||||
@@ -74,7 +74,7 @@ public class ThreadPoolAutoConfiguration {
|
||||
@ConditionalOnProperty(prefix = "spring.task.scheduling.extension", name = PropertiesConstants.ENABLED, matchIfMissing = true)
|
||||
public static class TaskSchedulerConfiguration {
|
||||
@Bean
|
||||
public TaskSchedulerCustomizer taskSchedulerCustomizer(ThreadPoolExtensionProperties properties) {
|
||||
public ThreadPoolTaskSchedulerCustomizer threadPoolTaskSchedulerCustomizer(ThreadPoolExtensionProperties properties) {
|
||||
return executor -> {
|
||||
executor.setRejectedExecutionHandler(properties.getScheduling()
|
||||
.getRejectedPolicy()
|
||||
|
@@ -30,9 +30,7 @@ import net.sf.jsqlparser.expression.operators.relational.ExpressionList;
|
||||
import net.sf.jsqlparser.expression.operators.relational.InExpression;
|
||||
import net.sf.jsqlparser.schema.Column;
|
||||
import net.sf.jsqlparser.schema.Table;
|
||||
import net.sf.jsqlparser.statement.select.PlainSelect;
|
||||
import net.sf.jsqlparser.statement.select.SelectExpressionItem;
|
||||
import net.sf.jsqlparser.statement.select.SubSelect;
|
||||
import net.sf.jsqlparser.statement.select.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import top.continew.starter.core.constant.StringConstants;
|
||||
@@ -124,9 +122,9 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
|
||||
private Expression buildDeptAndChildExpression(DataPermission dataPermission,
|
||||
DataPermissionCurrentUser currentUser,
|
||||
Expression expression) {
|
||||
SubSelect subSelect = new SubSelect();
|
||||
ParenthesedSelect subSelect = new ParenthesedSelect();
|
||||
PlainSelect select = new PlainSelect();
|
||||
select.setSelectItems(Collections.singletonList(new SelectExpressionItem(new Column(dataPermission.id()))));
|
||||
select.setSelectItems(Collections.singletonList(new SelectItem<>(new Column(dataPermission.id()))));
|
||||
select.setFromItem(new Table(dataPermission.deptTableAlias()));
|
||||
EqualsTo equalsTo = new EqualsTo();
|
||||
equalsTo.setLeftExpression(new Column(dataPermission.id()));
|
||||
@@ -135,7 +133,7 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
|
||||
function.setName("find_in_set");
|
||||
function.setParameters(new ExpressionList(new LongValue(currentUser.getDeptId()), new Column("ancestors")));
|
||||
select.setWhere(new OrExpression(equalsTo, function));
|
||||
subSelect.setSelectBody(select);
|
||||
subSelect.setSelect(select);
|
||||
// 构建父查询
|
||||
InExpression inExpression = new InExpression();
|
||||
inExpression.setLeftExpression(this.buildColumn(dataPermission.tableAlias(), dataPermission.deptId()));
|
||||
@@ -201,15 +199,15 @@ public class DataPermissionHandlerImpl implements DataPermissionHandler {
|
||||
private Expression buildCustomExpression(DataPermission dataPermission,
|
||||
DataPermissionCurrentUser.CurrentUserRole role,
|
||||
Expression expression) {
|
||||
SubSelect subSelect = new SubSelect();
|
||||
ParenthesedSelect subSelect = new ParenthesedSelect();
|
||||
PlainSelect select = new PlainSelect();
|
||||
select.setSelectItems(Collections.singletonList(new SelectExpressionItem(new Column(dataPermission.deptId()))));
|
||||
select.setSelectItems(Collections.singletonList(new SelectItem<>(new Column(dataPermission.deptId()))));
|
||||
select.setFromItem(new Table(dataPermission.roleDeptTableAlias()));
|
||||
EqualsTo equalsTo = new EqualsTo();
|
||||
equalsTo.setLeftExpression(new Column(dataPermission.roleId()));
|
||||
equalsTo.setRightExpression(new LongValue(role.getRoleId()));
|
||||
select.setWhere(equalsTo);
|
||||
subSelect.setSelectBody(select);
|
||||
subSelect.setSelect(select);
|
||||
// 构建父查询
|
||||
InExpression inExpression = new InExpression();
|
||||
inExpression.setLeftExpression(this.buildColumn(dataPermission.tableAlias(), dataPermission.deptId()));
|
||||
|
@@ -36,7 +36,7 @@ import java.util.List;
|
||||
*/
|
||||
public class ServiceImpl<M extends BaseMapper<T>, T> extends com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M, T> implements IService<T> {
|
||||
|
||||
protected final List<Field> entityFields = ReflectUtils.getNonStaticFields(this.entityClass);
|
||||
protected final List<Field> entityFields = ReflectUtils.getNonStaticFields(this.getEntityClass());
|
||||
|
||||
@Override
|
||||
public T getById(Serializable id) {
|
||||
@@ -53,7 +53,7 @@ public class ServiceImpl<M extends BaseMapper<T>, T> extends com.baomidou.mybati
|
||||
protected T getById(Serializable id, boolean isCheckExists) {
|
||||
T entity = baseMapper.selectById(id);
|
||||
if (isCheckExists) {
|
||||
CheckUtils.throwIfNotExists(entity, ClassUtil.getClassName(entityClass, true), "ID", id);
|
||||
CheckUtils.throwIfNotExists(entity, ClassUtil.getClassName(this.getEntityClass(), true), "ID", id);
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>3.1.11</version>
|
||||
<version>3.2.7</version>
|
||||
<relativePath/>
|
||||
</parent>
|
||||
|
||||
@@ -44,35 +44,35 @@
|
||||
<properties>
|
||||
<!-- 项目版本号 -->
|
||||
<revision>2.2.0</revision>
|
||||
<snail-job.version>1.1.0-beta1</snail-job.version>
|
||||
<snail-job.version>1.1.0</snail-job.version>
|
||||
<sa-token.version>1.38.0</sa-token.version>
|
||||
<just-auth.version>1.16.6</just-auth.version>
|
||||
<mybatis-plus.version>3.5.5</mybatis-plus.version>
|
||||
<mybatis-flex.version>1.8.9</mybatis-flex.version>
|
||||
<dynamic-datasource.version>4.3.0</dynamic-datasource.version>
|
||||
<mybatis-plus.version>3.5.7</mybatis-plus.version>
|
||||
<mybatis-flex.version>1.9.3</mybatis-flex.version>
|
||||
<dynamic-datasource.version>4.3.1</dynamic-datasource.version>
|
||||
<p6spy.version>3.9.1</p6spy.version>
|
||||
<jetcache.version>2.7.5</jetcache.version>
|
||||
<redisson.version>3.30.0</redisson.version>
|
||||
<cosid.version>2.6.8</cosid.version>
|
||||
<jetcache.version>2.7.6</jetcache.version>
|
||||
<redisson.version>3.32.0</redisson.version>
|
||||
<cosid.version>2.9.1</cosid.version>
|
||||
<sms4j.version>3.2.1</sms4j.version>
|
||||
<aj-captcha.version>1.3.0</aj-captcha.version>
|
||||
<easy-captcha.version>1.6.2</easy-captcha.version>
|
||||
<easy-excel.version>3.3.4</easy-excel.version>
|
||||
<easy-excel.version>4.0.1</easy-excel.version>
|
||||
<nashorn.version>15.4</nashorn.version>
|
||||
<x-file-storage.version>2.1.0</x-file-storage.version>
|
||||
<aws-s3.version>1.12.720</aws-s3.version>
|
||||
<crane4j.version>2.8.0</crane4j.version>
|
||||
<x-file-storage.version>2.2.0</x-file-storage.version>
|
||||
<aws-s3.version>1.12.761</aws-s3.version>
|
||||
<crane4j.version>2.9.0</crane4j.version>
|
||||
<knife4j.version>4.5.0</knife4j.version>
|
||||
<tlog.version>1.5.2</tlog.version>
|
||||
<snakeyaml.version>2.2</snakeyaml.version>
|
||||
<okhttp.version>4.12.0</okhttp.version>
|
||||
<ttl.version>2.14.5</ttl.version>
|
||||
<ip2region.version>3.1.11</ip2region.version>
|
||||
<hutool.version>5.8.27</hutool.version>
|
||||
<ip2region.version>3.2.6</ip2region.version>
|
||||
<hutool.version>5.8.29</hutool.version>
|
||||
<!-- Maven Plugin Versions -->
|
||||
<flatten.version>1.6.0</flatten.version>
|
||||
<spotless.version>2.43.0</spotless.version>
|
||||
<sonar.version>3.9.1.2184</sonar.version>
|
||||
<sonar.version>3.11.0.3922</sonar.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
|
@@ -132,7 +132,7 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseIdD
|
||||
public List<LabelValueResp> listDict(Q query, SortQuery sortQuery) {
|
||||
QueryWrapper<T> queryWrapper = this.buildQueryWrapper(query);
|
||||
this.sort(queryWrapper, sortQuery);
|
||||
DictField dictField = entityClass.getDeclaredAnnotation(DictField.class);
|
||||
DictField dictField = super.getEntityClass().getDeclaredAnnotation(DictField.class);
|
||||
CheckUtils.throwIfNull(dictField, "请添加并配置 @DictField 字典结构信息");
|
||||
// 指定查询字典字段
|
||||
queryWrapper.select(dictField.labelKey(), dictField.valueKey());
|
||||
@@ -149,7 +149,7 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseIdD
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long add(C req) {
|
||||
this.beforeAdd(req);
|
||||
T entity = BeanUtil.copyProperties(req, entityClass);
|
||||
T entity = BeanUtil.copyProperties(req, super.getEntityClass());
|
||||
baseMapper.insert(entity);
|
||||
this.afterAdd(req, entity);
|
||||
return entity.getId();
|
||||
@@ -169,7 +169,7 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseIdD
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void delete(List<Long> ids) {
|
||||
this.beforeDelete(ids);
|
||||
baseMapper.deleteBatchIds(ids);
|
||||
baseMapper.deleteByIds(ids);
|
||||
this.afterDelete(ids);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ public abstract class BaseServiceImpl<M extends BaseMapper<T>, T extends BaseIdD
|
||||
// 设置排序
|
||||
this.sort(queryWrapper, sortQuery);
|
||||
List<T> entityList = baseMapper.selectList(queryWrapper);
|
||||
if (entityClass == targetClass) {
|
||||
if (super.getEntityClass() == targetClass) {
|
||||
return (List<E>)entityList;
|
||||
}
|
||||
return BeanUtil.copyToList(entityList, targetClass);
|
||||
|
Reference in New Issue
Block a user