Skip to content

Commit

Permalink
Merge branch '4.1.x'
Browse files Browse the repository at this point in the history
# Conflicts:
#	hsweb-easy-orm-core/pom.xml
#	hsweb-easy-orm-elasticsearch/pom.xml
#	hsweb-easy-orm-rdb/pom.xml
#	hsweb-easy-orm-rdb/src/main/java/org/hswebframework/ezorm/rdb/operator/builder/fragments/term/AbstractTermFragmentBuilder.java
#	pom.xml
  • Loading branch information
zhou-hao committed Feb 10, 2023
2 parents 6ab74f5 + 0fcd080 commit b9f236a
Show file tree
Hide file tree
Showing 48 changed files with 832 additions and 514 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '8'
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Cache Maven Repository
Expand All @@ -22,7 +22,7 @@ jobs:
path: ~/.m2
key: hsweb-easy-orm-maven-repository
- name: Build with Maven
run: mvn -Duser.timezone=Asia/Shanghai test
run: mvn -Duser.timezone="Asia/Shanghai" test -Pjava11
- name: Codecov
uses: codecov/[email protected]
with:
Expand Down
5 changes: 3 additions & 2 deletions hsweb-easy-orm-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<parent>
<artifactId>hsweb-easy-orm</artifactId>
<groupId>org.hswebframework</groupId>
<version>4.0.15</version>
<version>4.1.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -21,7 +22,7 @@
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.2.2</version>
<version>2.13.3</version>

</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public Optional<Object> getProperty(Object object, String name) {
} catch (NoSuchMethodException ignore) {

} catch (Exception e) {
log.info("无法获取属性:{},对象:{}", name, object, e);
ApacheCommonPropertyOperator.log.info("无法获取属性:{},对象:{}", name, object, e);
}
return Optional.empty();
}
Expand All @@ -46,7 +46,7 @@ public void setProperty(Object object, String name, Object value) {
@Override
@SneakyThrows
public <T> T convert(Object from, Class<T> to) {
T newInstance = to.newInstance();
T newInstance = to.getConstructor().newInstance();
try {
BeanUtils.copyProperties(newInstance, from);
} catch (Exception err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,16 @@ public <B> Query<T, Q> orderByDesc(StaticMethodReferenceColumn<B> column) {
return this;
}

public <B> Query<T, Q> orderByAsc(MethodReferenceColumn<B> column) {
param.orderBy(column.getColumn()).value(column.get()).asc();
return this;
}

public <B> Query<T, Q> orderByDesc(MethodReferenceColumn<B> column) {
param.orderBy(column.getColumn()).value(column.get()).desc();
return this;
}

public Query<T, Q> orderByAsc(String column) {
param.orderBy(column).asc();
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public class Sort extends Column {
@Schema(description = "排序方式", allowableValues = {"asc", "desc"}, minLength = 3, maxLength = 4)
private String order = "asc";

@Schema(description = "指定值排序")
private Object value;

public Sort() {
}

Expand All @@ -42,4 +45,8 @@ public void desc() {
this.order = "desc";
}

public Sort value(Object value) {
this.value = value;
return this;
}
}
44 changes: 0 additions & 44 deletions hsweb-easy-orm-elasticsearch/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit b9f236a

Please sign in to comment.