Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
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
youjj
cloud-platform
Commits
303ccbb5
Commit
303ccbb5
authored
Oct 22, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改订单统计
parent
3acb0623
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
UserAuthentication.java
...l/service/authenticationInterface/UserAuthentication.java
+1
-1
BJCYAuthentication.java
...vice/authenticationInterface/impl/BJCYAuthentication.java
+1
-1
XCFQAuthentication.java
...vice/authenticationInterface/impl/XCFQAuthentication.java
+2
-5
No files found.
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/authenticationInterface/UserAuthentication.java
View file @
303ccbb5
...
@@ -5,7 +5,7 @@ import com.xxfc.platform.universal.biz.UserMessage;
...
@@ -5,7 +5,7 @@ import com.xxfc.platform.universal.biz.UserMessage;
import
java.util.Map
;
import
java.util.Map
;
/**
/**
* 用户认证
类
* 用户认证
接口 (使用@Primary实现的优先级提升优先级)
* @author Administrator
* @author Administrator
*/
*/
public
interface
UserAuthentication
{
public
interface
UserAuthentication
{
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/authenticationInterface/impl/BJCYAuthentication.java
View file @
303ccbb5
...
@@ -25,7 +25,7 @@ import java.util.Map;
...
@@ -25,7 +25,7 @@ import java.util.Map;
*/
*/
@Service
@Service
@Slf4j
@Slf4j
@Primary
//
@Primary
public
class
BJCYAuthentication
implements
UserAuthentication
{
public
class
BJCYAuthentication
implements
UserAuthentication
{
private
final
String
host
=
"http://aliyunverifyidcard.haoservice.com"
;
private
final
String
host
=
"http://aliyunverifyidcard.haoservice.com"
;
private
final
String
path
=
"/idcard/VerifyIdcardv2"
;
private
final
String
path
=
"/idcard/VerifyIdcardv2"
;
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/authenticationInterface/impl/XCFQAuthentication.java
View file @
303ccbb5
...
@@ -12,6 +12,7 @@ import org.apache.commons.lang.StringUtils;
...
@@ -12,6 +12,7 @@ import org.apache.commons.lang.StringUtils;
import
org.apache.http.HttpResponse
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.StatusLine
;
import
org.apache.http.StatusLine
;
import
org.apache.http.util.EntityUtils
;
import
org.apache.http.util.EntityUtils
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -24,6 +25,7 @@ import java.util.Map;
...
@@ -24,6 +25,7 @@ import java.util.Map;
*/
*/
@Service
@Service
@Slf4j
@Slf4j
@Primary
public
class
XCFQAuthentication
implements
UserAuthentication
{
public
class
XCFQAuthentication
implements
UserAuthentication
{
private
String
cAppcode
=
"acea1c8811f748b3a65815f11db357c4"
;
private
String
cAppcode
=
"acea1c8811f748b3a65815f11db357c4"
;
...
@@ -33,10 +35,8 @@ public class XCFQAuthentication implements UserAuthentication {
...
@@ -33,10 +35,8 @@ public class XCFQAuthentication implements UserAuthentication {
*/
*/
private
String
cHost
=
"https://idcert.market.alicloudapi.com"
;
private
String
cHost
=
"https://idcert.market.alicloudapi.com"
;
private
String
cPath
=
"/idcard"
;
private
String
cPath
=
"/idcard"
;
private
String
cMethod
=
"GET"
;
private
String
cMethod
=
"GET"
;
//响应:认证错误码字段名
//响应:认证错误码字段名
...
@@ -45,7 +45,6 @@ public class XCFQAuthentication implements UserAuthentication {
...
@@ -45,7 +45,6 @@ public class XCFQAuthentication implements UserAuthentication {
//响应:认证通过码
//响应:认证通过码
private
String
certifResultCode
=
"01"
;
private
String
certifResultCode
=
"01"
;
//请求:身份证号字段名
//请求:身份证号字段名
private
String
idCardName
=
"idCard"
;
private
String
idCardName
=
"idCard"
;
...
@@ -55,11 +54,9 @@ public class XCFQAuthentication implements UserAuthentication {
...
@@ -55,11 +54,9 @@ public class XCFQAuthentication implements UserAuthentication {
@Override
@Override
public
boolean
certificate
(
UserMessage
message
)
{
public
boolean
certificate
(
UserMessage
message
)
{
//map携带身份证和姓名进行认证
//map携带身份证和姓名进行认证
Map
<
String
,
String
>
querys
=
new
HashMap
<>();
Map
<
String
,
String
>
querys
=
new
HashMap
<>();
querys
.
put
(
idCardName
,
message
.
getIdNumber
());
querys
.
put
(
idCardName
,
message
.
getIdNumber
());
querys
.
put
(
cName
,
message
.
getName
());
querys
.
put
(
cName
,
message
.
getName
());
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
headers
.
put
(
"Authorization"
,
"APPCODE "
+
cAppcode
);
headers
.
put
(
"Authorization"
,
"APPCODE "
+
cAppcode
);
try
{
try
{
...
...
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