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
ef7bd564
Commit
ef7bd564
authored
Nov 12, 2019
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联合商户取消授权
parent
c8d0116c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
4 deletions
+30
-4
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
+7
-0
UnionEnterpriseController.java
...om/gic/auth/web/controller/UnionEnterpriseController.java
+3
-2
No files found.
gic-platform-auth-api/src/main/java/com/gic/auth/service/UnionEnterpriseApiService.java
View file @
ef7bd564
...
...
@@ -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 @
ef7bd564
...
...
@@ -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 @
ef7bd564
...
...
@@ -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 @
ef7bd564
...
...
@@ -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 @
ef7bd564
...
...
@@ -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 @
ef7bd564
...
...
@@ -210,4 +210,10 @@
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 @
ef7bd564
...
...
@@ -116,11 +116,12 @@ public class UnionEnterpriseController {
}
@RequestMapping
(
"del-union-enterprise-resource"
)
public
RestResponse
delUnionEnterprise
(
Long
resourceId
,
Integer
resourceType
){
public
RestResponse
delUnionEnterprise
(
Long
resourceId
,
Integer
resourceType
,
Integer
unionEnterpriseId
){
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
(,
);
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