Skip to content

Commit

Permalink
Merge pull request #106 from aoju/develop
Browse files Browse the repository at this point in the history
v5.6.9
  • Loading branch information
839128 authored Mar 13, 2020
2 parents b93ad1d + 9fdb2c7 commit 97fa980
Show file tree
Hide file tree
Showing 1,766 changed files with 2,014 additions and 1,982 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p align="center">
<a target="_blank" href="https://search.maven.org/search?q=org.aoju">
<img src="https://img.shields.io/badge/maven--central-v5.6.8-blue.svg?label=Maven%20Central" ></img>
<img src="https://img.shields.io/badge/maven--central-v5.6.9-blue.svg?label=Maven%20Central" ></img>
</a>
<a target="_blank" href="https://travis-ci.org/aoju/bus">
<img src="https://travis-ci.org/aoju/bus.svg?branch=master">
Expand Down Expand Up @@ -93,13 +93,13 @@ Bus (应用/服务总线) 是一个微服务套件、基础框架,它基于Jav
<dependency>
<groupId>org.aoju</groupId>
<artifactId>bus-all</artifactId>
<version>5.6.8</version>
<version>5.6.9</version>
</dependency>
```

### Gradle
```
implementation 'org.aoju:bus-all:5.6.8'
implementation 'org.aoju:bus-all:5.6.9'
```

### Downlad
Expand Down
14 changes: 7 additions & 7 deletions bus-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-all</artifactId>
<version>5.6.8</version>
<version>5.6.9</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand All @@ -32,11 +32,11 @@
<ehcache.version>3.3.1</ehcache.version>
<curator.version>4.2.0</curator.version>
<guava.version>28.0-jre</guava.version>
<yaml.version>1.23</yaml.version>
<yaml.version>1.25</yaml.version>
<druid.version>1.1.20</druid.version>
<mysql.version>8.0.18</mysql.version>
<mysql.version>8.0.19</mysql.version>
<!--bus-core-->
<lombok.version>1.18.10</lombok.version>
<lombok.version>1.18.12</lombok.version>
<!--bus-crypto-->
<bouncycastle.version>1.60</bouncycastle.version>
<!--bus-extra-->
Expand All @@ -54,13 +54,13 @@
<lz4.version>1.3.0</lz4.version>
<snappy.version>1.1.7.3</snappy.version>
<!--bus-forest-->
<loader.version>2.0.1.RELEASE</loader.version>
<loader.version>2.2.5.RELEASE</loader.version>
<!--bus-health-->
<jna.version>5.5.0</jna.version>
<!--bus-limiter-->
<redisson.version>3.11.2</redisson.version>
<!--bus-logger-->
<slf4j.version>1.7.26</slf4j.version>
<slf4j.version>1.7.30</slf4j.version>
<logback.version>1.2.3</logback.version>
<log4j.version>1.2.17</log4j.version>
<log4j2.version>2.13.0</log4j2.version>
Expand Down Expand Up @@ -102,7 +102,7 @@
<!--bus-tracer-->
<cxf.version>2.7.18</cxf.version>
<httpclient.version>4.5.2</httpclient.version>
<httpclient5.version>5.0-alpha1</httpclient5.version>
<httpclient5.version>5.0</httpclient5.version>
<jersey.version>2.23.1</jersey.version>
<quartz.version>2.2.3</quartz.version>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion bus-base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-base</artifactId>
<version>5.6.8</version>
<version>5.6.9</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@ControllerAdvice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public class Consts extends Normal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* 系统响应码
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public class ErrorCode {
Expand Down
74 changes: 68 additions & 6 deletions bus-base/src/main/java/org/aoju/bus/base/entity/BaseEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,20 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.aoju.bus.base.consts.Consts;
import org.aoju.bus.core.key.ObjectID;
import org.aoju.bus.core.lang.Normal;
import org.aoju.bus.core.utils.DateUtils;
import org.aoju.bus.core.utils.ReflectUtils;
import org.aoju.bus.core.utils.StringUtils;
import org.aoju.bus.core.utils.*;

import javax.persistence.Transient;
import java.util.List;
import java.util.Objects;

/**
* <p>
* Entity 基本信息.
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@Data
Expand Down Expand Up @@ -155,4 +154,67 @@ private <T> void setValue(T entity, String[] fields, Object[] value) {
}
}

/**
* 设置访问信息
*
* @param <T> 对象泛型
* @param source 源始实体
* @param target 目标实体
*/
public static <T extends BaseEntity> void setAccess(T source, T target) {
if (Objects.isNull(source) || Objects.isNull(target)) {
return;
}
target.setX_org_id(source.getX_org_id());
target.setX_user_id(source.getX_user_id());
}

/**
* 设置访问信息
*
* @param <T> 对象泛型
* @param source 源始实体
* @param target 目标实体
*/
public static <T extends BaseEntity> void setAccess(T source, T... target) {
if (Objects.isNull(source) || ArrayUtils.isEmpty(target)) {
return;
}
for (T targetEntity : target) {
setAccess(source, targetEntity);
}
}

/**
* 设置访问信息
*
* @param <S> 源对象泛型
* @param <E> 集合元素对象泛型
* @param source 源始实体
* @param target 目标实体
*/
public static <S extends BaseEntity, E extends BaseEntity> void setAccess(S source, List<E> target) {
if (Objects.isNull(source) || CollUtils.isEmpty(target)) {
return;
}
target.forEach(targetEntity -> setAccess(source, targetEntity));
}

/**
* 重置数字型字符串为null,防止插入数据库表异常
*
* @param <T> 对象泛型
* @param entity 实体对象
* @param fields 数字型字符串属性数组
* @param values 值数据
*/
public static <T extends BaseEntity> void resetIntField(T entity, String[] fields, String[] values) {
for (int i = 0; i < fields.length; i++) {
String field = fields[i];
if (Consts.EMPTY.equals(values[i]) && ReflectUtils.hasField(entity, field)) {
ReflectUtils.invokeSetter(entity, field, null);
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public interface BaseMapper<T> extends Mapper<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public interface Mapper<T> extends org.aoju.bus.mapper.common.Mapper<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public interface BaseService<T> extends Service {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public interface Service {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* </p>
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public class BaseServiceImpl<Mapper extends BaseMapper<T>, T extends BaseEntity>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* 基础请求封装
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public class BaseController<Service extends BaseService<T>, T> extends Controller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* 基础输出封装
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public class Controller {
Expand Down
2 changes: 1 addition & 1 deletion bus-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-bom</artifactId>
<version>5.6.8</version>
<version>5.6.9</version>
<packaging>pom</packaging>

<name>${project.artifactId}</name>
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Object func(@CacheKey("#arg0[#i]") List<Long> ids) {
<dependency>
<groupId>org.aoju.bus</groupId>
<artifactId>bus-cache</artifactId>
<version>5.6.8</version>
<version>5.6.9</version>
</dependency>
```
- XML注册
Expand Down
4 changes: 2 additions & 2 deletions bus-cache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.aoju</groupId>
<artifactId>bus-cache</artifactId>
<version>5.6.8</version>
<version>5.6.9</version>
<packaging>jar</packaging>

<name>${project.artifactId}</name>
Expand All @@ -29,7 +29,7 @@
<ehcache.version>3.3.1</ehcache.version>
<curator.version>4.2.0</curator.version>
<guava.version>28.0-jre</guava.version>
<yaml.version>1.23</yaml.version>
<yaml.version>1.25</yaml.version>
<hession.version>4.0.38</hession.version>
<druid.version>1.1.20</druid.version>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/src/main/java/org/aoju/bus/cache/CacheX.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* 缓存接口
*
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public interface CacheX {
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/src/main/java/org/aoju/bus/cache/Complex.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

/**
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@Singleton
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/src/main/java/org/aoju/bus/cache/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

/**
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public class Context {
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/src/main/java/org/aoju/bus/cache/Manage.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

/**
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
@Singleton
Expand Down
2 changes: 1 addition & 1 deletion bus-cache/src/main/java/org/aoju/bus/cache/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

/**
* @author Kimi Liu
* @version 5.6.8
* @version 5.6.9
* @since JDK 1.8+
*/
public class Module extends AbstractModule {
Expand Down
Loading

0 comments on commit 97fa980

Please sign in to comment.