Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
e5466146
"eladmin-common/src/vscode:/vscode.git/clone" did not exist on "62cb72eab9dfbf54ffa24ce2098506ab300854ef"
Commit
e5466146
authored
Jul 11, 2021
by
lijiazhi
Browse files
update beetlsql3,springboot 2.5
parent
ea3cb83a
Changes
58
Expand all
Hide whitespace changes
Inline
Side-by-side
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreFunction.java
View file @
e5466146
...
@@ -4,13 +4,14 @@ import java.util.Date;
...
@@ -4,13 +4,14 @@ import java.util.Date;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
import
org.beetl.sql.core.annotatoin.UpdateIgnore
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
org.beetl.sql.annotation.entity.AutoID
;
import
org.beetl.sql.annotation.entity.SeqID
;
import
org.beetl.sql.annotation.entity.UpdateIgnore
;
public
class
CoreFunction
extends
BaseEntity
{
public
class
CoreFunction
extends
BaseEntity
{
...
...
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreMenu.java
View file @
e5466146
...
@@ -5,9 +5,10 @@ import java.util.Date;
...
@@ -5,9 +5,10 @@ import java.util.Date;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.annotation.entity.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
import
org.beetl.sql.annotation.entity.SeqID
;
import
org.beetl.sql.core.annotatoin.UpdateIgnore
;
import
org.beetl.sql.annotation.entity.UpdateIgnore
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
...
...
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreOrg.java
View file @
e5466146
...
@@ -5,13 +5,14 @@ import java.util.Date;
...
@@ -5,13 +5,14 @@ import java.util.Date;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
org.beetl.sql.annotation.entity.AutoID
;
import
org.beetl.sql.annotation.entity.SeqID
;
/**
/**
...
...
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreRole.java
View file @
e5466146
...
@@ -5,13 +5,13 @@ import java.util.Date;
...
@@ -5,13 +5,13 @@ import java.util.Date;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
org.beetl.sql.annotation.entity.AutoID
;
import
org.beetl.sql.annotation.entity.SeqID
;
/**
/**
* 角色
* 角色
...
...
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreRoleFunction.java
View file @
e5466146
...
@@ -4,11 +4,12 @@ import java.util.Date;
...
@@ -4,11 +4,12 @@ import java.util.Date;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
org.beetl.sql.annotation.entity.AutoID
;
import
org.beetl.sql.annotation.entity.SeqID
;
/*
/*
*
*
...
...
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreRoleMenu.java
View file @
e5466146
...
@@ -3,10 +3,11 @@ import java.util.Date;
...
@@ -3,10 +3,11 @@ import java.util.Date;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
com.ibeetl.admin.core.util.ValidateConfig
;
import
org.beetl.sql.annotation.entity.AutoID
;
import
org.beetl.sql.annotation.entity.SeqID
;
/*
/*
*
*
...
...
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreUser.java
View file @
e5466146
...
@@ -6,8 +6,9 @@ import javax.validation.constraints.NotBlank;
...
@@ -6,8 +6,9 @@ import javax.validation.constraints.NotBlank;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Null
;
import
javax.validation.constraints.Null
;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.annotation.entity.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
import
org.beetl.sql.annotation.entity.SeqID
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.ibeetl.admin.core.annotation.Dict
;
import
com.ibeetl.admin.core.annotation.Dict
;
...
...
admin-core/src/main/java/com/ibeetl/admin/core/entity/CoreUserRole.java
View file @
e5466146
package
com.ibeetl.admin.core.entity
;
package
com.ibeetl.admin.core.entity
;
import
org.beetl.sql.annotation.entity.AutoID
;
import
org.beetl.sql.annotation.entity.SeqID
;
import
java.util.Date
;
import
java.util.Date
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
org.beetl.sql.core.annotatoin.AutoID
;
import
org.beetl.sql.core.annotatoin.SeqID
;
/*
/*
* 用户角色关系
* 用户角色关系
...
@@ -13,7 +15,7 @@ import org.beetl.sql.core.annotatoin.SeqID;
...
@@ -13,7 +15,7 @@ import org.beetl.sql.core.annotatoin.SeqID;
*/
*/
public
class
CoreUserRole
extends
BaseEntity
{
public
class
CoreUserRole
extends
BaseEntity
{
// 自增id
@SeqID
(
name
=
"ORACLE_CORE_SEQ_NAME"
)
@SeqID
(
name
=
"ORACLE_CORE_SEQ_NAME"
)
@AutoID
@AutoID
private
Long
id
;
private
Long
id
;
...
...
admin-core/src/main/java/com/ibeetl/admin/core/file/DBIndexHelper.java
View file @
e5466146
...
@@ -37,7 +37,7 @@ public class DBIndexHelper {
...
@@ -37,7 +37,7 @@ public class DBIndexHelper {
public
void
createFileItem
(
CoreFile
file
,
List
<
FileTag
>
tags
)
{
public
void
createFileItem
(
CoreFile
file
,
List
<
FileTag
>
tags
)
{
fileDao
.
insert
(
file
,
true
);
fileDao
.
insert
(
file
);
if
(
tags
==
null
||
tags
.
isEmpty
())
{
if
(
tags
==
null
||
tags
.
isEmpty
())
{
return
;
return
;
}
}
...
...
admin-core/src/main/java/com/ibeetl/admin/core/service/CoreBaseService.java
View file @
e5466146
...
@@ -27,7 +27,7 @@ public class CoreBaseService<T> {
...
@@ -27,7 +27,7 @@ public class CoreBaseService<T> {
@Autowired
@Autowired
protected
CoreDictService
dictUtil
;
protected
CoreDictService
dictUtil
;
@Autowired
@Autowired
@Qualifier
(
"
baseDataSourceSqlManagerFactoryBean
"
)
@Qualifier
(
"
coreSqlManager
"
)
protected
SQLManager
sqlManager
;
protected
SQLManager
sqlManager
;
...
@@ -61,7 +61,7 @@ public class CoreBaseService<T> {
...
@@ -61,7 +61,7 @@ public class CoreBaseService<T> {
* @return
* @return
*/
*/
public
boolean
save
(
T
model
)
{
public
boolean
save
(
T
model
)
{
return
sqlManager
.
insert
(
model
,
true
)
>
0
;
return
sqlManager
.
insert
(
model
)
>
0
;
}
}
...
@@ -142,8 +142,6 @@ public class CoreBaseService<T> {
...
@@ -142,8 +142,6 @@ public class CoreBaseService<T> {
return
sqlManager
.
updateById
(
model
)
>
0
;
return
sqlManager
.
updateById
(
model
)
>
0
;
}
}
/**
/**
* 获取当前注入泛型T的类型
* 获取当前注入泛型T的类型
* @return 具体类型
* @return 具体类型
...
@@ -153,7 +151,6 @@ public class CoreBaseService<T> {
...
@@ -153,7 +151,6 @@ public class CoreBaseService<T> {
return
(
Class
<
T
>)
((
ParameterizedType
)
getClass
().
getGenericSuperclass
()).
getActualTypeArguments
()[
0
];
return
(
Class
<
T
>)
((
ParameterizedType
)
getClass
().
getGenericSuperclass
()).
getActualTypeArguments
()[
0
];
}
}
public
void
queryListAfter
(
List
list
)
{
public
void
queryListAfter
(
List
list
)
{
for
(
Object
bean
:
list
)
{
for
(
Object
bean
:
list
)
{
queryEntityAfter
(
bean
);
queryEntityAfter
(
bean
);
...
...
admin-core/src/main/java/com/ibeetl/admin/core/service/CoreCodeGenService.java
View file @
e5466146
...
@@ -8,13 +8,16 @@ import java.util.Set;
...
@@ -8,13 +8,16 @@ import java.util.Set;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.commons.logging.LogFactory
;
import
org.beetl.sql.core.JavaType
;
import
org.beetl.sql.core.NameConversion
;
import
org.beetl.sql.clazz.ClassDesc
;
import
org.beetl.sql.clazz.ColDesc
;
import
org.beetl.sql.clazz.NameConversion
;
import
org.beetl.sql.clazz.TableDesc
;
import
org.beetl.sql.clazz.kit.JavaType
;
import
org.beetl.sql.core.SQLManager
;
import
org.beetl.sql.core.SQLManager
;
import
org.beetl.sql.core.db.ClassDesc
;
import
org.beetl.sql.core.db.ColDesc
;
import
org.beetl.sql.core.meta.MetadataManager
;
import
org.beetl.sql.core.db.MetadataManager
;
import
org.beetl.sql.core.meta.SchemaMetadataManager
;
import
org.beetl.sql.core.db.TableDesc
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -38,7 +41,8 @@ public class CoreCodeGenService {
...
@@ -38,7 +41,8 @@ public class CoreCodeGenService {
Log
log
=
LogFactory
.
getLog
(
CoreCodeGenService
.
class
);
Log
log
=
LogFactory
.
getLog
(
CoreCodeGenService
.
class
);
public
void
refresh
()
{
public
void
refresh
()
{
sqlManager
.
refresh
();
SchemaMetadataManager
dataManager
=
(
SchemaMetadataManager
)
sqlManager
.
getMetaDataManager
();
dataManager
.
refresh
();
}
}
public
List
<
Entity
>
getAllEntityInfo
(){
public
List
<
Entity
>
getAllEntityInfo
(){
...
@@ -58,7 +62,7 @@ public class CoreCodeGenService {
...
@@ -58,7 +62,7 @@ public class CoreCodeGenService {
if
(
tableDesc
==
null
)
{
if
(
tableDesc
==
null
)
{
return
null
;
return
null
;
}
}
ClassDesc
classDesc
=
tableDesc
.
getClassDesc
(
nc
);
Entity
e
=
new
Entity
();
Entity
e
=
new
Entity
();
e
.
setName
(
nc
.
getClassName
(
table
));
e
.
setName
(
nc
.
getClassName
(
table
));
e
.
setComment
(
tableDesc
.
getRemark
());
e
.
setComment
(
tableDesc
.
getRemark
());
...
@@ -73,7 +77,7 @@ public class CoreCodeGenService {
...
@@ -73,7 +77,7 @@ public class CoreCodeGenService {
if
(
tableDesc
==
null
)
{
if
(
tableDesc
==
null
)
{
return
null
;
return
null
;
}
}
ClassDesc
classDesc
=
tableDesc
.
getClassDesc
(
nc
);
Entity
e
=
new
Entity
();
Entity
e
=
new
Entity
();
e
.
setName
(
nc
.
getClassName
(
table
));
e
.
setName
(
nc
.
getClassName
(
table
));
e
.
setComment
(
tableDesc
.
getRemark
());
e
.
setComment
(
tableDesc
.
getRemark
());
...
@@ -93,8 +97,8 @@ public class CoreCodeGenService {
...
@@ -93,8 +97,8 @@ public class CoreCodeGenService {
attr
.
setId
(
true
);
attr
.
setId
(
true
);
e
.
setIdAttribute
(
attr
);
e
.
setIdAttribute
(
attr
);
}
}
attr
.
setComment
(
desc
.
r
emark
);
attr
.
setComment
(
desc
.
getR
emark
()
);
String
type
=
JavaType
.
getType
(
desc
.
s
qlType
,
desc
.
s
ize
,
desc
.
d
igit
);
String
type
=
JavaType
.
getType
(
desc
.
getS
qlType
()
,
desc
.
getS
ize
()
,
desc
.
getD
igit
()
);
if
(
type
.
equals
(
"Double"
)){
if
(
type
.
equals
(
"Double"
)){
type
=
"BigDecimal"
;
type
=
"BigDecimal"
;
}
}
...
@@ -136,7 +140,7 @@ public class CoreCodeGenService {
...
@@ -136,7 +140,7 @@ public class CoreCodeGenService {
rootFunction
.
setCreateTime
(
new
Date
());
rootFunction
.
setCreateTime
(
new
Date
());
rootFunction
.
setParentId
(
0L
);
rootFunction
.
setParentId
(
0L
);
rootFunction
.
setType
(
"FN0"
);
rootFunction
.
setType
(
"FN0"
);
sqlManager
.
insert
(
rootFunction
,
true
);
sqlManager
.
insert
(
rootFunction
);
Long
parentId
=
rootFunction
.
getId
();
Long
parentId
=
rootFunction
.
getId
();
//设置曾删改查功能点
//设置曾删改查功能点
...
@@ -148,7 +152,7 @@ public class CoreCodeGenService {
...
@@ -148,7 +152,7 @@ public class CoreCodeGenService {
indexFunction
.
setAccessUrl
(
"/"
+
urlBase
+
"/"
+
data
.
getCode
()+
"/index.do"
);
indexFunction
.
setAccessUrl
(
"/"
+
urlBase
+
"/"
+
data
.
getCode
()+
"/index.do"
);
//设置为查询功能
//设置为查询功能
indexFunction
.
setType
(
"FN1"
);
indexFunction
.
setType
(
"FN1"
);
sqlManager
.
insert
(
indexFunction
,
true
);
sqlManager
.
insert
(
indexFunction
);
CoreFunction
upateFunction
=
new
CoreFunction
();
CoreFunction
upateFunction
=
new
CoreFunction
();
...
@@ -158,7 +162,7 @@ public class CoreCodeGenService {
...
@@ -158,7 +162,7 @@ public class CoreCodeGenService {
upateFunction
.
setCreateTime
(
new
Date
());
upateFunction
.
setCreateTime
(
new
Date
());
upateFunction
.
setParentId
(
parentId
);
upateFunction
.
setParentId
(
parentId
);
upateFunction
.
setType
(
"FN0"
);
upateFunction
.
setType
(
"FN0"
);
sqlManager
.
insert
(
upateFunction
,
true
);
sqlManager
.
insert
(
upateFunction
);
CoreFunction
addFunction
=
new
CoreFunction
();
CoreFunction
addFunction
=
new
CoreFunction
();
String
addFunctionCode
=
functionCode
+
".add"
;
String
addFunctionCode
=
functionCode
+
".add"
;
...
@@ -167,7 +171,7 @@ public class CoreCodeGenService {
...
@@ -167,7 +171,7 @@ public class CoreCodeGenService {
addFunction
.
setCreateTime
(
new
Date
());
addFunction
.
setCreateTime
(
new
Date
());
addFunction
.
setParentId
(
parentId
);
addFunction
.
setParentId
(
parentId
);
addFunction
.
setType
(
"FN0"
);
addFunction
.
setType
(
"FN0"
);
sqlManager
.
insert
(
addFunction
,
true
);
sqlManager
.
insert
(
addFunction
);
CoreFunction
delFunction
=
new
CoreFunction
();
CoreFunction
delFunction
=
new
CoreFunction
();
...
@@ -177,7 +181,7 @@ public class CoreCodeGenService {
...
@@ -177,7 +181,7 @@ public class CoreCodeGenService {
delFunction
.
setCreateTime
(
new
Date
());
delFunction
.
setCreateTime
(
new
Date
());
delFunction
.
setParentId
(
parentId
);
delFunction
.
setParentId
(
parentId
);
delFunction
.
setType
(
"FN0"
);
delFunction
.
setType
(
"FN0"
);
sqlManager
.
insert
(
delFunction
,
true
);
sqlManager
.
insert
(
delFunction
);
//刷新缓存
//刷新缓存
platformService
.
clearFunctionCache
();
platformService
.
clearFunctionCache
();
...
...
admin-core/src/main/java/com/ibeetl/admin/core/service/CorePlatformService.java
View file @
e5466146
...
@@ -8,6 +8,7 @@ import javax.annotation.PostConstruct;
...
@@ -8,6 +8,7 @@ import javax.annotation.PostConstruct;
import
org.beetl.sql.core.SQLManager
;
import
org.beetl.sql.core.SQLManager
;
import
org.beetl.sql.core.engine.SQLPlaceholderST
;
import
org.beetl.sql.core.engine.SQLPlaceholderST
;
import
org.beetl.sql.core.engine.template.BeetlTemplateEngine
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.cache.annotation.Cacheable
;
...
@@ -111,8 +112,9 @@ public class CorePlatformService {
...
@@ -111,8 +112,9 @@ public class CorePlatformService {
public
void
init
()
{
public
void
init
()
{
SQLPlaceholderST
.
textFunList
.
add
(
"function"
);
SQLPlaceholderST
.
textFunList
.
add
(
"function"
);
//sql语句里带有此函数来判断数据权限
//sql语句里带有此函数来判断数据权限
sqlManager
.
getBeetl
().
getGroupTemplate
().
registerFunction
(
"function"
,
dataAccessFunction
);
BeetlTemplateEngine
beetlTemplateEngine
=
(
BeetlTemplateEngine
)
sqlManager
.
getSqlTemplateEngine
();
sqlManager
.
getBeetl
().
getGroupTemplate
().
registerFunction
(
"nextDay"
,
new
NextDayFunction
());
beetlTemplateEngine
.
getBeetl
().
getGroupTemplate
().
registerFunction
(
"function"
,
dataAccessFunction
);
beetlTemplateEngine
.
getBeetl
().
getGroupTemplate
().
registerFunction
(
"nextDay"
,
new
NextDayFunction
());
}
}
...
...
admin-core/src/main/java/com/ibeetl/admin/core/util/enums/DelFlagEnum.java
View file @
e5466146
package
com.ibeetl.admin.core.util.enums
;
package
com.ibeetl.admin.core.util.enums
;
import
org.beetl.sql.
core.
annotat
oin.EnumMapping
;
import
org.beetl.sql.annotat
ion.entity.EnumValue
;
/**
/**
* 描述:数据是否被逻辑删除
* 描述:数据是否被逻辑删除
* @author : xiandafu
* @author : xiandafu
*/
*/
@EnumMapping
(
"value"
)
public
enum
DelFlagEnum
{
public
enum
DelFlagEnum
{
NORMAL
(
0
),
DELETED
(
1
);
NORMAL
(
0
),
DELETED
(
1
);
@EnumValue
private
int
value
;
private
int
value
;
DelFlagEnum
(
int
value
)
{
DelFlagEnum
(
int
value
)
{
...
...
admin-core/src/main/java/com/ibeetl/admin/core/util/enums/GeneralStateEnum.java
View file @
e5466146
package
com.ibeetl.admin.core.util.enums
;
package
com.ibeetl.admin.core.util.enums
;
import
org.beetl.sql.
core.
annotat
oin.EnumMapping
;
import
org.beetl.sql.annotat
ion.entity.EnumValue
;
/**
/**
* 描述:数据是否有效
* 描述:数据是否有效
*
*
* @author : lijiazhi
* @author : lijiazhi
*/
*/
@EnumMapping
(
"value"
)
public
enum
GeneralStateEnum
{
public
enum
GeneralStateEnum
{
/**
/**
* 启用
* 启用
...
@@ -18,6 +18,7 @@ public enum GeneralStateEnum {
...
@@ -18,6 +18,7 @@ public enum GeneralStateEnum {
*/
*/
DISABLE
(
"S0"
);
DISABLE
(
"S0"
);
@EnumValue
private
String
value
;
private
String
value
;
GeneralStateEnum
(
String
value
)
{
GeneralStateEnum
(
String
value
)
{
...
...
admin-core/src/main/java/com/ibeetl/admin/core/util/enums/RoleTypeEnum.java
View file @
e5466146
package
com.ibeetl.admin.core.util.enums
;
package
com.ibeetl.admin.core.util.enums
;
import
org.beetl.sql.
core.
annotat
oin.EnumMapping
;
import
org.beetl.sql.annotat
ion.entity.EnumValue
;
/**
/**
* 描述: 工作流角色
* 描述: 工作流角色
*
*
* @author : Administrator
* @author : Administrator
*/
*/
@EnumMapping
(
"value"
)
public
enum
RoleTypeEnum
{
public
enum
RoleTypeEnum
{
/**
/**
...
@@ -19,7 +18,7 @@ public enum RoleTypeEnum {
...
@@ -19,7 +18,7 @@ public enum RoleTypeEnum {
*/
*/
WORKFLOW
(
"R1"
);
WORKFLOW
(
"R1"
);
@EnumValue
private
String
value
;
private
String
value
;
RoleTypeEnum
(
String
value
)
{
RoleTypeEnum
(
String
value
)
{
...
...
admin-core/src/main/java/com/ibeetl/admin/core/web/query/PageParam.java
View file @
e5466146
...
@@ -3,8 +3,12 @@ package com.ibeetl.admin.core.web.query;
...
@@ -3,8 +3,12 @@ package com.ibeetl.admin.core.web.query;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.annotation.Query
;
import
org.beetl.sql.core.engine.PageQuery
;
import
org.beetl.sql.core.engine.PageQuery
;
import
org.beetl.sql.core.page.DefaultPageRequest
;
import
org.beetl.sql.core.page.PageRequest
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
/**
* 子类继承此类获得翻页功能
* 子类继承此类获得翻页功能
...
@@ -22,9 +26,17 @@ public class PageParam {
...
@@ -22,9 +26,17 @@ public class PageParam {
this
.
page
=
page
;
this
.
page
=
page
;
}
}
@JsonIgnore
public
PageRequest
getPageRequest
(){
if
(
page
==
null
){
return
DefaultPageRequest
.
of
(
1L
,
20
);
}
return
DefaultPageRequest
.
of
(
page
,
limit
);
}
@JsonIgnore
@JsonIgnore
public
PageQuery
getPage
Query
()
{
public
Map
getPage
Param
()
{
Field
[]
fs
=
this
.
getClass
().
getDeclaredFields
();
Field
[]
fs
=
this
.
getClass
().
getDeclaredFields
();
Map
map
=
new
HashMap
();
for
(
Field
f:
fs
){
for
(
Field
f:
fs
){
Query
query
=
f
.
getAnnotation
(
Query
.
class
);
Query
query
=
f
.
getAnnotation
(
Query
.
class
);
if
(
query
==
null
){
if
(
query
==
null
){
...
@@ -36,21 +48,24 @@ public class PageParam {
...
@@ -36,21 +48,24 @@ public class PageParam {
f
.
setAccessible
(
true
);
f
.
setAccessible
(
true
);
Object
o
=
f
.
get
(
this
);
Object
o
=
f
.
get
(
this
);
if
(
o
!=
null
&&
!
o
.
toString
().
isEmpty
())
{
if
(
o
!=
null
&&
!
o
.
toString
().
isEmpty
())
{
f
.
s
et
(
this
,
"%"
+
o
.
toString
()+
"%"
);
map
.
put
(
f
.
g
et
Name
()
,
"%"
+
o
.
toString
()+
"%"
);
}
}
}
}
}
catch
(
IllegalAccessException
e
)
{
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
else
{
}
try
{
PageQuery
query
=
new
PageQuery
();
Object
o
=
f
.
get
(
this
);
query
.
setParas
(
this
);
map
.
put
(
f
.
getName
(),
o
);
if
(
page
!=
null
)
{
}
catch
(
IllegalAccessException
e
)
{
query
.
setPageNumber
(
page
);
e
.
printStackTrace
();
query
.
setPageSize
(
limit
);
}
}
}
}
return
query
;
return
map
;
}
}
public
Integer
getLimit
()
{
public
Integer
getLimit
()
{
...
...
doc/starter-mysql.sql
View file @
e5466146
This diff is collapsed.
Click to expand it.
pom.xml
View file @
e5466146
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<parent>
<parent>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.
2
.2
.RELEASE
</version>
<version>
2.
5
.2
</version>
</parent>
</parent>
<!-- Add typical dependencies for a web application -->
<!-- Add typical dependencies for a web application -->
<dependencies>
<dependencies>
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<artifactId>
spring-boot-starter-test
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment