Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
windows
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
zhanhai
windows
Commits
732c613c
Commit
732c613c
authored
Oct 24, 2023
by
BlackJokerCJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改提交
parent
78e7a029
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
79 additions
and
4 deletions
+79
-4
pom.xml
pom.xml
+5
-0
CreditThirdDataCommand.java
...java/com/jqtx/windows/command/CreditThirdDataCommand.java
+11
-4
CreditThirdDataQueryCommand.java
...com/jqtx/windows/command/CreditThirdDataQueryCommand.java
+27
-0
LoanSubmitCommand.java
...main/java/com/jqtx/windows/command/LoanSubmitCommand.java
+12
-0
ZNPostUrlEnum.java
.../java/com/jqtx/windows/component/enums/ZNPostUrlEnum.java
+2
-0
CreditThirdDataJob.java
src/main/java/com/jqtx/windows/job/CreditThirdDataJob.java
+22
-0
No files found.
pom.xml
View file @
732c613c
...
...
@@ -41,6 +41,11 @@
<artifactId>
infrastructure-oss-starter
</artifactId>
<version>
0.0.4-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.jqtx.infrastructure
</groupId>
<artifactId>
infrastructure-xxl-starter
</artifactId>
<version>
0.0.4-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
com.jqtx.infrastructure
</groupId>
<artifactId>
infrastructure-core
</artifactId>
...
...
src/main/java/com/jqtx/windows/command/CreditThirdDataCommand.java
View file @
732c613c
package
com
.
jqtx
.
windows
.
command
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jqtx.windows.common.factory.AbstractCommand
;
import
com.jqtx.windows.common.factory.RuntimeContextHolder
;
import
com.jqtx.windows.component.enums.ZNPostUrlEnum
;
import
com.jqtx.windows.utils.AbcHttpClient
;
import
com.jqtx.windows.web.request.CreditSubmitRequest
;
import
com.jqtx.windows.web.request.CreditThirdDataRequest
;
import
com.jqtx.windows.web.response.JsonResult
;
import
com.jqtx.windows.web.response.LoanSubmitResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
@Slf4j
public
class
CreditThirdDataCommand
extends
AbstractCommand
{
@Autowired
private
AbcHttpClient
abcHttpClient
;
@Override
public
JsonResult
execute
()
{
String
requestBody
=
RuntimeContextHolder
.
currentRuntimeContext
().
getRequestBody
();
CreditThirdDataRequest
request
=
JSON
.
parseObject
(
requestBody
,
CreditThirdDataRequest
.
class
);
return
null
;
String
request
=
RuntimeContextHolder
.
currentRuntimeContext
().
getRequestBody
();
JSONObject
loanSubmitResponse
=
JSON
.
parseObject
(
request
,
JSONObject
.
class
);
return
JsonResult
.
success
(
abcHttpClient
.
postRequest
(
loanSubmitResponse
.
toJSONString
(),
ZNPostUrlEnum
.
CREDIT_APPLY
.
getCode
()));
}
}
src/main/java/com/jqtx/windows/command/CreditThirdDataQueryCommand.java
0 → 100644
View file @
732c613c
package
com
.
jqtx
.
windows
.
command
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jqtx.windows.common.factory.AbstractCommand
;
import
com.jqtx.windows.common.factory.RuntimeContextHolder
;
import
com.jqtx.windows.component.enums.ZNPostUrlEnum
;
import
com.jqtx.windows.utils.AbcHttpClient
;
import
com.jqtx.windows.web.response.JsonResult
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
@Slf4j
public
class
CreditThirdDataQueryCommand
extends
AbstractCommand
{
@Autowired
private
AbcHttpClient
abcHttpClient
;
@Override
public
JsonResult
execute
()
{
String
request
=
RuntimeContextHolder
.
currentRuntimeContext
().
getRequestBody
();
JSONObject
loanSubmitResponse
=
JSON
.
parseObject
(
request
,
JSONObject
.
class
);
return
JsonResult
.
success
(
abcHttpClient
.
postRequest
(
loanSubmitResponse
.
toJSONString
(),
ZNPostUrlEnum
.
CREDIT_QUERY
.
getCode
()));
}
}
src/main/java/com/jqtx/windows/command/LoanSubmitCommand.java
View file @
732c613c
...
...
@@ -2,17 +2,20 @@ package com.jqtx.windows.command;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jqtx.windows.common.exception.BizException
;
import
com.jqtx.windows.common.factory.AbstractCommand
;
import
com.jqtx.windows.common.factory.RuntimeContextHolder
;
import
com.jqtx.windows.component.CreditComponent
;
import
com.jqtx.windows.component.LoanComponent
;
import
com.jqtx.windows.component.enums.CreditResultStatusEnum
;
import
com.jqtx.windows.component.enums.ZNPostUrlEnum
;
import
com.jqtx.windows.component.model.CreditModel
;
import
com.jqtx.windows.component.model.LoanCreditSubmitModel
;
import
com.jqtx.windows.component.model.LoanModel
;
import
com.jqtx.windows.infrastructure.enums.ExceptionCodeEnum
;
import
com.jqtx.windows.infrastructure.feign.IWakandaFeignService
;
import
com.jqtx.windows.utils.AbcHttpClient
;
import
com.jqtx.windows.web.response.JsonResult
;
import
com.jqtx.windows.web.response.LoanSubmitResponse
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -36,6 +39,9 @@ public class LoanSubmitCommand extends AbstractCommand {
@Autowired
private
IWakandaFeignService
wakandaFeignService
;
@Autowired
private
AbcHttpClient
abcHttpClient
;
@Override
public
JsonResult
execute
()
{
String
request
=
RuntimeContextHolder
.
currentRuntimeContext
().
getRequestBody
();
...
...
@@ -55,6 +61,12 @@ public class LoanSubmitCommand extends AbstractCommand {
if
(!
insert
)
{
throw
new
BizException
(
ExceptionCodeEnum
.
SYSTEM_SQL_INSERT_ERROR
);
}
JSONObject
thirdCredit
=
new
JSONObject
();
thirdCredit
.
put
(
"reqNo"
,
loanSubmitResponse
.
getOrderNo
());
thirdCredit
.
put
(
"type"
,
"01"
);
abcHttpClient
.
postRequest
(
thirdCredit
.
toJSONString
(),
ZNPostUrlEnum
.
CREDIT_APPLY
.
getCode
());
// 提现授信
LoanCreditSubmitModel
model
=
new
LoanCreditSubmitModel
();
model
.
setOrderNo
(
byOrderNo
.
getOrderNo
());
...
...
src/main/java/com/jqtx/windows/component/enums/ZNPostUrlEnum.java
View file @
732c613c
...
...
@@ -5,6 +5,8 @@ public enum ZNPostUrlEnum {
CREDIT_CALL
(
"creditNotify"
,
"授信状态推送Url"
),
LOAN_CALL
(
"loadNotify"
,
"借款状态推送Url"
),
PROTOCOL_CALL
(
"guaranteeSign"
,
"协议状态推送Url"
),
CREDIT_APPLY
(
"externalDataApply"
,
"合作方向浙农提交客户三方数据获取申请接口"
),
CREDIT_QUERY
(
"externalDataQuery"
,
"合作方查询三方数据"
),
;
ZNPostUrlEnum
(
String
code
,
String
msg
)
{
...
...
src/main/java/com/jqtx/windows/job/CreditThirdDataJob.java
0 → 100644
View file @
732c613c
package
com
.
jqtx
.
windows
.
job
;
import
com.alibaba.fastjson.JSON
;
import
com.jqtx.windows.component.enums.ZNPostUrlEnum
;
import
com.jqtx.windows.utils.AbcHttpClient
;
import
com.xxl.job.core.handler.annotation.XxlJob
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
@Component
@Slf4j
public
class
CreditThirdDataJob
{
@Autowired
private
AbcHttpClient
abcHttpClient
;
@XxlJob
(
"privacyTask"
)
public
void
run
(){
}
}
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