diff --git a/hsweb-authorization/hsweb-authorization-api/pom.xml b/hsweb-authorization/hsweb-authorization-api/pom.xml
index d7bdc7e7e..7a8681a31 100644
--- a/hsweb-authorization/hsweb-authorization-api/pom.xml
+++ b/hsweb-authorization/hsweb-authorization-api/pom.xml
@@ -5,7 +5,7 @@
hsweb-authorization
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-authorization/hsweb-authorization-basic/pom.xml b/hsweb-authorization/hsweb-authorization-basic/pom.xml
index 1f5bb409b..40729307b 100644
--- a/hsweb-authorization/hsweb-authorization-basic/pom.xml
+++ b/hsweb-authorization/hsweb-authorization-basic/pom.xml
@@ -5,7 +5,7 @@
hsweb-authorization
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/handler/access/OwnCreatedDataAccessHandler.java b/hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/handler/access/OwnCreatedDataAccessHandler.java
index 4f70701cf..c532a4118 100644
--- a/hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/handler/access/OwnCreatedDataAccessHandler.java
+++ b/hsweb-authorization/hsweb-authorization-basic/src/main/java/org/hswebframework/web/authorization/basic/handler/access/OwnCreatedDataAccessHandler.java
@@ -3,6 +3,7 @@ package org.hswebframework.web.authorization.basic.handler.access;
import org.apache.commons.beanutils.PropertyUtils;
import org.apache.commons.beanutils.PropertyUtilsBean;
import org.hswebframework.ezorm.core.param.Term;
+import org.hswebframework.ezorm.core.param.TermType;
import org.hswebframework.utils.ClassUtils;
import org.hswebframework.web.authorization.Permission;
import org.hswebframework.web.authorization.access.DataAccessConfig;
@@ -86,7 +87,7 @@ public class OwnCreatedDataAccessHandler implements DataAccessHandler {
Class entityType = ClassUtils.getGenericType(controller.getClass(), 0);
if (ClassUtils.instanceOf(entityType, RecordCreationEntity.class)) {
QueryService queryService =
- ((QueryController) controller).getService();
+ ((QueryController) controller).getService();
RecordCreationEntity oldData = queryService.selectByPk(id);
if (oldData != null && !context.getAuthentication().getUser().getId().equals(oldData.getCreatorId())) {
return false;
@@ -119,7 +120,7 @@ public class OwnCreatedDataAccessHandler implements DataAccessHandler {
queryParamEntity.setTerms(new ArrayList<>());
//添加一个查询条件
queryParamEntity
- .where(RecordCreationEntity.creatorId, userId)
+ .and(RecordCreationEntity.creatorId, TermType.eq, userId)
//客户端提交的参数 作为嵌套参数
.nest().setTerms(oldParam);
} else if (entity instanceof RecordCreationEntity) {
diff --git a/hsweb-authorization/hsweb-authorization-jwt/pom.xml b/hsweb-authorization/hsweb-authorization-jwt/pom.xml
index d5cc9432c..d437df19c 100644
--- a/hsweb-authorization/hsweb-authorization-jwt/pom.xml
+++ b/hsweb-authorization/hsweb-authorization-jwt/pom.xml
@@ -5,7 +5,7 @@
hsweb-authorization
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-auth-server/pom.xml b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-auth-server/pom.xml
index b028a49f2..f1420ee09 100644
--- a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-auth-server/pom.xml
+++ b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-auth-server/pom.xml
@@ -23,7 +23,7 @@
hsweb-authorization-oauth2
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/pom.xml b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/pom.xml
index 811623df1..864a70e14 100644
--- a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/pom.xml
+++ b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-client/pom.xml
@@ -23,7 +23,7 @@
hsweb-authorization-oauth2
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-core/pom.xml b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-core/pom.xml
index c1ca252d4..028260782 100644
--- a/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-core/pom.xml
+++ b/hsweb-authorization/hsweb-authorization-oauth2/hsweb-authorization-oauth2-core/pom.xml
@@ -23,7 +23,7 @@
hsweb-authorization-oauth2
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-authorization/hsweb-authorization-oauth2/pom.xml b/hsweb-authorization/hsweb-authorization-oauth2/pom.xml
index be69ed90a..179767bd1 100644
--- a/hsweb-authorization/hsweb-authorization-oauth2/pom.xml
+++ b/hsweb-authorization/hsweb-authorization-oauth2/pom.xml
@@ -5,7 +5,7 @@
hsweb-authorization
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-authorization/pom.xml b/hsweb-authorization/pom.xml
index 9022e8084..42a599028 100644
--- a/hsweb-authorization/pom.xml
+++ b/hsweb-authorization/pom.xml
@@ -5,7 +5,7 @@
hsweb-framework
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-boost/hsweb-boost-aop/pom.xml b/hsweb-boost/hsweb-boost-aop/pom.xml
index 52617141a..2c7df8e4c 100644
--- a/hsweb-boost/hsweb-boost-aop/pom.xml
+++ b/hsweb-boost/hsweb-boost-aop/pom.xml
@@ -23,7 +23,7 @@
hsweb-boost
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-boost/hsweb-boost-excel/pom.xml b/hsweb-boost/hsweb-boost-excel/pom.xml
index 95243d88c..bb024e7c3 100644
--- a/hsweb-boost/hsweb-boost-excel/pom.xml
+++ b/hsweb-boost/hsweb-boost-excel/pom.xml
@@ -5,7 +5,7 @@
hsweb-boost
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-boost/hsweb-boost-ftp/pom.xml b/hsweb-boost/hsweb-boost-ftp/pom.xml
index 00f533916..8f8f9c87f 100644
--- a/hsweb-boost/hsweb-boost-ftp/pom.xml
+++ b/hsweb-boost/hsweb-boost-ftp/pom.xml
@@ -5,7 +5,7 @@
hsweb-boost
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-boost/pom.xml b/hsweb-boost/pom.xml
index 6333fc5eb..728c82a02 100644
--- a/hsweb-boost/pom.xml
+++ b/hsweb-boost/pom.xml
@@ -23,7 +23,7 @@
hsweb-framework
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
4.0.0
diff --git a/hsweb-commons/hsweb-commons-bean/pom.xml b/hsweb-commons/hsweb-commons-bean/pom.xml
index 903211e4d..2c6ea19d3 100644
--- a/hsweb-commons/hsweb-commons-bean/pom.xml
+++ b/hsweb-commons/hsweb-commons-bean/pom.xml
@@ -5,7 +5,7 @@
hsweb-commons
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
../pom.xml
4.0.0
diff --git a/hsweb-commons/hsweb-commons-controller/pom.xml b/hsweb-commons/hsweb-commons-controller/pom.xml
index 0ddebbc17..79fd5a038 100644
--- a/hsweb-commons/hsweb-commons-controller/pom.xml
+++ b/hsweb-commons/hsweb-commons-controller/pom.xml
@@ -23,7 +23,7 @@
hsweb-commons
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
../pom.xml
4.0.0
diff --git a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/CrudController.java b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/CrudController.java
index 789b405a1..dfb72d763 100644
--- a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/CrudController.java
+++ b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/CrudController.java
@@ -34,8 +34,8 @@ import org.hswebframework.web.service.CrudService;
* @see CrudService
* @since 3.0
*/
-public interface CrudController
- extends QueryController
+public interface CrudController
+ extends QueryController
, UpdateController
, CreateController
, DeleteController {
diff --git a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/GenericEntityController.java b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/GenericEntityController.java
index 98e2429a8..141193cf7 100644
--- a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/GenericEntityController.java
+++ b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/GenericEntityController.java
@@ -32,7 +32,7 @@ import org.hswebframework.web.service.CrudService;
* @see CrudService
*/
public interface GenericEntityController, PK, Q extends Entity, M>
- extends CrudController {
+ extends CrudController {
@Override
@Authorize(ignore = true)
diff --git a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/QueryController.java b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/QueryController.java
index 8f2fe97b9..d16097d7b 100644
--- a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/QueryController.java
+++ b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/QueryController.java
@@ -40,12 +40,11 @@ import static org.hswebframework.web.controller.message.ResponseMessage.ok;
*
* @param 实体类型
* @param 主键类型
- * @param 查询条件实体类型,默认提供{@link QueryParamEntity}实现
* @author zhouhao
* @see QueryParamEntity
* @see 3.0
*/
-public interface QueryController {
+public interface QueryController {
/**
* 获取实现了{@link QueryByEntityService}和{@link QueryService}的服务类
@@ -69,24 +68,22 @@ public interface QueryController {
@Authorize(action = Permission.ACTION_QUERY)
@GetMapping
@ApiOperation(value = "根据动态条件查询", responseReference = "get")
- default ResponseMessage> list(Q param) {
+ default ResponseMessage> list(QueryParamEntity param) {
return ok(getService().selectPager(param));
}
@Authorize(action = Permission.ACTION_QUERY)
@GetMapping("/no-paging")
@ApiOperation(value = "不分页动态查询", responseReference = "get")
- default ResponseMessage> listNoPaging(Q param) {
- if (param instanceof QueryParamEntity) {
- ((QueryParamEntity) param).setPaging(false);
- }
+ default ResponseMessage> listNoPaging(QueryParamEntity param) {
+
return ok(getService().select(param));
}
@Authorize(action = Permission.ACTION_QUERY)
@GetMapping("/count")
@ApiOperation(value = "根据动态条件统计", responseReference = "get")
- default ResponseMessage count(Q param) {
+ default ResponseMessage count(QueryParamEntity param) {
return ok(getService().count(param));
}
diff --git a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/SimpleCrudController.java b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/SimpleCrudController.java
index b0ab97b4b..1bb5712e1 100644
--- a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/SimpleCrudController.java
+++ b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/SimpleCrudController.java
@@ -34,8 +34,8 @@ import org.springframework.beans.BeanUtils;
* @see CrudService
* @since 3.0
*/
-public interface SimpleCrudController
- extends QueryController
+public interface SimpleCrudController
+ extends QueryController
, UpdateController
, CreateController
, DeleteController {
diff --git a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/SimpleGenericEntityController.java b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/SimpleGenericEntityController.java
index 963d9516d..cd9dfbe36 100644
--- a/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/SimpleGenericEntityController.java
+++ b/hsweb-commons/hsweb-commons-controller/src/main/java/org/hswebframework/web/controller/SimpleGenericEntityController.java
@@ -21,6 +21,7 @@ package org.hswebframework.web.controller;
import org.hswebframework.web.authorization.annotation.Authorize;
import org.hswebframework.web.commons.entity.Entity;
import org.hswebframework.web.commons.entity.GenericEntity;
+import org.hswebframework.web.commons.entity.param.QueryParamEntity;
import org.hswebframework.web.service.CrudService;
/**
@@ -32,7 +33,7 @@ import org.hswebframework.web.service.CrudService;
* @see CrudService
*/
public interface SimpleGenericEntityController, PK, Q extends Entity>
- extends SimpleCrudController {
+ extends SimpleCrudController {
@Override
@Authorize(ignore = true)
diff --git a/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-api/pom.xml b/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-api/pom.xml
index 004071f18..d8b4f7a5d 100644
--- a/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-api/pom.xml
+++ b/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-api/pom.xml
@@ -23,7 +23,7 @@
hsweb-commons-dao
org.hswebframework.web
- 3.0.10-SNAPSHOT
+ 3.1.0-SNAPSHOT
../pom.xml
4.0.0
diff --git a/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-mybatis/README.md b/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-mybatis/README.md
deleted file mode 100644
index 3d8c0bc2b..000000000
--- a/hsweb-commons/hsweb-commons-dao/hsweb-commons-dao-mybatis/README.md
+++ /dev/null
@@ -1,224 +0,0 @@
-# 基于mybatis的通用crud实现
-
-使用myabtis和easy-orm对`hsweb-commons-dao-api`进行了实现,提供动态条件对crud支持.
-
-# 使用
-在pom.xml中引入:
-
-```xml
-
- org.hswebframework.web
- hsweb-commons-dao-mybatis
- ${hsweb.framework.version}
-
-```
-
-# 配置
-application.yml
-
-```yaml
-mybatis:
- # 扫描myabtis mapper xml的路径
- mapper-locations: classpath*:com/company/app/**/*Mapper.xml
- # 这里需要配置扫描枚举,才能支持对实现了EnumDict接口的枚举进行序列化和反序列化
- type-handlers-package: com.company.app.enums
- # 是否开启动态数据源,开启后才能支持在同一个dao中切换数据源
- dynamic-datasource: false
- # 排除扫描xml配置,用于需要拓展无法修改的mapper xml时,通过此配置不加载对应的xml,然后通过mapper-locations配置加载新的xml.
- mapper-location-excludes: classpath*:com/company/app/x/y/*Mapper.xml
-```
-
-# 使用通用Mapper XMl
-
-目前仅支持xml的方式,例如:
-
-```xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-```
-
-⚠️注意:query(count),update,delete方法的参数目前仅实现了:
-
-`org.hswebframework.web.commons.entity.param.QueryParamEntity`
-
-`org.hswebframework.web.commons.entity.param.UpdateParamEntity`
-
-`org.hswebframework.web.commons.entity.param.DeleteParamEntity`
-
-因此在实际调用都时候,目前只能接收对应以上参数.
-但是在接口中仍然使用`org.hswebframework.web.commons.entity.Entity`作为参数,用于预留给以后提供更多都参数实现.
-
-# 动态条件
-此模块使用hsweb-easyorm项目来进行动态SQL条件的生成,主要是通过:在上述的`**ParamEntity`类中的属性 `List terms;`
-进行处理,`Term`为一个SQL条件,例如一个简单的嵌套条件:
-```text
- [{
- column:"name",
- termType:"eq", #SQL条件类型 =
- value:"张三",
- terms:[
- {
- column:"address",
- termType:"like", //SQL条件类型 like
- value:"北京%"
- },
- {
- column:"address",
- type:"or" //和前面的条件成or关系,如果不指定,默认为and
- termType:"like", //SQL条件类型 like
- value:"上海%"
- }
- ]
- }]
-```
-对应的sql条件为: where name = ? and (address like ? or address lke ?)
-
-条件构造方式看上去过于复杂? 可以使用DSL方式的构建工具类:`org.hswebframework.ezorm.core.dsl.Query`来进行构建.
-在[hsweb-commons-service-api](../../hsweb-commons-service/hsweb-commons-service-api)模块也会提供便捷的条件创建方式.
-
-如果参数来自客户端请求,可封装一个通用的js进行构建, 你可以在前端放心的构建参数,所有的条件都使用参数化预编译的方式拼接SQL,不存在SQL注入问题.
-
-## 默认支持的动态条件列表
-| termType | 对应SQL | 说明 |
-| ------------- |:-------------:| ----|
-|eq|=?| 等于|
-|not |!=?| 不等于|
-|gt|>?| 大于|
-|gte|>= ?| 大于等于|
-|lt|< ?| 小于|
-|lte| <= ?| 小于等于|
-|like|like ?| 模糊匹配,如果需要统配符,请自行拼接value,如: value+"%" |
-|nlike|not like ?| 同like |
-|in|in(?,?)| value 可使用半角逗号(,)分隔,或者数组或者`Collection`接口的实现 |
-|nin|not in(?,?)| value 可使用半角逗号(,)分隔,或者数组或者`Collection`接口的实现 |
-|isnull| is null | value为任意不为空的值即可 |
-|notnull| not null | value为任意不为空的值即可 |
-|empty| ='' | value为任意不为空的值即可 |
-|nempty| !='' | value为任意不为空的值即可 |
-|bwt|between ? and ? | value 可使用半角逗号(,)分隔,或者使用数组或者Collection接口的实现|
-|nbwt|not between ? and ? | value 可使用半角逗号(,)分隔,或者使用数组或者Collection接口的实现|
-
-## 拓展动态条件
-在某些需要自定义查询条件的场景,比如关联条件,可通过实现`SqlTermCustomer`接口并注入到spring来进行自定义SQL条件的拼接,
-例如:
-```java
-//AbstractSqlTermCustomer提供了一些便利的方法
-@org.springframework.stereotype.Component
-public class MyTerm extends AbstractSqlTermCustomer{
-
- @Override
- public String getTermType() {
- //对应Term参数中的属性termType
- return "my-term";
- }
-
- @Override
- public Dialect[] forDialect() {
- //对特定对数据库类型生效,返回null时对全部支持对数据库类型生效
- return null;
- }
-
-
- @Override
- public SqlAppender accept(String wherePrefix, Term term, RDBColumnMetaData column, String tableAlias) {
- //当传入了my-term条件对时候,会调用此方法进行拼接
- //对传入对参数进行转换,此步骤为必须的
- ChangedTermValue termValue =createChangedValue(term);
-
- //转换参数,将参数转为集合,以支持in查询.
- List