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
bddf0a5d
Commit
bddf0a5d
authored
Oct 20, 2023
by
liuzicheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
3f1eca86
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
5 deletions
+30
-5
LoanStatusCommand.java
...main/java/com/jqtx/windows/command/LoanStatusCommand.java
+14
-5
LoanDetailResponse.java
...ava/com/jqtx/windows/web/response/LoanDetailResponse.java
+16
-0
No files found.
src/main/java/com/jqtx/windows/command/LoanStatusCommand.java
View file @
bddf0a5d
package
com
.
jqtx
.
windows
.
command
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.jqtx.windows.common.exception.BizException
;
import
com.jqtx.windows.common.factory.AbstractCommand
;
...
...
@@ -9,9 +8,9 @@ import com.jqtx.windows.component.LoanComponent;
import
com.jqtx.windows.component.model.LoanModel
;
import
com.jqtx.windows.infrastructure.enums.ExceptionCodeEnum
;
import
com.jqtx.windows.web.response.JsonResult
;
import
com.jqtx.windows.web.response.LoanDetailResponse
;
import
com.jqtx.windows.web.response.LoanSubmitResponse
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -32,12 +31,22 @@ public class LoanStatusCommand extends AbstractCommand {
String
request
=
RuntimeContextHolder
.
currentRuntimeContext
().
getRequestBody
();
LoanSubmitResponse
loanSubmitResponse
=
JSON
.
parseObject
(
request
,
LoanSubmitResponse
.
class
);
LoanModel
byLoanNo
=
loanComponent
.
getByLoanNo
(
loanSubmitResponse
.
getLoanNo
());
LoanDetailResponse
response
=
new
LoanDetailResponse
();
response
.
setOrderNo
(
loanSubmitResponse
.
getOrderNo
());
response
.
setStatus
(
0
);
response
.
setRemark
(
"提现审核中"
);
if
(
Objects
.
isNull
(
byLoanNo
))
{
throw
new
BizException
(
ExceptionCodeEnum
.
BIZ_CREDIT_NOT_FOUND_ERROR
);
}
if
(
StringUtils
.
isEmpty
(
byLoanNo
.
getLoanCreditResult
()))
{
throw
new
BizException
(
ExceptionCodeEnum
.
RESULT_NOT_FOUND_ERROR
);
if
(
"PASS"
.
equals
(
byLoanNo
.
getLoanCreditResult
())){
response
.
setStatus
(
1
);
response
.
setRemark
(
"提现通过"
);
}
if
(
"REFUSED"
.
equals
(
byLoanNo
.
getLoanCreditResult
())){
response
.
setStatus
(
2
);
response
.
setRemark
(
"提现拒绝,去别家看看"
);
}
return
JsonResult
.
success
(
byLoanNo
.
getLoanCreditResult
()
);
return
JsonResult
.
success
(
response
);
}
}
src/main/java/com/jqtx/windows/web/response/LoanDetailResponse.java
0 → 100644
View file @
bddf0a5d
package
com
.
jqtx
.
windows
.
web
.
response
;
import
lombok.Data
;
@Data
public
class
LoanDetailResponse
{
private
String
orderNo
;
private
Integer
status
;
private
String
remark
;
}
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