Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
ed906d0a
提交
ed906d0a
编写于
5月 11, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
a22c77d3
变更
30
隐藏空白字符变更
内嵌
并排
正在显示
30 个修改的文件
包含
313 行增加
和
96 行删除
+313
-96
ouindex-view-appmenu.ts
...src/mock/app/ouindex-view-appmenu/ouindex-view-appmenu.ts
+3
-3
ibzdepartment-grid-view.less
...s/ou/ibzdepartment-grid-view/ibzdepartment-grid-view.less
+0
-7
ibzemployee-grid-view.less
...pages/ou/ibzemployee-grid-view/ibzemployee-grid-view.less
+0
-7
ibzorganization-grid-view.less
.../ibzorganization-grid-view/ibzorganization-grid-view.less
+0
-7
index.ts
app_web/src/store/index.ts
+3
-1
actions.ts
app_web/src/store/modules/unified-resource/actions.ts
+14
-0
getters.ts
app_web/src/store/modules/unified-resource/getters.ts
+20
-0
index.ts
app_web/src/store/modules/unified-resource/index.ts
+16
-0
mutations.ts
app_web/src/store/modules/unified-resource/mutations.ts
+22
-0
state.ts
app_web/src/store/modules/unified-resource/state.ts
+9
-0
default.less
app_web/src/styles/default.less
+9
-0
auth-guard.ts
app_web/src/utils/auth-guard/auth-guard.ts
+2
-0
ouindex-view-appmenu-base.vue
...ts/app/ouindex-view-appmenu/ouindex-view-appmenu-base.vue
+33
-1
ouindex-view-appmenu-model.ts
...ts/app/ouindex-view-appmenu/ouindex-view-appmenu-model.ts
+3
-3
config.xml
config.xml
+0
-5
Dockerfile
ibzou-app/ibzou-app-web/src/main/docker/Dockerfile
+1
-1
ibzou-app-web.yaml
ibzou-app/ibzou-app-web/src/main/docker/ibzou-app-web.yaml
+1
-3
application-web-dev.yml
.../ibzou-app-web/src/main/resources/application-web-dev.yml
+1
-1
application-web-prod.yml
...ibzou-app-web/src/main/resources/application-web-prod.yml
+1
-1
IBZDepartmentMapper.java
...n/java/cn/ibizlab/core/ou/mapper/IBZDepartmentMapper.java
+5
-4
IBZEmployeeMapper.java
...ain/java/cn/ibizlab/core/ou/mapper/IBZEmployeeMapper.java
+5
-4
IBZOrganizationMapper.java
...java/cn/ibizlab/core/ou/mapper/IBZOrganizationMapper.java
+5
-4
IIBZDepartmentService.java
...ava/cn/ibizlab/core/ou/service/IIBZDepartmentService.java
+14
-7
IIBZEmployeeService.java
.../java/cn/ibizlab/core/ou/service/IIBZEmployeeService.java
+14
-7
IIBZOrganizationService.java
...a/cn/ibizlab/core/ou/service/IIBZOrganizationService.java
+14
-6
IBZDepartmentServiceImpl.java
...bizlab/core/ou/service/impl/IBZDepartmentServiceImpl.java
+41
-7
IBZEmployeeServiceImpl.java
.../ibizlab/core/ou/service/impl/IBZEmployeeServiceImpl.java
+46
-7
IBZOrganizationServiceImpl.java
...zlab/core/ou/service/impl/IBZOrganizationServiceImpl.java
+28
-7
PermissionSyncJob.java
.../src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
+2
-2
application-sys.yml
ibzou-util/src/main/resources/application-sys.yml
+1
-1
未找到文件。
app_web/src/mock/app/ouindex-view-appmenu/ouindex-view-appmenu.ts
浏览文件 @
ed906d0a
...
...
@@ -22,7 +22,7 @@ mock.onGet('v7/ouindex-viewappmenu').reply((config: any) => {
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
iconcls
:
'
fa fa-university
'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto3'
,
...
...
@@ -40,7 +40,7 @@ mock.onGet('v7/ouindex-viewappmenu').reply((config: any) => {
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
iconcls
:
'
fa fa-sitemap
'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto2'
,
...
...
@@ -58,7 +58,7 @@ mock.onGet('v7/ouindex-viewappmenu').reply((config: any) => {
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
iconcls
:
'
fa fa-user
'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto1'
,
...
...
app_web/src/pages/ou/ibzdepartment-grid-view/ibzdepartment-grid-view.less
浏览文件 @
ed906d0a
...
...
@@ -17,10 +17,3 @@
// this is less
.view-container.degridview{
>.view-card.view-no-caption{
>.ivu-card-body{
height: 100%;
}
}
}
\ No newline at end of file
app_web/src/pages/ou/ibzemployee-grid-view/ibzemployee-grid-view.less
浏览文件 @
ed906d0a
...
...
@@ -17,10 +17,3 @@
// this is less
.view-container.degridview{
>.view-card.view-no-caption{
>.ivu-card-body{
height: 100%;
}
}
}
\ No newline at end of file
app_web/src/pages/ou/ibzorganization-grid-view/ibzorganization-grid-view.less
浏览文件 @
ed906d0a
...
...
@@ -17,10 +17,3 @@
// this is less
.view-container.degridview{
>.view-card.view-no-caption{
>.ivu-card-body{
height: 100%;
}
}
}
\ No newline at end of file
app_web/src/store/index.ts
浏览文件 @
ed906d0a
...
...
@@ -7,6 +7,7 @@ import * as mutations from './mutations';
import
*
as
getters
from
'./getters'
;
import
viewaction
from
'./modules/view-action'
import
unifiedresource
from
'./modules/unified-resource'
const
state
=
{
...
rootstate
...
...
@@ -20,7 +21,8 @@ const store = new Vuex.Store({
mutations
,
getters
,
modules
:
{
viewaction
viewaction
,
unifiedresource
},
});
...
...
app_web/src/store/modules/unified-resource/actions.ts
0 → 100644
浏览文件 @
ed906d0a
/**
* 提交统一资源数据
*
* @param param0
* @param data
*/
export
const
commitResourceData
=
({
commit
,
state
}:
{
commit
:
any
,
state
:
any
},
{
unires
,
enablepermissionvalid
}:
{
unires
:
Array
<
any
>
,
enablepermissionvalid
:
boolean
})
=>
{
if
(
unires
&&
unires
.
length
>
0
){
commit
(
'setResourceData'
,
unires
);
}
if
(
enablepermissionvalid
){
commit
(
'setEnablePermissionValid'
,
enablepermissionvalid
);
}
}
\ No newline at end of file
app_web/src/store/modules/unified-resource/getters.ts
0 → 100644
浏览文件 @
ed906d0a
/**
* 判断指定统一资源是否存在
*
* @param state
*/
export
const
getResourceData
=
(
state
:
any
)
=>
(
resourcetag
:
string
)
=>
{
let
itemIndex
:
any
=
state
.
resourceData
.
findIndex
((
obj
:
any
,
objIndex
:
any
,
objs
:
any
)
=>
{
return
Object
.
is
(
obj
.
unirescode
,
resourcetag
);
})
return
itemIndex
===
-
1
?
false
:
true
;
}
/**
* 获取是否开启权限认证
*
* @param state
*/
export
const
getEnablePermissionValid
=
(
state
:
any
)
=>
{
return
state
.
enablePermissionValid
;
}
\ No newline at end of file
app_web/src/store/modules/unified-resource/index.ts
0 → 100644
浏览文件 @
ed906d0a
import
{
resourcestate
}
from
'./state'
;
import
*
as
actions
from
'./actions'
;
import
*
as
mutations
from
'./mutations'
;
import
*
as
getters
from
'./getters'
;
const
state
=
{
...
resourcestate
}
export
default
{
namespaced
:
true
,
state
,
getters
,
actions
,
mutations
}
\ No newline at end of file
app_web/src/store/modules/unified-resource/mutations.ts
0 → 100644
浏览文件 @
ed906d0a
/**
* 设置统一资源数据
*
* @param state
* @param resourceArray
*/
export
const
setResourceData
=
(
state
:
any
,
resourceArray
:
Array
<
any
>
)
=>
{
if
(
resourceArray
&&
resourceArray
.
length
===
0
){
return
;
}
state
.
resourceData
=
resourceArray
;
}
/**
* 设置是否开启权限认证
*
* @param state
* @param resourceArray
*/
export
const
setEnablePermissionValid
=
(
state
:
any
,
enablepermissionvalid
:
boolean
)
=>
{
state
.
enablePermissionValid
=
enablepermissionvalid
;
}
app_web/src/store/modules/unified-resource/state.ts
0 → 100644
浏览文件 @
ed906d0a
/**
* 所有资源状态
*/
export
const
resourcestate
:
any
=
{
// 统一资源数据
resourceData
:
[],
// 是否开启权限认证
enablePermissionValid
:
false
}
\ No newline at end of file
app_web/src/styles/default.less
浏览文件 @
ed906d0a
...
...
@@ -206,6 +206,15 @@
padding-bottom: 16px;
}
}
.view-container.degridview, .view-container.degridview9, .view-container.dewfgridview{
>.view-card.view-no-caption{
>.ivu-card-body{
height: 100%;
}
}
}
/*** END:多数据视图属性布局 ***/
// 看板视图,卡片模式
...
...
app_web/src/utils/auth-guard/auth-guard.ts
浏览文件 @
ed906d0a
...
...
@@ -56,6 +56,8 @@ export class AuthGuard {
const
{
data
}:
{
data
:
any
}
=
response
;
if
(
data
)
{
router
.
app
.
$store
.
commit
(
'addAppData'
,
data
);
// 提交统一资源数据
router
.
app
.
$store
.
dispatch
(
'unifiedresource/commitResourceData'
,
data
);
}
}
resolve
(
true
);
...
...
app_web/src/widgets/app/ouindex-view-appmenu/ouindex-view-appmenu-base.vue
浏览文件 @
ed906d0a
...
...
@@ -449,7 +449,9 @@ export default class OUIndexViewBase extends Vue implements ControlInterface {
if
(
Object
.
keys
(
item
).
length
===
0
)
{
return
;
}
this
.
click
(
item
);
if
(
!
item
.
hidden
){
this
.
click
(
item
);
}
}
/**
...
...
@@ -633,11 +635,41 @@ export default class OUIndexViewBase extends Vue implements ControlInterface {
* @memberof OUIndexView
*/
public
load
(
data
:
any
)
{
this
.
handleMenusResource
(
this
.
menuMode
.
getAppMenuItems
());
}
/**
* 通过统一资源标识计算菜单
*
* @param {*} data
* @memberof OUIndexView
*/
public
handleMenusResource
(
inputMenus
:
Array
<
any
>
){
if
(
this
.
$store
.
getters
[
'unifiedresource/getEnablePermissionValid'
]){
this
.
computedEffectiveMenus
(
inputMenus
);
}
this
.
dataProcess
(
this
.
menuMode
.
getAppMenuItems
());
this
.
menus
=
this
.
menuMode
.
getAppMenuItems
();
this
.
doMenuSelect
();
}
/**
* 计算有效菜单项
*
* @param {*} data
* @memberof OUIndexView
*/
public
computedEffectiveMenus
(
inputMenus
:
Array
<
any
>
){
inputMenus
.
forEach
((
_item
:
any
)
=>
{
if
(
_item
.
resourcetag
&&
!
this
.
$store
.
getters
[
'unifiedresource/getResourceData'
](
_item
.
resourcetag
)){
_item
.
hidden
=
true
;
if
(
_item
.
items
&&
_item
.
items
.
length
>
0
)
{
this
.
computedEffectiveMenus
(
_item
.
items
);
}
}
})
}
/**
* 数据处理
*
...
...
app_web/src/widgets/app/ouindex-view-appmenu/ouindex-view-appmenu-model.ts
浏览文件 @
ed906d0a
...
...
@@ -26,7 +26,7 @@ export default class OUIndexViewModel {
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
iconcls
:
'
fa fa-university
'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto3'
,
...
...
@@ -44,7 +44,7 @@ export default class OUIndexViewModel {
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
iconcls
:
'
fa fa-sitemap
'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto2'
,
...
...
@@ -62,7 +62,7 @@ export default class OUIndexViewModel {
hidden
:
false
,
hidesidebar
:
false
,
opendefault
:
false
,
iconcls
:
''
,
iconcls
:
'
fa fa-user
'
,
icon
:
''
,
textcls
:
''
,
appfunctag
:
'Auto1'
,
...
...
config.xml
浏览文件 @
ed906d0a
...
...
@@ -37,11 +37,6 @@
git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
mvn clean package -Pweb
cd ibzou-app/ibzou-app-web
mvn -Pweb docker:build
mvn -Pweb docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-app-web.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzou-app/ibzou-app-web/src/main/docker/Dockerfile
浏览文件 @
ed906d0a
...
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
EXPOSE
30001
EXPOSE
8080
ADD
ibzou-app-web.jar /ibzou-app-web.jar
ibzou-app/ibzou-app-web/src/main/docker/ibzou-app-web.yaml
浏览文件 @
ed906d0a
...
...
@@ -3,11 +3,9 @@ services:
ibzou-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
ports
:
-
"
30001:30001
"
-
"
8080:8080
"
networks
:
-
agent_network
environment
:
SPRING_CLOUD_NACOS_DISCOVERY_IP
:
172.16.180.237
deploy
:
mode
:
replicated
replicas
:
1
...
...
ibzou-app/ibzou-app-web/src/main/resources/application-web-dev.yml
浏览文件 @
ed906d0a
server
:
port
:
30001
\ No newline at end of file
port
:
8080
\ No newline at end of file
ibzou-app/ibzou-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
ed906d0a
server
:
port
:
30001
port
:
8080
#zuul网关路由设置
zuul
:
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/IBZDepartmentMapper.java
浏览文件 @
ed906d0a
...
...
@@ -2,6 +2,7 @@ package cn.ibizlab.core.ou.mapper;
import
java.util.List
;
import
org.apache.ibatis.annotations.*
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -38,7 +39,7 @@ public interface IBZDepartmentMapper extends BaseMapper<IBZDepartment>{
* @return
*/
@Select
(
"${sql}"
)
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
);
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义更新SQL
...
...
@@ -46,7 +47,7 @@ public interface IBZDepartmentMapper extends BaseMapper<IBZDepartment>{
* @return
*/
@Update
(
"${sql}"
)
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义插入SQL
...
...
@@ -54,7 +55,7 @@ public interface IBZDepartmentMapper extends BaseMapper<IBZDepartment>{
* @return
*/
@Insert
(
"${sql}"
)
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义删除SQL
...
...
@@ -62,7 +63,7 @@ public interface IBZDepartmentMapper extends BaseMapper<IBZDepartment>{
* @return
*/
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
IBZDepartment
>
selectByParentdeptid
(
@Param
(
"deptid"
)
Serializable
deptid
)
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/IBZEmployeeMapper.java
浏览文件 @
ed906d0a
...
...
@@ -2,6 +2,7 @@ package cn.ibizlab.core.ou.mapper;
import
java.util.List
;
import
org.apache.ibatis.annotations.*
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -37,7 +38,7 @@ public interface IBZEmployeeMapper extends BaseMapper<IBZEmployee>{
* @return
*/
@Select
(
"${sql}"
)
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
);
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义更新SQL
...
...
@@ -45,7 +46,7 @@ public interface IBZEmployeeMapper extends BaseMapper<IBZEmployee>{
* @return
*/
@Update
(
"${sql}"
)
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义插入SQL
...
...
@@ -53,7 +54,7 @@ public interface IBZEmployeeMapper extends BaseMapper<IBZEmployee>{
* @return
*/
@Insert
(
"${sql}"
)
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义删除SQL
...
...
@@ -61,7 +62,7 @@ public interface IBZEmployeeMapper extends BaseMapper<IBZEmployee>{
* @return
*/
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
IBZEmployee
>
selectByMdeptid
(
@Param
(
"deptid"
)
Serializable
deptid
)
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/mapper/IBZOrganizationMapper.java
浏览文件 @
ed906d0a
...
...
@@ -2,6 +2,7 @@ package cn.ibizlab.core.ou.mapper;
import
java.util.List
;
import
org.apache.ibatis.annotations.*
;
import
java.util.Map
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -39,7 +40,7 @@ public interface IBZOrganizationMapper extends BaseMapper<IBZOrganization>{
* @return
*/
@Select
(
"${sql}"
)
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
);
List
<
JSONObject
>
selectBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义更新SQL
...
...
@@ -47,7 +48,7 @@ public interface IBZOrganizationMapper extends BaseMapper<IBZOrganization>{
* @return
*/
@Update
(
"${sql}"
)
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
updateBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义插入SQL
...
...
@@ -55,7 +56,7 @@ public interface IBZOrganizationMapper extends BaseMapper<IBZOrganization>{
* @return
*/
@Insert
(
"${sql}"
)
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
insertBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
/**
* 自定义删除SQL
...
...
@@ -63,7 +64,7 @@ public interface IBZOrganizationMapper extends BaseMapper<IBZOrganization>{
* @return
*/
@Delete
(
"${sql}"
)
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
);
boolean
deleteBySQL
(
@Param
(
"sql"
)
String
sql
,
@Param
(
"et"
)
Map
param
);
List
<
IBZOrganization
>
selectByParentorgid
(
@Param
(
"orgid"
)
Serializable
orgid
)
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZDepartmentService.java
浏览文件 @
ed906d0a
...
...
@@ -37,17 +37,24 @@ public interface IIBZDepartmentService extends IService<IBZDepartment>{
void
updateBatch
(
List
<
IBZDepartment
>
list
)
;
Page
<
IBZDepartment
>
searchCurDept
(
IBZDepartmentSearchContext
context
)
;
Page
<
IBZDepartment
>
searchDefault
(
IBZDepartmentSearchContext
context
)
;
List
<
IBZDepartment
>
selectByParentdeptid
(
String
deptid
)
;
void
removeByParentdeptid
(
String
deptid
)
;
List
<
IBZDepartment
>
selectByOrgid
(
String
orgid
)
;
void
removeByOrgid
(
String
orgid
)
;
List
<
JSONObject
>
select
(
String
sql
);
boolean
execute
(
String
sql
);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List
<
JSONObject
>
select
(
String
sql
,
Map
param
);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean
execute
(
String
sql
,
Map
param
);
}
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZEmployeeService.java
浏览文件 @
ed906d0a
...
...
@@ -37,17 +37,24 @@ public interface IIBZEmployeeService extends IService<IBZEmployee>{
IBZEmployee
get
(
String
key
)
;
IBZEmployee
getDraft
(
IBZEmployee
et
)
;
Page
<
IBZEmployee
>
searchDefault
(
IBZEmployeeSearchContext
context
)
;
List
<
IBZEmployee
>
selectByMdeptid
(
String
deptid
)
;
void
removeByMdeptid
(
String
deptid
)
;
List
<
IBZEmployee
>
selectByOrgid
(
String
orgid
)
;
void
removeByOrgid
(
String
orgid
)
;
List
<
JSONObject
>
select
(
String
sql
);
boolean
execute
(
String
sql
);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List
<
JSONObject
>
select
(
String
sql
,
Map
param
);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean
execute
(
String
sql
,
Map
param
);
}
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZOrganizationService.java
浏览文件 @
ed906d0a
...
...
@@ -38,14 +38,22 @@ public interface IIBZOrganizationService extends IService<IBZOrganization>{
Page
<
IBZOrganization
>
searchSelectSOrg
(
IBZOrganizationSearchContext
context
)
;
Page
<
IBZOrganization
>
searchSelectPOrg
(
IBZOrganizationSearchContext
context
)
;
Page
<
IBZOrganization
>
searchDefault
(
IBZOrganizationSearchContext
context
)
;
List
<
IBZOrganization
>
selectByParentorgid
(
String
orgid
)
;
void
removeByParentorgid
(
String
orgid
)
;
List
<
JSONObject
>
select
(
String
sql
);
boolean
execute
(
String
sql
);
/**
*自定义查询SQL
* @param sql select * from table where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return select * from table where id = '1'
*/
List
<
JSONObject
>
select
(
String
sql
,
Map
param
);
/**
*自定义SQL
* @param sql update table set name ='test' where id =#{et.param}
* @param param 参数列表 param.put("param","1");
* @return update table set name ='test' where id = '1'
*/
boolean
execute
(
String
sql
,
Map
param
);
}
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZDepartmentServiceImpl.java
浏览文件 @
ed906d0a
...
...
@@ -4,6 +4,7 @@ import java.io.Serializable;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Map
;
import
java.util.HashSet
;
import
java.util.HashMap
;
import
java.util.Collection
;
...
...
@@ -29,7 +30,6 @@ import cn.ibizlab.core.ou.service.IIBZDepartmentService;
import
cn.ibizlab.util.helper.CachedBeanCopier
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.core.ou.mapper.IBZDepartmentMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -50,11 +50,17 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
@Autowired
@Lazy
private
cn
.
ibizlab
.
core
.
ou
.
service
.
IIBZEmployeeService
ibzemployeeService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
core
.
ou
.
service
.
IIBZOrganizationService
ibzorganizationService
;
private
int
batchSize
=
500
;
@Override
@Transactional
public
boolean
create
(
IBZDepartment
et
)
{
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getDeptid
()),
et
);
...
...
@@ -129,6 +135,7 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
@Override
@Transactional
public
boolean
update
(
IBZDepartment
et
)
{
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"deptid"
,
et
.
getDeptid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getDeptid
()),
et
);
...
...
@@ -182,25 +189,52 @@ public class IBZDepartmentServiceImpl extends ServiceImpl<IBZDepartmentMapper, I
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private
void
fillParentData
(
IBZDepartment
et
){
//实体关系[DER1N_IBZDEPT_IBZDEPT_PDEPTID]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getParentdeptid
())){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZDepartment
parentdept
=
et
.
getParentdept
();
if
(
ObjectUtils
.
isEmpty
(
parentdept
)){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZDepartment
majorEntity
=
ibzdepartmentService
.
get
(
et
.
getParentdeptid
());
et
.
setParentdept
(
majorEntity
);
parentdept
=
majorEntity
;
}
et
.
setParentdeptname
(
parentdept
.
getDeptname
());
}
//实体关系[DER1N_IBZDEPT_IBZORG_ORGID]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getOrgid
())){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZOrganization
org
=
et
.
getOrg
();
if
(
ObjectUtils
.
isEmpty
(
org
)){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZOrganization
majorEntity
=
ibzorganizationService
.
get
(
et
.
getOrgid
());
et
.
setOrg
(
majorEntity
);
org
=
majorEntity
;
}
et
.
setOrgname
(
org
.
getOrgname
());
}
}
@Override
public
List
<
JSONObject
>
select
(
String
sql
){
return
this
.
baseMapper
.
selectBySQL
(
sql
);
public
List
<
JSONObject
>
select
(
String
sql
,
Map
param
){
return
this
.
baseMapper
.
selectBySQL
(
sql
,
param
);
}
@Override
@Transactional
public
boolean
execute
(
String
sql
){
public
boolean
execute
(
String
sql
,
Map
param
){
if
(
sql
==
null
||
sql
.
isEmpty
())
{
return
false
;
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"insert"
))
{
return
this
.
baseMapper
.
insertBySQL
(
sql
);
return
this
.
baseMapper
.
insertBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"update"
))
{
return
this
.
baseMapper
.
updateBySQL
(
sql
);
return
this
.
baseMapper
.
updateBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"delete"
))
{
return
this
.
baseMapper
.
deleteBySQL
(
sql
);
return
this
.
baseMapper
.
deleteBySQL
(
sql
,
param
);
}
log
.
warn
(
"暂未支持的SQL语法"
);
return
true
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZEmployeeServiceImpl.java
浏览文件 @
ed906d0a
...
...
@@ -4,6 +4,7 @@ import java.io.Serializable;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Map
;
import
java.util.HashSet
;
import
java.util.HashMap
;
import
java.util.Collection
;
...
...
@@ -29,7 +30,6 @@ import cn.ibizlab.core.ou.service.IIBZEmployeeService;
import
cn.ibizlab.util.helper.CachedBeanCopier
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.core.ou.mapper.IBZEmployeeMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -44,6 +44,14 @@ import org.springframework.util.StringUtils;
@Service
(
"IBZEmployeeServiceImpl"
)
public
class
IBZEmployeeServiceImpl
extends
ServiceImpl
<
IBZEmployeeMapper
,
IBZEmployee
>
implements
IIBZEmployeeService
{
@Autowired
@Lazy
private
cn
.
ibizlab
.
core
.
ou
.
service
.
IIBZDepartmentService
ibzdepartmentService
;
@Autowired
@Lazy
private
cn
.
ibizlab
.
core
.
ou
.
service
.
IIBZOrganizationService
ibzorganizationService
;
private
int
batchSize
=
500
;
@Override
...
...
@@ -68,6 +76,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override
@Transactional
public
boolean
create
(
IBZEmployee
et
)
{
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getUserid
()),
et
);
...
...
@@ -87,6 +96,7 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
@Override
@Transactional
public
boolean
update
(
IBZEmployee
et
)
{
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"userid"
,
et
.
getUserid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getUserid
()),
et
);
...
...
@@ -174,25 +184,54 @@ public class IBZEmployeeServiceImpl extends ServiceImpl<IBZEmployeeMapper, IBZEm
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private
void
fillParentData
(
IBZEmployee
et
){
//实体关系[DER1N_IBZEMP_IBZDEPT_MDEPTID]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getMdeptid
())){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZDepartment
maindept
=
et
.
getMaindept
();
if
(
ObjectUtils
.
isEmpty
(
maindept
)){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZDepartment
majorEntity
=
ibzdepartmentService
.
get
(
et
.
getMdeptid
());
et
.
setMaindept
(
majorEntity
);
maindept
=
majorEntity
;
}
et
.
setMdeptcode
(
maindept
.
getDeptcode
());
et
.
setMdeptname
(
maindept
.
getDeptname
());
}
//实体关系[DER1N_IBZEMP_IBZORG_ORGID]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getOrgid
())){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZOrganization
org
=
et
.
getOrg
();
if
(
ObjectUtils
.
isEmpty
(
org
)){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZOrganization
majorEntity
=
ibzorganizationService
.
get
(
et
.
getOrgid
());
et
.
setOrg
(
majorEntity
);
org
=
majorEntity
;
}
et
.
setOrgcode
(
org
.
getOrgcode
());
et
.
setOrgname
(
org
.
getOrgname
());
}
}
@Override
public
List
<
JSONObject
>
select
(
String
sql
){
return
this
.
baseMapper
.
selectBySQL
(
sql
);
public
List
<
JSONObject
>
select
(
String
sql
,
Map
param
){
return
this
.
baseMapper
.
selectBySQL
(
sql
,
param
);
}
@Override
@Transactional
public
boolean
execute
(
String
sql
){
public
boolean
execute
(
String
sql
,
Map
param
){
if
(
sql
==
null
||
sql
.
isEmpty
())
{
return
false
;
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"insert"
))
{
return
this
.
baseMapper
.
insertBySQL
(
sql
);
return
this
.
baseMapper
.
insertBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"update"
))
{
return
this
.
baseMapper
.
updateBySQL
(
sql
);
return
this
.
baseMapper
.
updateBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"delete"
))
{
return
this
.
baseMapper
.
deleteBySQL
(
sql
);
return
this
.
baseMapper
.
deleteBySQL
(
sql
,
param
);
}
log
.
warn
(
"暂未支持的SQL语法"
);
return
true
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZOrganizationServiceImpl.java
浏览文件 @
ed906d0a
...
...
@@ -4,6 +4,7 @@ import java.io.Serializable;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Set
;
import
java.util.Map
;
import
java.util.HashSet
;
import
java.util.HashMap
;
import
java.util.Collection
;
...
...
@@ -29,7 +30,6 @@ import cn.ibizlab.core.ou.service.IIBZOrganizationService;
import
cn.ibizlab.util.helper.CachedBeanCopier
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
cn.ibizlab.core.ou.mapper.IBZOrganizationMapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -53,6 +53,8 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Autowired
@Lazy
private
cn
.
ibizlab
.
core
.
ou
.
service
.
IIBZOrganizationService
ibzorganizationService
;
private
int
batchSize
=
500
;
@Override
...
...
@@ -63,6 +65,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Override
@Transactional
public
boolean
update
(
IBZOrganization
et
)
{
fillParentData
(
et
);
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"orgid"
,
et
.
getOrgid
())))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getOrgid
()),
et
);
...
...
@@ -77,6 +80,7 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
@Override
@Transactional
public
boolean
create
(
IBZOrganization
et
)
{
fillParentData
(
et
);
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getOrgid
()),
et
);
...
...
@@ -184,25 +188,42 @@ public class IBZOrganizationServiceImpl extends ServiceImpl<IBZOrganizationMappe
/**
* 为当前实体填充父数据(外键值文本、外键值附加数据)
* @param et
*/
private
void
fillParentData
(
IBZOrganization
et
){
//实体关系[DER1N_IBZORG_IBZORG_PORGID]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getParentorgid
())){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZOrganization
parentorg
=
et
.
getParentorg
();
if
(
ObjectUtils
.
isEmpty
(
parentorg
)){
cn
.
ibizlab
.
core
.
ou
.
domain
.
IBZOrganization
majorEntity
=
ibzorganizationService
.
get
(
et
.
getParentorgid
());
et
.
setParentorg
(
majorEntity
);
parentorg
=
majorEntity
;
}
et
.
setParentorgname
(
parentorg
.
getOrgname
());
}
}
@Override
public
List
<
JSONObject
>
select
(
String
sql
){
return
this
.
baseMapper
.
selectBySQL
(
sql
);
public
List
<
JSONObject
>
select
(
String
sql
,
Map
param
){
return
this
.
baseMapper
.
selectBySQL
(
sql
,
param
);
}
@Override
@Transactional
public
boolean
execute
(
String
sql
){
public
boolean
execute
(
String
sql
,
Map
param
){
if
(
sql
==
null
||
sql
.
isEmpty
())
{
return
false
;
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"insert"
))
{
return
this
.
baseMapper
.
insertBySQL
(
sql
);
return
this
.
baseMapper
.
insertBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"update"
))
{
return
this
.
baseMapper
.
updateBySQL
(
sql
);
return
this
.
baseMapper
.
updateBySQL
(
sql
,
param
);
}
if
(
sql
.
toLowerCase
().
trim
().
startsWith
(
"delete"
))
{
return
this
.
baseMapper
.
deleteBySQL
(
sql
);
return
this
.
baseMapper
.
deleteBySQL
(
sql
,
param
);
}
log
.
warn
(
"暂未支持的SQL语法"
);
return
true
;
...
...
ibzou-util/src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
浏览文件 @
ed906d0a
...
...
@@ -21,7 +21,7 @@ import java.io.IOException;
/**
* 权限:向uaa同步当前系统菜单、权限资源任务类
*/
@Component
//开启此类需要保证Main中开启了feign :EnableFeignClients
//
@Component //开启此类需要保证Main中开启了feign :EnableFeignClients
public
class
PermissionSyncJob
implements
ApplicationRunner
{
private
Log
log
=
LogFactory
.
getLog
(
PermissionSyncJob
.
class
);
...
...
@@ -32,7 +32,7 @@ public class PermissionSyncJob implements ApplicationRunner {
@Value
(
"${ibiz.enablePermissionValid:false}"
)
boolean
enablePermissionValid
;
//是否开启权限校验
@Value
(
"${ibiz.systemid:
110B1A3E-4944-47C8-B4C4-EC15FB8982F3
}"
)
@Value
(
"${ibiz.systemid:
2C40DFCD-0DF5-47BF-91A5-C45F810B0001
}"
)
private
String
systemId
;
@Override
...
...
ibzou-util/src/main/resources/application-sys.yml
浏览文件 @
ed906d0a
...
...
@@ -80,7 +80,7 @@ ribbon:
#系统是否开启权限验证、是否开启缓存
#缓存模式:关闭缓存(无配置项)、本地缓存(enableCaffeineCache=true-默认)、caffeine+redis两级缓存(enableRedisCache=true)
ibiz
:
enablePermissionValid
:
fals
e
enablePermissionValid
:
tru
e
enableCaffeineCache
:
true
#enableRedisCache: true
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录