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
5bcd7dbc
Commit
5bcd7dbc
authored
Feb 23, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新建联合商户重复创建过滤
parent
ce8c557e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
UnionEnterpriseAuthController.java
...e/web/controller/union/UnionEnterpriseAuthController.java
+11
-4
No files found.
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/union/UnionEnterpriseAuthController.java
View file @
5bcd7dbc
...
...
@@ -116,10 +116,10 @@ public class UnionEnterpriseAuthController {
//验证码生成
AuthCodeDTO
authCodeDTO
=
new
AuthCodeDTO
();
authCodeDTO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
//生成
4
位数字验证码
String
authCode
=
CreateRandomUtils
.
ge
tStringRandom
(
6
);
//生成
6
位数字验证码
String
authCode
=
CreateRandomUtils
.
ge
nerateNumberStr
(
6
);
authCodeDTO
.
setAuthCode
(
authCode
);
authCodeDTO
.
setExpirationTime
(
AuthCodeExpireTimeUtils
.
setAuthCodeExpireTime
(
5
));
authCodeDTO
.
setExpirationTime
(
AuthCodeExpireTimeUtils
.
setAuthCodeExpireTime
(
2
));
ServiceResponse
<
Integer
>
result
=
authCodeApiService
.
saveAuth
(
authCodeDTO
);
if
(
result
.
isSuccess
())
{
Integer
authCodeId
=
result
.
getResult
();
...
...
@@ -147,10 +147,11 @@ public class UnionEnterpriseAuthController {
* @param authCode
* @param authCodeId
* @param enterpriseName
* @param isAdd 是否是新增入口
* @return
*/
@RequestMapping
(
"create-union-enterprise"
)
public
RestResponse
createUnionEnterprise
(
String
authCode
,
Integer
authCodeId
,
String
enterpriseName
)
{
public
RestResponse
createUnionEnterprise
(
String
authCode
,
Integer
authCodeId
,
String
enterpriseName
,
Boolean
isAdd
)
{
ServiceResponse
authCodeResult
=
authCodeApiService
.
validateAuthCode
(
authCodeId
,
authCode
);
if
(!
authCodeResult
.
isSuccess
())
{
return
RestResponse
.
failure
(
authCodeResult
.
getCode
(),
authCodeResult
.
getMessage
());
...
...
@@ -159,6 +160,12 @@ 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
)
{
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