mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-03-23 05:44:33 +08:00
update 代码生成查询选择between时生成params
This commit is contained in:
@@ -178,6 +178,10 @@ public interface GenConstants {
|
||||
* 相等查询
|
||||
*/
|
||||
String QUERY_EQ = "EQ";
|
||||
/**
|
||||
* 范围查询
|
||||
*/
|
||||
String QUERY_BETWEEN = "BETWEEN";
|
||||
|
||||
/**
|
||||
* 必填标识,对应前端表单规则中的必填字段配置。
|
||||
|
||||
@@ -237,6 +237,9 @@ public class VelocityUtils {
|
||||
} else if (!column.isSuperColumn() && "imageUpload".equals(column.getHtmlType())) {
|
||||
importList.add("org.dromara.common.translation.annotation.Translation");
|
||||
importList.add("org.dromara.common.translation.constant.TransConstant");
|
||||
} else if (!column.isSuperColumn() && GenConstants.QUERY_BETWEEN.equals(column.getQueryType())) {
|
||||
importList.add("java.util.HashMap");
|
||||
importList.add("java.util.Map");
|
||||
}
|
||||
}
|
||||
return importList;
|
||||
|
||||
@@ -25,6 +25,7 @@ public class ${ClassName}Bo implements Serializable {
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
#set($hasBetween = false)
|
||||
#foreach ($column in $columns)
|
||||
#if(!$table.isSuperColumn($column.javaField) && ($column.query || $column.insert || $column.edit))
|
||||
/**
|
||||
@@ -47,6 +48,15 @@ public class ${ClassName}Bo implements Serializable {
|
||||
private $column.javaType $column.javaField;
|
||||
|
||||
#end
|
||||
#if($column.query && $column.queryType == 'BETWEEN')
|
||||
#set($hasBetween = true)
|
||||
#end
|
||||
#end
|
||||
#if($hasBetween)
|
||||
/**
|
||||
* 查询参数
|
||||
*/
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user