Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
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-enterprise
Commits
930b6bdb
Commit
930b6bdb
authored
Feb 09, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除策略接口
parent
d4d693a2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
74 additions
and
9 deletions
+74
-9
UnionEnterpriseAuthApiService.java
...gic/enterprise/service/UnionEnterpriseAuthApiService.java
+15
-0
TabSysUnionEnterpriseAuthAppMapper.java
...rprise/dao/mapper/TabSysUnionEnterpriseAuthAppMapper.java
+9
-0
UnionEnterpriseAuthAppService.java
...gic/enterprise/service/UnionEnterpriseAuthAppService.java
+7
-0
UnionEnterpriseAuthAppServiceImpl.java
...prise/service/impl/UnionEnterpriseAuthAppServiceImpl.java
+5
-0
UnionEnterpriseAuthApiServiceImpl.java
...e/outer/impl/union/UnionEnterpriseAuthApiServiceImpl.java
+11
-0
TabSysUnionEnterpriseAuthAppMapper.xml
...n/resources/mapper/TabSysUnionEnterpriseAuthAppMapper.xml
+8
-1
UnionEnterpriseAuthController.java
...e/web/controller/union/UnionEnterpriseAuthController.java
+19
-8
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/UnionEnterpriseAuthApiService.java
View file @
930b6bdb
...
...
@@ -68,6 +68,14 @@ public interface UnionEnterpriseAuthApiService {
*/
ServiceResponse
<
List
<
UnionEnterpriseAuthListDTO
>>
listUnionEnterpriseAuth
(
@NotNull
Integer
ownEnterpriseId
,
String
enterpriseName
,
Integer
authStatus
);
/**
* 查询联合商户数据
* @param ownEnterpriseId
* @return
*/
ServiceResponse
<
List
<
UnionEnterpriseAuthDTO
>>
listUnionEnterpriseAuth
(
@NotNull
Integer
ownEnterpriseId
);
/**************应用策略************************/
/**
...
...
@@ -100,6 +108,13 @@ public interface UnionEnterpriseAuthApiService {
ServiceResponse
<
String
>
deleteUnionEnterpriseAuthApp
(
@NotNull
Integer
unionEnterpriseAuthAppId
);
/**
* 批量删除接口
* @param unionEnterpriseAuthId
* @return
*/
ServiceResponse
<
String
>
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
);
/**
* 到期发送解除联合通知
* @param param
* @return
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabSysUnionEnterpriseAuthAppMapper.java
View file @
930b6bdb
...
...
@@ -3,6 +3,7 @@ package com.gic.enterprise.dao.mapper;
import
com.gic.enterprise.entity.TabSysUnionEnterpriseAuthApp
;
import
org.apache.ibatis.annotations.Param
;
import
javax.validation.constraints.NotNull
;
import
java.util.List
;
/**
...
...
@@ -71,4 +72,11 @@ public interface TabSysUnionEnterpriseAuthAppMapper {
int
countRepeatStrategyName
(
@Param
(
"unionEnterpriseAuthAppId"
)
Integer
unionEnterpriseAuthAppId
,
@Param
(
"unionEnterpriseAuthId"
)
Integer
unionEnterpriseAuthId
,
@Param
(
"strategyName"
)
String
strategyName
);
/**
* 批量删除
* @param unionEnterpriseAuthId
* @return
*/
int
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@Param
(
"unionEnterpriseAuthId"
)
Integer
unionEnterpriseAuthId
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/UnionEnterpriseAuthAppService.java
View file @
930b6bdb
...
...
@@ -58,4 +58,11 @@ public interface UnionEnterpriseAuthAppService {
* @return
*/
int
deleteUnionEnterpriseAuthApp
(
@NotNull
Integer
unionEnterpriseAuthAppId
);
/**
* 批量删除策略
* @param unionEnterpriseAuthId
* @return
*/
int
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/UnionEnterpriseAuthAppServiceImpl.java
View file @
930b6bdb
...
...
@@ -67,4 +67,9 @@ public class UnionEnterpriseAuthAppServiceImpl implements UnionEnterpriseAuthApp
.
setDeleteFlag
(
1
)
.
setUnionEnterpriseAuthAppId
(
unionEnterpriseAuthAppId
));
}
@Override
public
int
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
)
{
return
tabSysUnionEnterpriseAuthAppMapper
.
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
unionEnterpriseAuthId
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/union/UnionEnterpriseAuthApiServiceImpl.java
View file @
930b6bdb
...
...
@@ -211,6 +211,11 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
}
@Override
public
ServiceResponse
<
List
<
UnionEnterpriseAuthDTO
>>
listUnionEnterpriseAuth
(
@NotNull
Integer
ownEnterpriseId
)
{
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Void
>
saveOrUpdateUnionEnterpriseAuthApp
(
@Valid
UnionEnterpriseAuthAppDTO
dto
)
{
List
<
TabSysUnionEnterpriseAuthApp
>
appList
=
unionEnterpriseAuthAppService
.
listUnionEnterpriseAuthApp
(
dto
.
getUnionEnterpriseAuthId
());
Set
<
String
>
appIdSet
=
new
HashSet
<>();
...
...
@@ -276,6 +281,12 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
}
@Override
public
ServiceResponse
<
String
>
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
)
{
int
num
=
unionEnterpriseAuthAppService
.
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
unionEnterpriseAuthId
);
return
ServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Void
>
relieveTask
(
String
param
)
{
List
<
TabSysUnionEnterpriseAuth
>
list
=
unionEnterpriseAuthService
.
listAll
();
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabSysUnionEnterpriseAuthAppMapper.xml
View file @
930b6bdb
...
...
@@ -144,7 +144,7 @@
and union_enterprise_auth_id = #{unionEnterpriseAuthId}
</select>
<select
id=
"countRepeatStrategyName"
resultType=
"
int
"
>
<select
id=
"countRepeatStrategyName"
resultType=
"
Integer
"
>
select count(1) from tab_sys_union_enterprise_auth_app
where delete_flag = 0
and union_enterprise_auth_id = #{unionEnterpriseAuthId}
...
...
@@ -153,4 +153,10 @@
</if>
and strategy_name = #{strategyName}
</select>
<select
id=
"deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId"
resultType=
"Integer"
>
update tab_sys_union_enterprise_auth_app set delete_flag = 1
where delete_flag = 0
and union_enterprise_auth_id = #{unionEnterpriseAuthId}
</select>
</mapper>
\ No newline at end of file
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/union/UnionEnterpriseAuthController.java
View file @
930b6bdb
...
...
@@ -271,10 +271,8 @@ public class UnionEnterpriseAuthController {
@RequestMapping
(
"/user-area"
)
public
RestResponse
channelResource
(
Integer
resourceGroupId
,
Integer
enterpriseId
)
{
Integer
ownEnterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
UnionEnterpriseAuthDTO
old
=
getUnionEnterpriseAuth
(
ownEnterpriseId
,
enterpriseId
);
if
(
old
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"联合商户不存在"
);
}
UnionEnterpriseAuthDTO
old
=
checkUnionEnterpriseAuth
(
ownEnterpriseId
,
enterpriseId
);
if
(
old
.
getResourceGroupId
()
!=
null
&&
!
old
.
getResourceGroupId
().
equals
(
resourceGroupId
))
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"资源组数据错误,与联合商户授权资源不相符"
);
}
...
...
@@ -341,10 +339,7 @@ public class UnionEnterpriseAuthController {
@RequestMapping
(
"auth-app-resource"
)
public
RestResponse
authAppResource
(
UnionEnterpriseAuthAppQO
unionEnterpriseAuthAppQO
)
{
//app资源授权
UnionEnterpriseAuthDTO
old
=
getUnionEnterpriseAuth
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
unionEnterpriseAuthAppQO
.
getEnterpriseId
());
if
(
old
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"联合商户不存在"
);
}
UnionEnterpriseAuthDTO
old
=
checkUnionEnterpriseAuth
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
unionEnterpriseAuthAppQO
.
getEnterpriseId
());
UnionEnterpriseAuthAppDTO
dto
=
EntityUtil
.
changeEntityNew
(
UnionEnterpriseAuthAppDTO
.
class
,
unionEnterpriseAuthAppQO
);
dto
.
setUnionEnterpriseAuthId
(
old
.
getUnionEnterpriseAuthId
());
return
OperationResultUtils
.
operationResult
(
...
...
@@ -372,6 +367,13 @@ public class UnionEnterpriseAuthController {
return
getAppStrategy
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
enterpriseId
);
}
@RequestMapping
(
"delete-all-app-resource"
)
public
RestResponse
deleteAllAppResource
(
Integer
enterpriseId
)
{
UnionEnterpriseAuthDTO
old
=
checkUnionEnterpriseAuth
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
enterpriseId
);
return
ResultControllerUtils
.
commonResult
(
unionEnterpriseAuthApiService
.
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
old
.
getUnionEnterpriseAuthId
()));
}
/**
* 自有商户列表
...
...
@@ -545,6 +547,15 @@ public class UnionEnterpriseAuthController {
return
null
;
}
private
UnionEnterpriseAuthDTO
checkUnionEnterpriseAuth
(
Integer
ownEnterpriseId
,
Integer
unionEnterpriseId
)
{
ServiceResponse
<
UnionEnterpriseAuthDTO
>
unionResponse
=
unionEnterpriseAuthApiService
.
getUnionEnterpriseAuth
(
ownEnterpriseId
,
unionEnterpriseId
);
if
(
unionResponse
.
isSuccess
())
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"联合记录不存在"
);
}
return
unionResponse
.
getResult
();
}
private
EnterpriseDTO
getEnterpriseById
(
Integer
enterpriseId
)
{
//查询联合商户信息
ServiceResponse
<
EnterpriseDTO
>
enterpriseResponse
=
enterpriseApiService
.
getEnterpriseById
(
enterpriseId
);
...
...
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