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
e4a01a01
Commit
e4a01a01
authored
Oct 24, 2023
by
BlackJokerCJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xiyi
parent
633f03e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
RiskQueryDataCommand.java
...n/java/com/jqtx/windows/command/RiskQueryDataCommand.java
+8
-1
CreditComponent.java
...main/java/com/jqtx/windows/component/CreditComponent.java
+2
-0
CreditComponentImpl.java
.../com/jqtx/windows/component/impl/CreditComponentImpl.java
+12
-1
No files found.
src/main/java/com/jqtx/windows/command/RiskQueryDataCommand.java
View file @
e4a01a01
...
...
@@ -24,9 +24,16 @@ public class RiskQueryDataCommand extends AbstractCommand {
public
JsonResult
execute
()
{
String
request
=
RuntimeContextHolder
.
currentRuntimeContext
().
getRequestBody
();
RiskCreditRequest
riskCreditRequest
=
JSON
.
parseObject
(
request
,
RiskCreditRequest
.
class
);
CreditModel
creditModel
=
creditComponent
.
getByOrderNo
(
riskCreditRequest
.
getOrderNo
());
CreditModel
creditModel
=
null
;
if
(
riskCreditRequest
.
getOrderNo
()==
null
){
creditModel
=
creditComponent
.
getByCertNo
(
riskCreditRequest
.
getCertNo
());
}
else
{
creditModel
=
creditComponent
.
getByOrderNo
(
riskCreditRequest
.
getOrderNo
());
}
String
data
=
ossUtils
.
getStringObject
(
creditModel
.
getCreditThirdUrl
());
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
data
);
return
JsonResult
.
success
(
jsonObject
.
getJSONObject
(
riskCreditRequest
.
getApiCode
()));
}
}
src/main/java/com/jqtx/windows/component/CreditComponent.java
View file @
e4a01a01
...
...
@@ -15,4 +15,6 @@ public interface CreditComponent {
List
<
CreditModel
>
getListModelByCreditThirdStatus
(
String
token
);
List
<
CreditModel
>
getListModelByCreditThirdToken
(
String
token
);
CreditModel
getByCertNo
(
String
certNo
);
}
src/main/java/com/jqtx/windows/component/impl/CreditComponentImpl.java
View file @
e4a01a01
...
...
@@ -30,7 +30,7 @@ public class CreditComponentImpl implements CreditComponent {
example
.
setOrderByClause
(
"id desc"
);
List
<
WindowsCredit
>
list
=
windowsCreditMapper
.
selectByExample
(
example
);
if
(
CollectionUtil
.
isNotEmpty
(
list
))
{
return
list
.
stream
().
map
(
e
->
CglibUtil
.
copy
(
e
,
CreditModel
.
class
)).
findFirst
().
get
(
);
return
list
.
stream
().
map
(
e
->
CglibUtil
.
copy
(
e
,
CreditModel
.
class
)).
findFirst
().
orElse
(
null
);
}
return
null
;
}
...
...
@@ -74,4 +74,15 @@ public class CreditComponentImpl implements CreditComponent {
return
list
.
stream
().
map
(
e
->
CglibUtil
.
copy
(
e
,
CreditModel
.
class
)).
collect
(
Collectors
.
toList
());
}
@Override
public
CreditModel
getByCertNo
(
String
certNo
)
{
WindowsCreditExample
example
=
new
WindowsCreditExample
();
WindowsCreditExample
.
Criteria
c
=
example
.
createCriteria
();
c
.
andCertNoEqualTo
(
certNo
);
example
.
setOrderByClause
(
"id desc"
);
List
<
WindowsCredit
>
list
=
windowsCreditMapper
.
selectByExample
(
example
);
return
list
.
stream
().
map
(
e
->
CglibUtil
.
copy
(
e
,
CreditModel
.
class
)).
findFirst
().
orElse
(
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