记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
f8ee052d
Commit
f8ee052d
authored
Apr 14, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_nft_411' into dev_nft_411
parents
8dc130d7
7408674a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
24 deletions
+50
-24
IdentityUtils.java
...n/java/com/liquidnet/commons/lang/util/IdentityUtils.java
+2
-2
AdamRdmService.java
...va/com/liquidnet/service/adam/service/AdamRdmService.java
+44
-20
AdamEntersServiceImpl.java
...dnet/service/adam/service/impl/AdamEntersServiceImpl.java
+4
-2
No files found.
liquidnet-bus-common/liquidnet-common-base/src/main/java/com/liquidnet/commons/lang/util/IdentityUtils.java
View file @
f8ee052d
...
@@ -23,7 +23,7 @@ public class IdentityUtils {
...
@@ -23,7 +23,7 @@ public class IdentityUtils {
try
{
try
{
return
HttpUtil
.
post
(
aliThirdUrl
,
params
,
header
);
return
HttpUtil
.
post
(
aliThirdUrl
,
params
,
header
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"###实名认证异常:{}"
,
e
.
getLocalizedMessage
()
,
e
);
log
.
error
(
"###实名认证异常:{}"
,
params
,
e
);
if
(
e
instanceof
UnknownHttpStatusCodeException
)
{
if
(
e
instanceof
UnknownHttpStatusCodeException
)
{
UnknownHttpStatusCodeException
unknownHttpStatusCodeException
=
(
UnknownHttpStatusCodeException
)
e
;
UnknownHttpStatusCodeException
unknownHttpStatusCodeException
=
(
UnknownHttpStatusCodeException
)
e
;
...
@@ -52,7 +52,7 @@ public class IdentityUtils {
...
@@ -52,7 +52,7 @@ public class IdentityUtils {
try
{
try
{
return
HttpUtil
.
get
(
ALI_MOBILE_CERT_HOST
.
concat
(
ALI_MOBILE_CERT3_META_URI
),
paramsMap
,
headersMap
);
return
HttpUtil
.
get
(
ALI_MOBILE_CERT_HOST
.
concat
(
ALI_MOBILE_CERT3_META_URI
),
paramsMap
,
headersMap
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"###实名认证异常:{}"
,
e
.
getLocalizedMessage
()
,
e
);
log
.
error
(
"###实名认证异常:{}"
,
paramsMap
,
e
);
if
(
e
instanceof
UnknownHttpStatusCodeException
)
{
if
(
e
instanceof
UnknownHttpStatusCodeException
)
{
UnknownHttpStatusCodeException
unknownHttpStatusCodeException
=
(
UnknownHttpStatusCodeException
)
e
;
UnknownHttpStatusCodeException
unknownHttpStatusCodeException
=
(
UnknownHttpStatusCodeException
)
e
;
return
unknownHttpStatusCodeException
.
getMessage
();
return
unknownHttpStatusCodeException
.
getMessage
();
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/AdamRdmService.java
View file @
f8ee052d
...
@@ -220,15 +220,6 @@ public class AdamRdmService {
...
@@ -220,15 +220,6 @@ public class AdamRdmService {
return
!
StringUtils
.
isEmpty
(
o
)
&&
o
.
equals
(
idName
);
return
!
StringUtils
.
isEmpty
(
o
)
&&
o
.
equals
(
idName
);
}
}
public
boolean
setCertmetaJunk
(
int
idType
,
String
idNo
,
String
idName
,
String
mobile
)
{
return
redisUtil
.
set
(
AdamRedisConst
.
INFO_CERTMETA_JUNK
+
idType
+
idNo
,
idName
.
concat
(
","
).
concat
(
mobile
),
604800
);
}
public
boolean
isCertmetaJunk
(
int
idType
,
String
idNo
,
String
idName
,
String
mobile
)
{
String
val
=
(
String
)
redisUtil
.
get
(
AdamRedisConst
.
INFO_CERTMETA_JUNK
+
idType
+
idNo
);
return
!
StringUtils
.
isEmpty
(
val
)
&&
val
.
equals
(
idName
.
concat
(
","
).
concat
(
mobile
));
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证成功的<ID_TYPE+ID_NO, ID_NAME> */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 认证成功的<ID_TYPE+ID_NO, ID_NAME> */
/**
/**
...
@@ -311,19 +302,52 @@ public class AdamRdmService {
...
@@ -311,19 +302,52 @@ public class AdamRdmService {
* @param mobile
* @param mobile
*/
*/
public
void
identityHandler3
(
String
name
,
String
idCard
,
String
mobile
)
{
public
void
identityHandler3
(
String
name
,
String
idCard
,
String
mobile
)
{
if
(
this
.
isCertmetaJunk
(
1
,
idCard
,
name
,
mobile
))
{
switch
(
this
.
isCertmeta
(
1
,
idCard
,
name
,
mobile
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"10112"
);
case
-
1
:
// 本地不存在
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
if
(
this
.
isCertmetaJunk
(
1
,
idCard
,
name
,
mobile
))
{
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"10112"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
String
respStr
=
IdentityUtils
.
ali3Meta
(
name
,
idCard
,
mobile
);
JsonNode
respJNode
=
JsonUtils
.
fromJson
(
respStr
,
JsonNode
.
class
);
if
(
null
==
respJNode
||
!
"200"
.
equals
(
respJNode
.
get
(
"code"
).
asText
())
||
!
respJNode
.
get
(
"data"
).
get
(
"bizCode"
).
asText
().
equals
(
"1"
))
{
log
.
warn
(
"###实名认证失败[{}]"
,
respStr
);
this
.
setCertmetaJunk
(
1
,
idCard
,
name
,
mobile
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"10112"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
}
this
.
setCertmeta
(
1
,
idCard
,
name
,
mobile
);
break
;
case
0
:
// 本地存在,验证不通过
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"10112"
);
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
case
1
:
// 本地存在,验证通过
break
;
}
}
String
respStr
=
IdentityUtils
.
ali3Meta
(
name
,
idCard
,
mobile
);
}
JsonNode
respJNode
=
JsonUtils
.
fromJson
(
respStr
,
JsonNode
.
class
);
if
(
null
==
respJNode
||
!
"200"
.
equals
(
respJNode
.
get
(
"code"
).
asText
())
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 三要素认证缓存的<ID_TYPE+ID_NO, "ID_NAME,MOBILE"> */
||
!
respJNode
.
get
(
"data"
).
get
(
"bizCode"
).
asText
().
equals
(
"1"
))
{
log
.
warn
(
"###实名认证失败[{}]"
,
respStr
);
public
boolean
setCertmetaJunk
(
int
idType
,
String
idNo
,
String
idName
,
String
mobile
)
{
this
.
setCertmetaJunk
(
1
,
idCard
,
name
,
mobile
);
return
redisUtil
.
set
(
AdamRedisConst
.
INFO_CERTMETA_JUNK
+
idType
+
idNo
,
idName
.
concat
(
","
).
concat
(
mobile
),
604800
);
ErrorMapping
.
ErrorMessage
errorMessage
=
ErrorMapping
.
get
(
"10112"
);
}
throw
new
LiquidnetServiceException
(
errorMessage
.
getCode
(),
errorMessage
.
getMessage
());
public
boolean
isCertmetaJunk
(
int
idType
,
String
idNo
,
String
idName
,
String
mobile
)
{
String
val
=
(
String
)
redisUtil
.
get
(
AdamRedisConst
.
INFO_CERTMETA_JUNK
+
idType
+
idNo
);
return
!
StringUtils
.
isEmpty
(
val
)
&&
val
.
equals
(
idName
.
concat
(
","
).
concat
(
mobile
));
}
public
boolean
setCertmeta
(
int
idType
,
String
idNo
,
String
idName
,
String
mobile
)
{
return
redisUtil
.
set
(
AdamRedisConst
.
INFO_CERTMETA
+
idType
+
idNo
,
idName
.
concat
(
","
).
concat
(
mobile
));
}
public
int
isCertmeta
(
int
idType
,
String
idNo
,
String
idName
,
String
mobile
)
{
String
o
=
(
String
)
redisUtil
.
get
(
AdamRedisConst
.
INFO_CERTMETA
+
idType
+
idNo
);
if
(
StringUtils
.
isEmpty
(
o
))
{
return
-
1
;
}
}
return
o
.
equals
(
idName
.
concat
(
","
).
concat
(
mobile
))
?
1
:
0
;
}
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <UID, List<AdamThirdPartInfoVo>> */
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <UID, List<AdamThirdPartInfoVo>> */
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/impl/AdamEntersServiceImpl.java
View file @
f8ee052d
...
@@ -54,7 +54,8 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
...
@@ -54,7 +54,8 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
//
//
// adamRdmService.setCertification(1, parameter.getIdCard(), parameter.getName());
// adamRdmService.setCertification(1, parameter.getIdCard(), parameter.getName());
// }
// }
adamRdmService
.
identityHandler1
(
currentUid
,
parameter
.
getName
(),
parameter
.
getIdCard
());
// adamRdmService.identityHandler1(currentUid, parameter.getName(), parameter.getIdCard());
adamRdmService
.
identityHandler3
(
parameter
.
getName
(),
parameter
.
getIdCard
(),
parameter
.
getMobile
());
}
}
...
@@ -134,7 +135,8 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
...
@@ -134,7 +135,8 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
//
//
// adamRdmService.setCertification(1, parameter.getIdCard(), parameter.getName());
// adamRdmService.setCertification(1, parameter.getIdCard(), parameter.getName());
// }
// }
adamRdmService
.
identityHandler1
(
currentUid
,
parameter
.
getName
(),
parameter
.
getIdCard
());
// adamRdmService.identityHandler1(currentUid, parameter.getName(), parameter.getIdCard());
adamRdmService
.
identityHandler3
(
parameter
.
getName
(),
parameter
.
getIdCard
(),
parameter
.
getMobile
());
}
}
List
<
AdamEntersVo
>
vos
=
adamRdmService
.
getEntersVoByUid
(
currentUid
);
List
<
AdamEntersVo
>
vos
=
adamRdmService
.
getEntersVoByUid
(
currentUid
);
...
...
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