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
143d37ee
"jetbrains:/idea/checkout/git" did not exist on "0f0392d78297c17909726b3cd5b76b2da708958a"
Commit
143d37ee
authored
Nov 27, 2021
by
trumansdo
Browse files
更换至beetlsql3最新版本
parent
398a4c6b
Changes
170
Hide whitespace changes
Inline
Side-by-side
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/RoleConsoleElController.java
View file @
143d37ee
...
...
@@ -31,7 +31,8 @@ import java.util.Map;
import
java.util.stream.Collectors
;
import
javax.validation.constraints.NotNull
;
import
lombok.extern.slf4j.Slf4j
;
import
org.beetl.sql.core.engine.PageQuery
;
import
org.beetl.sql.core.page.PageRequest
;
import
org.beetl.sql.core.page.PageResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
...
@@ -68,11 +69,11 @@ public class RoleConsoleElController {
*/
@GetMapping
(
"/list"
)
@Function
(
"role.query"
)
public
JsonResult
<
Page
Query
>
list
(
RoleQuery
condtion
)
{
public
JsonResult
<
Page
Result
>
list
(
RoleQuery
condtion
)
{
Page
Query
page
=
condtion
.
getPage
Query
();
roleConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
);
Page
Request
page
=
condtion
.
getPage
Request
();
PageResult
pageResult
=
roleConsoleService
.
queryByCondtion
(
page
);
return
JsonResult
.
success
(
page
Result
);
}
@GetMapping
(
"/all"
)
...
...
@@ -161,11 +162,11 @@ public class RoleConsoleElController {
*/
@PostMapping
(
"/user/list"
)
@Function
(
"role.user.query"
)
public
JsonResult
<
Page
Query
<
CoreUser
>>
userList
(
RoleUserQuery
query
)
{
public
JsonResult
<
Page
Result
<
CoreUser
>>
userList
(
RoleUserQuery
query
)
{
Page
Query
page
=
query
.
getPage
Query
();
Page
Query
<
CoreUser
>
page
Query
=
roleConsoleService
.
queryRoleUser
(
page
);
return
JsonResult
.
success
(
page
);
Page
Request
page
=
query
.
getPage
Request
();
Page
Result
<
CoreUser
>
page
Result
=
roleConsoleService
.
queryRoleUser
(
page
);
return
JsonResult
.
success
(
page
Result
);
}
@GetMapping
(
"/function/ids"
)
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/UserConsoleElController.java
View file @
143d37ee
...
...
@@ -24,7 +24,7 @@ import java.util.Arrays;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.beetl.sql.core.
engin
e.Page
Query
;
import
org.beetl.sql.core.
pag
e.Page
Result
;
import
org.jxls.common.Context
;
import
org.jxls.util.JxlsHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -62,9 +62,9 @@ public class UserConsoleElController {
@Function
(
"user.query"
)
@GetMapping
public
JsonResult
<
Page
Query
<
CoreUser
>>
users
(
CoreUserParam
coreUserParam
)
{
public
JsonResult
<
Page
Result
<
CoreUser
>>
users
(
CoreUserParam
coreUserParam
)
{
Page
Query
<
CoreUser
>
allUsers
=
userConsoleService
.
getUsersByComplexSelect
(
coreUserParam
);
Page
Result
<
CoreUser
>
allUsers
=
userConsoleService
.
getUsersByComplexSelect
(
coreUserParam
);
return
JsonResult
.
success
(
allUsers
);
}
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/dto/UserExcelExportData.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.dto
;
import
javax.validation.constraints.NotBlank
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.ibeetl.admin.core.annotation.Dict
;
/**
* excel导出需要的模板数据
*
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/AuditQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
java.util.Date
;
import
org.apache.commons.lang3.StringUtils
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.util.Tool
;
import
com.ibeetl.admin.core.web.query.PageParam
;
import
java.util.Date
;
import
org.apache.commons.lang3.StringUtils
;
/** 审计查询条件 */
public
class
AuditQuery
extends
PageParam
{
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/CmsBlogQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
import
java.util.Date
;
/** CmsBlog查询 */
public
class
CmsBlogQuery
extends
PageParam
{
@Query
(
name
=
"id"
,
display
=
true
)
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/CoreDictQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
import
java.util.Date
;
/** CoreDict查询 */
public
class
CoreDictQuery
extends
PageParam
{
@Query
(
name
=
"字典值"
,
display
=
true
)
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/CoreFunctionQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/** 功能查询 */
public
class
CoreFunctionQuery
extends
PageParam
{
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/FunctionQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
java.util.List
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.web.query.PageParam
;
import
java.util.List
;
/** 功能表单查询条件 */
public
class
FunctionQuery
extends
PageParam
{
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/OrgTreeQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
java.util.List
;
import
com.ibeetl.admin.core.web.query.PageParam
;
import
java.util.List
;
/** 描述: 带有组织树相关的查询 */
public
class
OrgTreeQuery
extends
PageParam
{
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/OrgUserQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
java.util.Date
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.util.Tool
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/RoleUserQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
/** 描述: 角色李的用户列表 */
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/UserQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
java.util.Date
;
import
org.apache.commons.lang3.StringUtils
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.util.Tool
;
import
com.ibeetl.admin.core.util.enums.CoreDictType
;
import
com.ibeetl.admin.core.web.query.PageParam
;
import
java.util.Date
;
import
org.apache.commons.lang3.StringUtils
;
public
class
UserQuery
extends
PageParam
{
...
...
plus-admin/admin-console/src/main/java/com/ibeetl/admin/console/web/query/WorkflowQuery.java
View file @
143d37ee
package
com.ibeetl.admin.console.web.query
;
import
java.util.Date
;
import
com.ibeetl.admin.core.annotation.Query
;
import
com.ibeetl.admin.core.web.query.PageParam
;
...
...
plus-admin/admin-console/src/main/resources/application.yml
View file @
143d37ee
...
...
@@ -19,11 +19,12 @@ beetl:
suffix
:
html
# -------beetlsql配置
beetlsql
:
ds
:
baseDataSource
:
basePackage
:
com.ibeetl.admin
daoSuffix
:
Dao
dbStyle
:
org.beetl.sql.core.db.MySqlStyle
sqlManagers
:
baseSqlManager
baseSqlManager
:
ds
:
baseDataSource
basePackage
:
com.ibeetl.admin
daoSuffix
:
Dao
dbStyle
:
org.beetl.sql.core.db.MySqlStyle
mutiple
:
datasource
:
baseDataSource
# -------- 文件预览配置
...
...
plus-admin/admin-console/src/main/resources/btsql-ext.properties
View file @
143d37ee
...
...
@@ -5,4 +5,4 @@ DELIMITER_STATEMENT_END=
#\u51FD\u6570\u6CE8\u518C
FN.isEmpty
=
org.beetl.ext.fn.EmptyExpressionFunction
FN.isNotEmpty
=
org.beetl.ext.fn.IsNotEmptyExpressionFunction
FN.mapping
=
com.ibeetl.admin.core.conf.beetl.handler.MappingFunction
#
FN.mapping=com.ibeetl.admin.core.conf.beetl.handler.MappingFunction
plus-admin/admin-console/src/main/resources/sql/console/menu.md
View file @
143d37ee
...
...
@@ -45,32 +45,25 @@ from core_menu cm
and
cm
.
del_flag
=
0
and
cf
.
del_flag
=
0
```
@ mapping("MenuFunctionMapping");
MenuFunctionMapping
===
*
菜单功能点结果集映射
```
javascript
var
menu_func_mapping
=
{
"
id
"
:
"
menu_func_map
"
,
"
mapping
"
:
{
"
resultType
"
:
"
com.ibeetl.admin.core.entity.CoreMenu
"
,
"
id
"
:
"
id
"
,
"
name
"
:
"
name
"
,
"
code
"
:
"
code
"
,
"
functionId
"
:
"
function_id
"
,
"
parentMenuId
"
:
"
parent_menu_id
"
,
"
icon
"
:
"
icon
"
,
"
seq
"
:
"
seq
"
,
"
type
"
:
"
type
"
,
"
relationFunction
"
:
{
"
resultType
"
:
"
com.ibeetl.admin.core.entity.CoreFunction
"
,
"
id
"
:
"
func_id
"
,
"
name
"
:
"
func_name
"
,
"
accessUrl
"
:
"
func_access_url
"
,
"
type
"
:
"
func_type
"
}
}
};
```
json
{
"id"
:
"id"
,
"name"
:
"name"
,
"code"
:
"code"
,
"functionId"
:
"function_id"
,
"parentMenuId"
:
"parent_menu_id"
,
"icon"
:
"icon"
,
"seq"
:
"seq"
,
"type"
:
"type"
,
"relationFunction"
:
{
"id"
:
"func_id"
,
"name"
:
"func_name"
,
"accessUrl"
:
"func_access_url"
,
"type"
:
"func_type"
}
}
```
\ No newline at end of file
plus-admin/admin-console/src/main/resources/sql/console/org.md
View file @
143d37ee
...
...
@@ -4,30 +4,32 @@ batchDelByIds
queryByCondtion
===
select
@pageTag(){
o.
*
@}
from core_org o where 1=1 and del_flag = 0
@ //数据权限,组织机构对应的对应的字段
and #function("org.query",{org:"id"})#
@if(!isEmpty(code)){
and o.code like #"%"+code+"%"#
@}
@if(!isEmpty(name)){
and o.name like #"%"+name+"%"#
@}
@if(!isEmpty(type)){
and o.type = #type#
@}
@if(!isEmpty(parentOrgId)){
and o.parent_org_id = #parentOrgId#
@}
```
sql
select
@
pageTag
(){
o
.
*
@
}
from
core_org
o
where
1
=
1
and
del_flag
=
0
@
//
数据权限,组织机构对应的对应的字段
@
and
#
function
(
"org.query"
,{
org
:
"id"
})
#
@
if
(
!
isEmpty
(
code
)){
and
o
.
code
like
#
"%"
+
code
+
"%"
#
@
}
@
if
(
!
isEmpty
(
name
)){
and
o
.
name
like
#
"%"
+
name
+
"%"
#
@
}
@
if
(
!
isEmpty
(
type
)){
and
o
.
type
=
#
type
#
@
}
@
if
(
!
isEmpty
(
parentOrgId
)){
and
o
.
parent_org_id
=
#
parentOrgId
#
@
}
@pageIgnoreTag(){
order by o.id
@}
@
pageIgnoreTag
(){
order
by
o
.
id
@
}
```
queryUserByCondtion
===
...
...
plus-admin/admin-console/src/main/resources/sql/console/user.md
View file @
143d37ee
...
...
@@ -34,7 +34,6 @@ and #function("user.query")#
and
u
.
create_time
<
#
nextDay
(
createTimeEnd
)
#
@
}
```
@ mapping("UsersMapping");
batchDelUserByIds
===
...
...
@@ -69,25 +68,20 @@ where u.id=#id#
UsersMapping
===
```
var user_mapping_var={
"id": "core_user_map",
"mapping": {
"resultType": "com.ibeetl.admin.core.entity.CoreUser",
"id": "id",
"createTime": "create_time",
"code": "code",
"name": "name",
"state": "state",
"jobType0": "job_type0",
"jobType1": "job_type1",
"updateTime": "update_time",
"attachmentId": "attachment_id",
"org": {
"resultType": "com.ibeetl.admin.core.entity.CoreOrg",
"id": "org_id",
"name": "org_name"
}
}
};
```
json
{
"id"
:
"id"
,
"createTime"
:
"create_time"
,
"code"
:
"code"
,
"name"
:
"name"
,
"state"
:
"state"
,
"jobType0"
:
"job_type0"
,
"jobType1"
:
"job_type1"
,
"updateTime"
:
"update_time"
,
"attachmentId"
:
"attachment_id"
,
"org"
:
{
"id"
:
"org_id"
,
"name"
:
"org_name"
}
}
```
\ No newline at end of file
plus-admin/admin-console/src/test/java/CustomBeanProcessorTest.java
View file @
143d37ee
import
cn.hutool.core.collection.CollUtil
;
import
com.ibeetl.admin.ConsoleApplication
;
import
com.ibeetl.admin.core.dao.CoreFunctionDao
;
import
com.ibeetl.admin.core.entity.CoreRoute
;
...
...
@@ -15,16 +16,19 @@ import org.springframework.test.context.junit4.SpringRunner;
@SpringBootTest
(
classes
=
ConsoleApplication
.
class
)
public
class
CustomBeanProcessorTest
{
@Autowired
CoreFunctionDao
coreFunctionDao
;
@Autowired
CoreFunctionDao
coreFunctionDao
;
@Test
public
void
maptest
()
{
List
<
CoreRoute
>
routesList
=
coreFunctionDao
.
getAllRoutes
();
List
<
CoreRoute
>
routesList
=
coreFunctionDao
.
getAllRoutes
(
CollUtil
.<
Long
>
newArrayList
(
1L
,
3L
));
System
.
out
.
println
(
routesList
);
}
@Test
public
void
test
()
{
SQLManager
sqlManager
=
coreFunctionDao
.
getSQLManager
();
List
<
CmsBlog
>
cmsBlogList
=
sqlManager
.
lambdaQuery
(
CmsBlog
.
class
).
select
();
System
.
out
.
println
(
cmsBlogList
);
...
...
plus-admin/admin-console/src/test/java/SimpleTest.java
View file @
143d37ee
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONUtil
;
import
java.awt.AWTException
;
import
java.awt.Robot
;
import
java.awt.event.InputEvent
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.EnumSet
;
...
...
@@ -9,6 +11,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
java.util.Set
;
import
java.util.concurrent.atomic.AtomicInteger
;
import
java.util.function.BiConsumer
;
import
java.util.function.BinaryOperator
;
import
java.util.function.Function
;
...
...
@@ -19,6 +22,21 @@ import org.junit.Test;
public
class
SimpleTest
{
@Test
public
void
RobotTest
()
throws
AWTException
{
AtomicInteger
count
=
new
AtomicInteger
(
3600
*
3
);
Robot
robot
=
new
Robot
();
robot
.
delay
(
1000
);
while
(
count
.
decrementAndGet
()>
0
){
robot
.
mousePress
(
InputEvent
.
BUTTON3_DOWN_MASK
);
robot
.
delay
(
20
);
robot
.
mouseRelease
(
InputEvent
.
BUTTON3_DOWN_MASK
);
robot
.
delay
(
3000
);
}
}
@Test
public
void
testStream
()
{
GetLastProductByJobsBean
b1
=
new
GetLastProductByJobsBean
();
...
...
Prev
1
2
3
4
5
6
…
9
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