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
1c4a7c0b
Commit
1c4a7c0b
authored
Feb 24, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建联合商户重复创建过滤
parent
a0d45170
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
UnionEnterpriseAuthController.java
...e/web/controller/union/UnionEnterpriseAuthController.java
+8
-8
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/union/UnionEnterpriseAuthController.java
View file @
1c4a7c0b
...
...
@@ -94,11 +94,17 @@ public class UnionEnterpriseAuthController {
* @return
*/
@RequestMapping
(
"check-enterprise-by-name"
)
public
RestResponse
checkEnterpriseName
(
String
enterpriseName
)
{
public
RestResponse
checkEnterpriseName
(
String
enterpriseName
,
Boolean
isAdd
)
{
EnterpriseDTO
enterpriseDTO
=
checkEnterpriseByEnterpriseName
(
enterpriseName
);
if
(
enterpriseDTO
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"联合商户不存在或者是自有商户"
);
}
if
(
isAdd
!=
null
&&
isAdd
)
{
UnionEnterpriseAuthDTO
old
=
getUnionEnterpriseAuth
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
enterpriseDTO
.
getEnterpriseId
());
if
(
old
!=
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"商户已经联合"
);
}
}
return
RestResponse
.
success
(
EntityUtil
.
changeEntityNew
(
EnterpriseInfoVO
.
class
,
enterpriseDTO
));
}
...
...
@@ -151,7 +157,7 @@ public class UnionEnterpriseAuthController {
* @return
*/
@RequestMapping
(
"create-union-enterprise"
)
public
RestResponse
createUnionEnterprise
(
String
authCode
,
Integer
authCodeId
,
String
enterpriseName
,
Boolean
isAdd
)
{
public
RestResponse
createUnionEnterprise
(
String
authCode
,
Integer
authCodeId
,
String
enterpriseName
)
{
ServiceResponse
authCodeResult
=
authCodeApiService
.
validateAuthCode
(
authCodeId
,
authCode
);
if
(!
authCodeResult
.
isSuccess
())
{
return
RestResponse
.
failure
(
authCodeResult
.
getCode
(),
authCodeResult
.
getMessage
());
...
...
@@ -160,12 +166,6 @@ public class UnionEnterpriseAuthController {
if
(
unionEnterprise
==
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"联合商户不存在或者是自有商户"
);
}
if
(
isAdd
!=
null
&&
isAdd
)
{
UnionEnterpriseAuthDTO
old
=
getUnionEnterpriseAuth
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
(),
unionEnterprise
.
getEnterpriseId
());
if
(
old
!=
null
)
{
return
RestResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"商户已经联合"
);
}
}
Integer
ownEnterpriseId
=
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
();
Integer
unionEnterpriseId
=
unionEnterprise
.
getEnterpriseId
();
...
...
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