Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-auth
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-auth
Commits
72f05639
Commit
72f05639
authored
Nov 12, 2019
by
guojuxing
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
f914557b
3a598654
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
5 deletions
+31
-5
UnionEnterpriseApiService.java
.../java/com/gic/auth/service/UnionEnterpriseApiService.java
+1
-1
TabSysUnionEnterpriseResourceMapper.java
.../auth/dao/mapper/TabSysUnionEnterpriseResourceMapper.java
+3
-0
UnionEnterpriseResourceService.java
.../com/gic/auth/service/UnionEnterpriseResourceService.java
+2
-0
UnionEnterrpiseResourceServiceImpl.java
...auth/service/impl/UnionEnterrpiseResourceServiceImpl.java
+9
-0
UnionEnterpriseApiServiceImpl.java
...uth/service/outer/impl/UnionEnterpriseApiServiceImpl.java
+5
-1
TabSysUnionEnterpriseResourceMapper.xml
.../resources/mapper/TabSysUnionEnterpriseResourceMapper.xml
+9
-2
UnionEnterpriseController.java
...om/gic/auth/web/controller/UnionEnterpriseController.java
+2
-1
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/service/UnionEnterpriseApiService.java
View file @
72f05639
...
...
@@ -14,7 +14,7 @@ public interface UnionEnterpriseApiService {
ServiceResponse
<
Integer
>
delUnionEnterprise
(
Integer
unionId
,
Integer
enterpriseId
);
ServiceResponse
<
Integer
>
delUnionEnterpriseSource
(
Long
resourceId
);
ServiceResponse
<
Integer
>
delUnionEnterpriseSource
(
Long
resourceId
,
Integer
enterpriseId
);
ServiceResponse
<
UnionEnterpriseDTO
>
getUnionEnterpriseById
(
Integer
unionId
);
...
...
gic-platform-auth-service/src/main/java/com/gic/auth/dao/mapper/TabSysUnionEnterpriseResourceMapper.java
View file @
72f05639
...
...
@@ -74,4 +74,6 @@ public interface TabSysUnionEnterpriseResourceMapper {
int
delResourceByResourceId
(
Long
resourceId
);
List
<
String
>
getKeyByResourceId
(
@Param
(
"resourceId"
)
Long
resourceId
);
List
<
Integer
>
getUnionEnterpriseIdByResouce
(
@Param
(
"resourceId"
)
Long
resourceId
);
}
\ No newline at end of file
gic-platform-auth-service/src/main/java/com/gic/auth/service/UnionEnterpriseResourceService.java
View file @
72f05639
...
...
@@ -23,4 +23,6 @@ public interface UnionEnterpriseResourceService {
List
<
TabSysUnionEnterpriseResource
>
listResourceByUnionId
(
Integer
unionId
);
String
getKeyByResourceId
(
Long
resourceId
);
Integer
getUnionEnterpriseIdByResouce
(
Long
resourceId
);
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/impl/UnionEnterrpiseResourceServiceImpl.java
View file @
72f05639
...
...
@@ -83,4 +83,13 @@ public class UnionEnterrpiseResourceServiceImpl implements UnionEnterpriseResour
}
return
null
;
}
@Override
public
Integer
getUnionEnterpriseIdByResouce
(
Long
resourceId
)
{
List
<
Integer
>
list
=
this
.
tabSysUnionEnterpriseResourceMapper
.
getUnionEnterpriseIdByResouce
(
resourceId
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
return
list
.
get
(
0
);
}
return
0
;
}
}
gic-platform-auth-service/src/main/java/com/gic/auth/service/outer/impl/UnionEnterpriseApiServiceImpl.java
View file @
72f05639
...
...
@@ -74,8 +74,12 @@ public class UnionEnterpriseApiServiceImpl implements UnionEnterpriseApiService
}
@Override
public
ServiceResponse
<
Integer
>
delUnionEnterpriseSource
(
Long
resourceId
)
{
public
ServiceResponse
<
Integer
>
delUnionEnterpriseSource
(
Long
resourceId
,
Integer
enterpriseId
)
{
int
i
=
this
.
unionEnterpriseResourceService
.
delResource
(
resourceId
);
if
(
i
>
0
){
Integer
unionEnterpriseId
=
this
.
unionEnterpriseResourceService
.
getUnionEnterpriseIdByResouce
(
resourceId
);
this
.
storeAuthorizationApiService
.
cancelStoreAll
(
enterpriseId
,
unionEnterpriseId
);
}
return
ServiceResponse
.
success
(
i
);
}
...
...
gic-platform-auth-service/src/main/resources/mapper/TabSysUnionEnterpriseResourceMapper.xml
View file @
72f05639
...
...
@@ -179,7 +179,7 @@
</update>
<update
id=
"updateAuthorizationStatus"
>
update tab_sys_union_enterprise_resource
set authorization_status=#{authOrizationStatus},authorization_time=now(),authorization_message=#{authOrizationMessage}, key=#{key}
set authorization_status=#{authOrizationStatus},authorization_time=now(),authorization_message=#{authOrizationMessage},
auth_
key=#{key}
where enterprise_id= #{enterpriseId} and resource_type=#{resourceType} and status = 1
</update>
<select
id=
"listResourceByEnterpriseIdAndType"
resultType=
"com.gic.auth.dto.UnionEnterpriseResourceDTO"
>
...
...
@@ -205,9 +205,15 @@
</update>
<select
id=
"getKeyByResourceId"
resultMap=
"BaseResultMap"
>
select
key
auth_
key
from tab_sys_union_enterprise_resource
where resource=#{resourceId}
and status = 1
</select>
<select
id=
"getUnionEnterpriseIdByResouce"
resultMap=
"BaseResultMap"
>
select
union_enterprise_id
from tab_sys_union_enterprise_resource t1, tab_sys_union_enterprise t2 where t1.union_id= t2.union_id
and t1.resource=#{resourceId}
</select>
</mapper>
\ No newline at end of file
gic-platform-auth-web/src/main/java/com/gic/auth/web/controller/UnionEnterpriseController.java
View file @
72f05639
...
...
@@ -120,7 +120,8 @@ public class UnionEnterpriseController {
if
(
resourceId
==
null
){
return
EnterpriseRestResponse
.
failure
(
ErrorCode
.
MISS_PARAMETER
);
}
ServiceResponse
<
Integer
>
response
=
this
.
unionEnterpriseApiService
.
delUnionEnterpriseSource
(
resourceId
);
Integer
enterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
ServiceResponse
<
Integer
>
response
=
this
.
unionEnterpriseApiService
.
delUnionEnterpriseSource
(
resourceId
,
enterpriseId
);
if
(
response
.
getResult
()>
0
){
ResourceTypeEnum
[]
values
=
ResourceTypeEnum
.
values
();
for
(
ResourceTypeEnum
typeEnum
:
values
){
...
...
Write
Preview
Markdown
is supported
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