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
ab911575
Commit
ab911575
authored
Nov 29, 2023
by
BlackJokerCJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xiyi
parent
0470d425
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
SyncCreditCommand.java
...main/java/com/jqtx/windows/command/SyncCreditCommand.java
+17
-0
No files found.
src/main/java/com/jqtx/windows/command/SyncCreditCommand.java
View file @
ab911575
...
@@ -7,19 +7,26 @@ import com.jqtx.windows.common.factory.AbstractCommand;
...
@@ -7,19 +7,26 @@ import com.jqtx.windows.common.factory.AbstractCommand;
import
com.jqtx.windows.common.factory.RuntimeContextHolder
;
import
com.jqtx.windows.common.factory.RuntimeContextHolder
;
import
com.jqtx.windows.common.utils.ValidateUtil
;
import
com.jqtx.windows.common.utils.ValidateUtil
;
import
com.jqtx.windows.component.CreditResultComponent
;
import
com.jqtx.windows.component.CreditResultComponent
;
import
com.jqtx.windows.component.LoanComponent
;
import
com.jqtx.windows.component.model.CreditResultModel
;
import
com.jqtx.windows.component.model.CreditResultModel
;
import
com.jqtx.windows.component.model.LoanModel
;
import
com.jqtx.windows.web.request.SyncCreditResultRequest
;
import
com.jqtx.windows.web.request.SyncCreditResultRequest
;
import
com.jqtx.windows.web.response.JsonResult
;
import
com.jqtx.windows.web.response.JsonResult
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
@Service
@Service
@Slf4j
@Slf4j
public
class
SyncCreditCommand
extends
AbstractCommand
{
public
class
SyncCreditCommand
extends
AbstractCommand
{
@Autowired
@Autowired
private
CreditResultComponent
creditResultComponent
;
private
CreditResultComponent
creditResultComponent
;
@Autowired
private
LoanComponent
loanComponent
;
@Override
@Override
public
JsonResult
execute
()
{
public
JsonResult
execute
()
{
...
@@ -31,6 +38,16 @@ public class SyncCreditCommand extends AbstractCommand {
...
@@ -31,6 +38,16 @@ public class SyncCreditCommand extends AbstractCommand {
CreditResultModel
creditResultModel
=
BeanUtil
.
toBean
(
syncCreditResultRequest
,
CreditResultModel
.
class
);
CreditResultModel
creditResultModel
=
BeanUtil
.
toBean
(
syncCreditResultRequest
,
CreditResultModel
.
class
);
creditResultModel
.
setCreditStatus
(
syncCreditResultRequest
.
getStatus
());
creditResultModel
.
setCreditStatus
(
syncCreditResultRequest
.
getStatus
());
creditResultComponent
.
insert
(
creditResultModel
);
creditResultComponent
.
insert
(
creditResultModel
);
if
(
StringUtils
.
isNotEmpty
(
creditResultModel
.
getLoanNo
()))
{
boolean
pass
=
syncCreditResultRequest
.
getStatus
().
equals
(
"1"
);
LoanModel
loanModel
=
new
LoanModel
();
loanModel
.
setLoanNo
(
creditResultModel
.
getLoanNo
());
loanModel
.
setLoanStatus
(
pass
?
"AUDITED"
:
"CANCELED"
);
loanModel
.
setGmtModified
(
LocalDateTime
.
now
());
loanComponent
.
updateByLoanNo
(
loanModel
);
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"同步授信结果授信编号:{},报错:{}"
,
syncCreditResultRequest
.
getOrderNo
(),
e
.
getMessage
(),
e
);
log
.
error
(
"同步授信结果授信编号:{},报错:{}"
,
syncCreditResultRequest
.
getOrderNo
(),
e
.
getMessage
(),
e
);
throw
new
BizException
(
"同步授信结果错误"
);
throw
new
BizException
(
"同步授信结果错误"
);
...
...
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