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
44d3dbe2
Commit
44d3dbe2
authored
Nov 17, 2023
by
LSL
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
本息服初始化
parent
3ba6c9ab
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
BackedCommand.java
src/main/java/com/jqtx/windows/command/BackedCommand.java
+5
-0
BackedCommandnew.java
src/main/java/com/jqtx/windows/command/BackedCommandnew.java
+5
-0
LoanRepayComponent.java
...n/java/com/jqtx/windows/component/LoanRepayComponent.java
+2
-0
LoanReapyComponentImpl.java
...m/jqtx/windows/component/impl/LoanReapyComponentImpl.java
+13
-2
No files found.
src/main/java/com/jqtx/windows/command/BackedCommand.java
View file @
44d3dbe2
...
...
@@ -52,6 +52,11 @@ public class BackedCommand extends AbstractCommand {
public
JsonResult
execute
()
{
String
request
=
RuntimeContextHolder
.
currentRuntimeContext
().
getRequestBody
();
BackedRequest
backedRequest
=
JSONObject
.
parseObject
(
request
,
BackedRequest
.
class
);
//查询还款编号
RepayModel
repayModel
=
loanRepayComponent
.
getByBackedNo
(
backedRequest
.
getBackedNo
());
if
(
repayModel
!=
null
){
throw
new
BizException
(
"还款单已存在!"
);
}
try
{
//生成 windows_repay 信息
creditRepay
(
backedRequest
);
...
...
src/main/java/com/jqtx/windows/command/BackedCommandnew.java
View file @
44d3dbe2
...
...
@@ -49,6 +49,11 @@ public class BackedCommandnew {
@Transactional
public
JsonResult
execute
(
BackedRequest
backedRequest
)
{
//查询还款编号
RepayModel
repayModel
=
loanRepayComponent
.
getByBackedNo
(
backedRequest
.
getBackedNo
());
if
(
repayModel
!=
null
){
throw
new
BizException
(
"还款单已存在!"
);
}
try
{
//生成 windows_repay 信息
creditRepay
(
backedRequest
);
...
...
src/main/java/com/jqtx/windows/component/LoanRepayComponent.java
View file @
44d3dbe2
...
...
@@ -5,4 +5,6 @@ import com.jqtx.windows.component.model.RepayModel;
public
interface
LoanRepayComponent
{
int
insert
(
RepayModel
repayModel
);
RepayModel
getByBackedNo
(
String
backedNo
);
}
src/main/java/com/jqtx/windows/component/impl/LoanReapyComponentImpl.java
View file @
44d3dbe2
...
...
@@ -3,14 +3,16 @@ package com.jqtx.windows.component.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
com.jqtx.windows.component.LoanPlanComponent
;
import
com.jqtx.windows.component.LoanRepayComponent
;
import
com.jqtx.windows.component.model.LoanModel
;
import
com.jqtx.windows.component.model.RepayModel
;
import
com.jqtx.windows.repository.entity.WindowsPlan
;
import
com.jqtx.windows.repository.entity.WindowsRepay
;
import
com.jqtx.windows.repository.entity.*
;
import
com.jqtx.windows.repository.mapper.WindowsPlanMapper
;
import
com.jqtx.windows.repository.mapper.WindowsRepayMapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
@Service
public
class
LoanReapyComponentImpl
implements
LoanRepayComponent
{
...
...
@@ -23,4 +25,13 @@ public class LoanReapyComponentImpl implements LoanRepayComponent {
int
i
=
windowsRepayMapper
.
insertSelective
(
windowsPlan
);
return
i
;
}
@Override
public
RepayModel
getByBackedNo
(
String
backedNo
)
{
WindowsRepayExample
example
=
new
WindowsRepayExample
();
WindowsRepayExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andBackedNoEqualTo
(
backedNo
);
List
<
WindowsRepay
>
windowsRepays
=
windowsRepayMapper
.
selectByExample
(
example
);
return
windowsRepays
.
stream
().
map
(
m
->
BeanUtil
.
toBean
(
m
,
RepayModel
.
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