Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
908ede4b
提交
908ede4b
编写于
8月 30, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong@lab.ibiz5.com 部署微服务接口
上级
ea9d02db
变更
25
展开全部
显示空白字符变更
内嵌
并排
正在显示
25 个修改的文件
包含
35 行增加
和
80 行删除
+35
-80
config.xml
config.xml
+5
-0
IIBZDepartmentService.java
...ava/cn/ibizlab/core/ou/service/IIBZDepartmentService.java
+1
-0
IIBZDeptMemberService.java
...ava/cn/ibizlab/core/ou/service/IIBZDeptMemberService.java
+1
-0
IIBZEmployeeService.java
.../java/cn/ibizlab/core/ou/service/IIBZEmployeeService.java
+1
-0
IIBZOrganizationService.java
...a/cn/ibizlab/core/ou/service/IIBZOrganizationService.java
+1
-0
IIBZPostService.java
...main/java/cn/ibizlab/core/ou/service/IIBZPostService.java
+1
-0
IIBZTeamMemberService.java
...ava/cn/ibizlab/core/ou/service/IIBZTeamMemberService.java
+1
-0
IIBZTeamService.java
...main/java/cn/ibizlab/core/ou/service/IIBZTeamService.java
+1
-0
IBZDepartmentServiceImpl.java
...bizlab/core/ou/service/impl/IBZDepartmentServiceImpl.java
+1
-0
IBZDeptMemberServiceImpl.java
...bizlab/core/ou/service/impl/IBZDeptMemberServiceImpl.java
+1
-0
IBZEmployeeServiceImpl.java
.../ibizlab/core/ou/service/impl/IBZEmployeeServiceImpl.java
+1
-0
IBZOrganizationServiceImpl.java
...zlab/core/ou/service/impl/IBZOrganizationServiceImpl.java
+1
-0
IBZPostServiceImpl.java
...a/cn/ibizlab/core/ou/service/impl/IBZPostServiceImpl.java
+1
-0
IBZTeamMemberServiceImpl.java
...bizlab/core/ou/service/impl/IBZTeamMemberServiceImpl.java
+1
-0
IBZTeamServiceImpl.java
...a/cn/ibizlab/core/ou/service/impl/IBZTeamServiceImpl.java
+1
-0
Dockerfile
ibzou-provider/ibzou-provider-api/src/main/docker/Dockerfile
+1
-1
ibzou-provider-api.yaml
...bzou-provider-api/src/main/docker/ibzou-provider-api.yaml
+14
-1
IBZDepartmentResource.java
.../main/java/cn/ibizlab/api/rest/IBZDepartmentResource.java
+0
-7
IBZDeptMemberResource.java
.../main/java/cn/ibizlab/api/rest/IBZDeptMemberResource.java
+0
-22
IBZEmployeeResource.java
...rc/main/java/cn/ibizlab/api/rest/IBZEmployeeResource.java
+0
-17
IBZOrganizationResource.java
...ain/java/cn/ibizlab/api/rest/IBZOrganizationResource.java
+0
-4
IBZPostResource.java
...pi/src/main/java/cn/ibizlab/api/rest/IBZPostResource.java
+0
-4
IBZTeamMemberResource.java
.../main/java/cn/ibizlab/api/rest/IBZTeamMemberResource.java
+0
-19
IBZTeamResource.java
...pi/src/main/java/cn/ibizlab/api/rest/IBZTeamResource.java
+0
-4
AuthorizationTokenFilter.java
...va/cn/ibizlab/util/security/AuthorizationTokenFilter.java
+1
-1
未找到文件。
config.xml
浏览文件 @
908ede4b
...
...
@@ -37,6 +37,11 @@
git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
mvn clean package -Papi
cd ibzou-provider/ibzou-provider-api
mvn -Papi docker:build
mvn -Papi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZDepartmentService.java
浏览文件 @
908ede4b
...
...
@@ -11,6 +11,7 @@ import java.math.BigInteger;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZDeptMemberService.java
浏览文件 @
908ede4b
...
...
@@ -11,6 +11,7 @@ import java.math.BigInteger;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZEmployeeService.java
浏览文件 @
908ede4b
...
...
@@ -11,6 +11,7 @@ import java.math.BigInteger;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZOrganizationService.java
浏览文件 @
908ede4b
...
...
@@ -11,6 +11,7 @@ import java.math.BigInteger;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZPostService.java
浏览文件 @
908ede4b
...
...
@@ -11,6 +11,7 @@ import java.math.BigInteger;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZTeamMemberService.java
浏览文件 @
908ede4b
...
...
@@ -11,6 +11,7 @@ import java.math.BigInteger;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/IIBZTeamService.java
浏览文件 @
908ede4b
...
...
@@ -11,6 +11,7 @@ import java.math.BigInteger;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.scheduling.annotation.Async
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.cache.annotation.CacheEvict
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZDepartmentServiceImpl.java
浏览文件 @
908ede4b
...
...
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.core.ou.domain.IBZDepartment
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZDeptMemberServiceImpl.java
浏览文件 @
908ede4b
...
...
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.core.ou.domain.IBZDeptMember
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZEmployeeServiceImpl.java
浏览文件 @
908ede4b
...
...
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.core.ou.domain.IBZEmployee
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZOrganizationServiceImpl.java
浏览文件 @
908ede4b
...
...
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.core.ou.domain.IBZOrganization
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZPostServiceImpl.java
浏览文件 @
908ede4b
...
...
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.core.ou.domain.IBZPost
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZTeamMemberServiceImpl.java
浏览文件 @
908ede4b
...
...
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.core.ou.domain.IBZTeamMember
;
...
...
ibzou-core/src/main/java/cn/ibizlab/core/ou/service/impl/IBZTeamServiceImpl.java
浏览文件 @
908ede4b
...
...
@@ -21,6 +21,7 @@ import org.springframework.data.domain.Page;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.context.annotation.Lazy
;
import
cn.ibizlab.core.ou.domain.IBZTeam
;
...
...
ibzou-provider/ibzou-provider-api/src/main/docker/Dockerfile
浏览文件 @
908ede4b
...
...
@@ -12,6 +12,6 @@ CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
sleep ${IBIZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar
EXPOSE
808
1
EXPOSE
4000
1
ADD
ibzou-provider-api.jar /ibzou-provider-api.jar
ibzou-provider/ibzou-provider-api/src/main/docker/ibzou-provider-api.yaml
浏览文件 @
908ede4b
...
...
@@ -3,9 +3,22 @@ services:
ibzou-provider-api
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports
:
-
"
8081:808
1"
-
"
40001:4000
1"
networks
:
-
agent_network
environment
:
-
SPRING_CLOUD_NACOS_DISCOVERY_IP=172.16.180.237
-
SERVER_PORT=40001
-
SPRING_CLOUD_NACOS_DISCOVERY_SERVER-ADDR=172.16.102.211:8848
-
SPRING_REDIS_HOST=172.16.100.243
-
SPRING_REDIS_PORT=6379
-
SPRING_REDIS_DATABASE=0
-
SPRING_DATASOURCE_USERNAME=a_A_5d9d78509
-
SPRING_DATASOURCE_PASSWORD=@6dEfb3@
-
SPRING_DATASOURCE_URL=jdbc:mysql://172.16.180.232:3306/a_A_5d9d78509?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true&allowMultiQueries=true
-
SPRING_DATASOURCE_DRIVER-CLASS-NAME=com.mysql.jdbc.Driver
-
SPRING_DATASOURCE_DEFAULTSCHEMA=a_A_5d9d78509
-
NACOS=172.16.102.211:8848
deploy
:
resources
:
limits
:
...
...
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/IBZDepartmentResource.java
浏览文件 @
908ede4b
...
...
@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import
javax.servlet.ServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -50,7 +49,6 @@ public class IBZDepartmentResource {
@PreAuthorize
(
"hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Create')"
)
@ApiOperation
(
value
=
"新建部门"
,
tags
=
{
"部门"
},
notes
=
"新建部门"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzdepartments"
)
@Transactional
public
ResponseEntity
<
IBZDepartmentDTO
>
create
(
@RequestBody
IBZDepartmentDTO
ibzdepartmentdto
)
{
IBZDepartment
domain
=
ibzdepartmentMapping
.
toDomain
(
ibzdepartmentdto
);
ibzdepartmentService
.
create
(
domain
);
...
...
@@ -70,7 +68,6 @@ public class IBZDepartmentResource {
@PreAuthorize
(
"hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Update')"
)
@ApiOperation
(
value
=
"更新部门"
,
tags
=
{
"部门"
},
notes
=
"更新部门"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzdepartments/{ibzdepartment_id}"
)
@Transactional
public
ResponseEntity
<
IBZDepartmentDTO
>
update
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@RequestBody
IBZDepartmentDTO
ibzdepartmentdto
)
{
IBZDepartment
domain
=
ibzdepartmentMapping
.
toDomain
(
ibzdepartmentdto
);
domain
.
setDeptid
(
ibzdepartment_id
);
...
...
@@ -90,7 +87,6 @@ public class IBZDepartmentResource {
@PreAuthorize
(
"hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Remove')"
)
@ApiOperation
(
value
=
"删除部门"
,
tags
=
{
"部门"
},
notes
=
"删除部门"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzdepartments/{ibzdepartment_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdepartmentService
.
remove
(
ibzdepartment_id
));
}
...
...
@@ -163,7 +159,6 @@ public class IBZDepartmentResource {
@PreAuthorize
(
"hasPermission(this.ibzdepartmentMapping.toDomain(#ibzdepartmentdto),'ibzou-IBZDepartment-Create')"
)
@ApiOperation
(
value
=
"根据单位机构建立部门"
,
tags
=
{
"部门"
},
notes
=
"根据单位机构建立部门"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments"
)
@Transactional
public
ResponseEntity
<
IBZDepartmentDTO
>
createByIBZOrganization
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@RequestBody
IBZDepartmentDTO
ibzdepartmentdto
)
{
IBZDepartment
domain
=
ibzdepartmentMapping
.
toDomain
(
ibzdepartmentdto
);
domain
.
setOrgid
(
ibzorganization_id
);
...
...
@@ -188,7 +183,6 @@ public class IBZDepartmentResource {
@PreAuthorize
(
"hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Update')"
)
@ApiOperation
(
value
=
"根据单位机构更新部门"
,
tags
=
{
"部门"
},
notes
=
"根据单位机构更新部门"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}"
)
@Transactional
public
ResponseEntity
<
IBZDepartmentDTO
>
updateByIBZOrganization
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
,
@RequestBody
IBZDepartmentDTO
ibzdepartmentdto
)
{
IBZDepartment
domain
=
ibzdepartmentMapping
.
toDomain
(
ibzdepartmentdto
);
domain
.
setOrgid
(
ibzorganization_id
);
...
...
@@ -213,7 +207,6 @@ public class IBZDepartmentResource {
@PreAuthorize
(
"hasPermission(this.ibzdepartmentService.get(#ibzdepartment_id),'ibzou-IBZDepartment-Remove')"
)
@ApiOperation
(
value
=
"根据单位机构删除部门"
,
tags
=
{
"部门"
},
notes
=
"根据单位机构删除部门"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzorganizations/{ibzorganization_id}/ibzdepartments/{ibzdepartment_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
removeByIBZOrganization
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@PathVariable
(
"ibzdepartment_id"
)
String
ibzdepartment_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzdepartmentService
.
remove
(
ibzdepartment_id
));
}
...
...
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/IBZDeptMemberResource.java
浏览文件 @
908ede4b
此差异已折叠。
点击以展开。
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/IBZEmployeeResource.java
浏览文件 @
908ede4b
此差异已折叠。
点击以展开。
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/IBZOrganizationResource.java
浏览文件 @
908ede4b
...
...
@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import
javax.servlet.ServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -50,7 +49,6 @@ public class IBZOrganizationResource {
@PreAuthorize
(
"hasPermission(this.ibzorganizationMapping.toDomain(#ibzorganizationdto),'ibzou-IBZOrganization-Create')"
)
@ApiOperation
(
value
=
"新建单位机构"
,
tags
=
{
"单位机构"
},
notes
=
"新建单位机构"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzorganizations"
)
@Transactional
public
ResponseEntity
<
IBZOrganizationDTO
>
create
(
@RequestBody
IBZOrganizationDTO
ibzorganizationdto
)
{
IBZOrganization
domain
=
ibzorganizationMapping
.
toDomain
(
ibzorganizationdto
);
ibzorganizationService
.
create
(
domain
);
...
...
@@ -70,7 +68,6 @@ public class IBZOrganizationResource {
@PreAuthorize
(
"hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzou-IBZOrganization-Update')"
)
@ApiOperation
(
value
=
"更新单位机构"
,
tags
=
{
"单位机构"
},
notes
=
"更新单位机构"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzorganizations/{ibzorganization_id}"
)
@Transactional
public
ResponseEntity
<
IBZOrganizationDTO
>
update
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
,
@RequestBody
IBZOrganizationDTO
ibzorganizationdto
)
{
IBZOrganization
domain
=
ibzorganizationMapping
.
toDomain
(
ibzorganizationdto
);
domain
.
setOrgid
(
ibzorganization_id
);
...
...
@@ -90,7 +87,6 @@ public class IBZOrganizationResource {
@PreAuthorize
(
"hasPermission(this.ibzorganizationService.get(#ibzorganization_id),'ibzou-IBZOrganization-Remove')"
)
@ApiOperation
(
value
=
"删除单位机构"
,
tags
=
{
"单位机构"
},
notes
=
"删除单位机构"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzorganizations/{ibzorganization_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibzorganization_id"
)
String
ibzorganization_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzorganizationService
.
remove
(
ibzorganization_id
));
}
...
...
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/IBZPostResource.java
浏览文件 @
908ede4b
...
...
@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import
javax.servlet.ServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -50,7 +49,6 @@ public class IBZPostResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZPost-Create-all')"
)
@ApiOperation
(
value
=
"新建岗位"
,
tags
=
{
"岗位"
},
notes
=
"新建岗位"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzposts"
)
@Transactional
public
ResponseEntity
<
IBZPostDTO
>
create
(
@RequestBody
IBZPostDTO
ibzpostdto
)
{
IBZPost
domain
=
ibzpostMapping
.
toDomain
(
ibzpostdto
);
ibzpostService
.
create
(
domain
);
...
...
@@ -69,7 +67,6 @@ public class IBZPostResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZPost-Update-all')"
)
@ApiOperation
(
value
=
"更新岗位"
,
tags
=
{
"岗位"
},
notes
=
"更新岗位"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzposts/{ibzpost_id}"
)
@Transactional
public
ResponseEntity
<
IBZPostDTO
>
update
(
@PathVariable
(
"ibzpost_id"
)
String
ibzpost_id
,
@RequestBody
IBZPostDTO
ibzpostdto
)
{
IBZPost
domain
=
ibzpostMapping
.
toDomain
(
ibzpostdto
);
domain
.
setPostid
(
ibzpost_id
);
...
...
@@ -89,7 +86,6 @@ public class IBZPostResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZPost-Remove-all')"
)
@ApiOperation
(
value
=
"删除岗位"
,
tags
=
{
"岗位"
},
notes
=
"删除岗位"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzposts/{ibzpost_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibzpost_id"
)
String
ibzpost_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzpostService
.
remove
(
ibzpost_id
));
}
...
...
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/IBZTeamMemberResource.java
浏览文件 @
908ede4b
此差异已折叠。
点击以展开。
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/api/rest/IBZTeamResource.java
浏览文件 @
908ede4b
...
...
@@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject;
import
javax.servlet.ServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cglib.beans.BeanCopier
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -50,7 +49,6 @@ public class IBZTeamResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeam-Create-all')"
)
@ApiOperation
(
value
=
"新建组"
,
tags
=
{
"组"
},
notes
=
"新建组"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ibzteams"
)
@Transactional
public
ResponseEntity
<
IBZTeamDTO
>
create
(
@RequestBody
IBZTeamDTO
ibzteamdto
)
{
IBZTeam
domain
=
ibzteamMapping
.
toDomain
(
ibzteamdto
);
ibzteamService
.
create
(
domain
);
...
...
@@ -69,7 +67,6 @@ public class IBZTeamResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeam-Update-all')"
)
@ApiOperation
(
value
=
"更新组"
,
tags
=
{
"组"
},
notes
=
"更新组"
)
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/ibzteams/{ibzteam_id}"
)
@Transactional
public
ResponseEntity
<
IBZTeamDTO
>
update
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
,
@RequestBody
IBZTeamDTO
ibzteamdto
)
{
IBZTeam
domain
=
ibzteamMapping
.
toDomain
(
ibzteamdto
);
domain
.
setTeamid
(
ibzteam_id
);
...
...
@@ -89,7 +86,6 @@ public class IBZTeamResource {
@PreAuthorize
(
"hasAnyAuthority('ROLE_SUPERADMIN','ibzou-IBZTeam-Remove-all')"
)
@ApiOperation
(
value
=
"删除组"
,
tags
=
{
"组"
},
notes
=
"删除组"
)
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
value
=
"/ibzteams/{ibzteam_id}"
)
@Transactional
public
ResponseEntity
<
Boolean
>
remove
(
@PathVariable
(
"ibzteam_id"
)
String
ibzteam_id
)
{
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
ibzteamService
.
remove
(
ibzteam_id
));
}
...
...
ibzou-util/src/main/java/cn/ibizlab/util/security/AuthorizationTokenFilter.java
浏览文件 @
908ede4b
...
...
@@ -60,7 +60,7 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
if
(
authTokenUtil
.
validateToken
(
authToken
,
userDetails
))
{
UsernamePasswordAuthenticationToken
authentication
=
new
UsernamePasswordAuthenticationToken
(
userDetails
,
null
,
userDetails
.
getAuthorities
());
authentication
.
setDetails
(
new
WebAuthenticationDetailsSource
().
buildDetails
(
request
));
log
.
info
(
"authorizated user '{}', setting security context"
,
username
);
//
log.info("authorizated user '{}', setting security context", username);
SecurityContextHolder
.
getContext
().
setAuthentication
(
authentication
);
}
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录