Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qa-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
qa-platform
Commits
f5930dd2
Commit
f5930dd2
authored
Nov 11, 2020
by
黎博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增vcc
parent
fdd777c6
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
385 additions
and
0 deletions
+385
-0
GenVccController.java
...in/java/cn/qg/qaplatform/controller/GenVccController.java
+23
-0
GenVccUser.java
src/main/java/cn/qg/qaplatform/domain/GenVccUser.java
+30
-0
Vcc.java
src/main/java/cn/qg/qaplatform/process/Vcc.java
+266
-0
VccDataService.java
src/main/java/cn/qg/qaplatform/service/VccDataService.java
+8
-0
VccDataServiceImpl.java
...ava/cn/qg/qaplatform/service/impl/VccDataServiceImpl.java
+58
-0
No files found.
src/main/java/cn/qg/qaplatform/controller/GenVccController.java
0 → 100644
View file @
f5930dd2
package
cn
.
qg
.
qaplatform
.
controller
;
import
cn.qg.qaplatform.common.JsonResult
;
import
cn.qg.qaplatform.domain.GenVccUser
;
import
cn.qg.qaplatform.service.VccDataService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
@RequestMapping
(
"vcc"
)
public
class
GenVccController
{
@Autowired
VccDataService
vccDataService
;
@PostMapping
(
"/gen"
)
public
JsonResult
genVccUser
(
String
namespace
,
String
phoneNo
,
String
channel
)
throws
Exception
{
GenVccUser
result
=
vccDataService
.
makeVccUser
(
namespace
,
phoneNo
,
channel
,
0
);
return
JsonResult
.
success
(
result
);
}
}
src/main/java/cn/qg/qaplatform/domain/GenVccUser.java
0 → 100644
View file @
f5930dd2
package
cn
.
qg
.
qaplatform
.
domain
;
import
lombok.Data
;
import
java.util.Date
;
@Data
public
class
GenVccUser
{
/**
* 手机号
*/
private
String
phoneNo
;
/**
* uuid
*/
private
String
uuid
;
/**
* 开通的渠道
*/
private
Long
openedChannel
;
/**
* 创建日期
*/
private
Date
createdAt
;
/**
* 开通状态
* 0-授信通过
*/
private
Integer
status
;
}
src/main/java/cn/qg/qaplatform/process/Vcc.java
0 → 100644
View file @
f5930dd2
This diff is collapsed.
Click to expand it.
src/main/java/cn/qg/qaplatform/service/VccDataService.java
0 → 100644
View file @
f5930dd2
package
cn
.
qg
.
qaplatform
.
service
;
import
cn.qg.qaplatform.domain.GenVccUser
;
public
interface
VccDataService
{
GenVccUser
makeVccUser
(
String
namespace
,
String
phoneNo
,
String
openedChannel
,
Integer
status
)
throws
Exception
;
}
src/main/java/cn/qg/qaplatform/service/impl/VccDataServiceImpl.java
0 → 100644
View file @
f5930dd2
package
cn
.
qg
.
qaplatform
.
service
.
impl
;
import
cn.qg.qaplatform.domain.GenVccUser
;
import
cn.qg.qaplatform.process.Vcc
;
import
cn.qg.qaplatform.service.VccDataService
;
import
com.alibaba.fastjson.JSONObject
;
import
org.springframework.stereotype.Service
;
import
java.util.Map
;
@Service
public
class
VccDataServiceImpl
implements
VccDataService
{
@Override
public
GenVccUser
makeVccUser
(
String
namespace
,
String
phoneNo
,
String
openedChannel
,
Integer
status
)
throws
Exception
{
String
vccChannel
=
null
;
if
(
openedChannel
.
equals
(
"214"
))
{
vccChannel
=
"159904"
;
}
else
if
(
openedChannel
.
equals
(
"217"
))
{
vccChannel
=
"159905"
;
}
if
(
vccChannel
==
null
)
{
return
null
;
}
// 登录
Map
loginResult
=
Vcc
.
login
(
namespace
,
phoneNo
,
openedChannel
,
openedChannel
);
String
token
=
loginResult
.
get
(
"token"
).
toString
();
String
uuid
=
loginResult
.
get
(
"uuid"
).
toString
();
// credit url
String
vccToken
=
Vcc
.
creditUrl
(
namespace
,
token
,
vccChannel
,
vccChannel
);
// 身份证正面
Vcc
.
uploadFrontIdCard
(
vccToken
,
uuid
);
// 身份证反面
Vcc
.
uploadBackIdCard
(
vccToken
,
uuid
);
// 放置身份证重复
Vcc
.
modifyExistIdNo
(
namespace
);
// talos保存用户信息
Vcc
.
saveUserDetails
(
namespace
,
token
,
vccChannel
);
// 提交ocr
Vcc
.
submitOcr
(
vccToken
,
vccChannel
);
// 提交授信
Vcc
.
submitCredit
(
namespace
,
token
,
vccChannel
);
// 授信结果查询
Vcc
.
searchCreditResult
(
namespace
,
token
,
vccChannel
);
// 人脸识别回调
Vcc
.
appFaceCallback
(
namespace
,
token
,
vccChannel
);
// 基本信息
Vcc
.
basicInfo
(
namespace
,
token
,
vccChannel
);
// 发送验证码
String
requestId
=
Vcc
.
bindCardSms
(
namespace
,
token
,
vccChannel
,
"ABC"
,
"6228272537046278993"
);
// 额度激活
Vcc
.
quotaActivation
(
namespace
,
token
,
vccChannel
,
"6228272537046278993"
,
requestId
);
// 开户结果
JSONObject
result
=
Vcc
.
openResult
(
namespace
,
token
,
vccChannel
);
return
null
;
}
}
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