Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
b09cb1b3
提交
b09cb1b3
authored
2月 21, 2024
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
借款重新支付
上级
f18a4723
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
87 行增加
和
7 行删除
+87
-7
CarrierOwnerLoanRecordController.java
...ler/pc/loan/carrier/CarrierOwnerLoanRecordController.java
+11
-3
OwnerLoanRecordDaoImpl.java
...clx/performance/dao/impl/loan/OwnerLoanRecordDaoImpl.java
+8
-2
OwnerLoanRecordServiceImpl.java
...ormance/service/impl/loan/OwnerLoanRecordServiceImpl.java
+66
-2
OwnerLoanRecordService.java
.../clx/performance/service/loan/OwnerLoanRecordService.java
+2
-0
没有找到文件。
performance-web/src/main/java/com/clx/performance/controller/pc/loan/carrier/CarrierOwnerLoanRecordController.java
浏览文件 @
b09cb1b3
...
@@ -19,6 +19,7 @@ import org.apache.ibatis.annotations.Param;
...
@@ -19,6 +19,7 @@ import org.apache.ibatis.annotations.Param;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
@Slf4j
@Slf4j
...
@@ -47,6 +48,13 @@ public class CarrierOwnerLoanRecordController {
...
@@ -47,6 +48,13 @@ public class CarrierOwnerLoanRecordController {
return
Result
.
ok
();
return
Result
.
ok
();
}
}
@ApiOperation
(
value
=
"重新支付"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/ownerLoanRecordRetryPay"
)
public
Result
<
Object
>
ownerLoanRecordRetryPay
(
@RequestParam
(
value
=
"loanNo"
)
@NotBlank
String
loanNo
)
{
ownerLoanRecordService
.
ownerLoanRecordRetryPay
(
loanNo
);
return
Result
.
ok
();
}
@ApiOperation
(
value
=
"分页搜索货主借款列表"
,
notes
=
"<br>By:艾庆国"
)
@ApiOperation
(
value
=
"分页搜索货主借款列表"
,
notes
=
"<br>By:艾庆国"
)
@PostMapping
(
"/pageOwnerLoanRecordOfOwner"
)
@PostMapping
(
"/pageOwnerLoanRecordOfOwner"
)
@UnitCovert
(
param
=
false
)
@UnitCovert
(
param
=
false
)
...
@@ -58,7 +66,7 @@ public class CarrierOwnerLoanRecordController {
...
@@ -58,7 +66,7 @@ public class CarrierOwnerLoanRecordController {
@ApiOperation
(
value
=
"收银台信息"
,
notes
=
"<br>By:刘海泉"
)
@ApiOperation
(
value
=
"收银台信息"
,
notes
=
"<br>By:刘海泉"
)
@GetMapping
(
"/getCashierInfo"
)
@GetMapping
(
"/getCashierInfo"
)
@UnitCovert
(
param
=
false
)
@UnitCovert
(
param
=
false
)
public
Result
<
CarrierCashierInfoVO
>
getCashierInfo
(
@Param
(
"id"
)
@NotNull
(
message
=
"id不能为空"
)
Integer
id
)
{
public
Result
<
CarrierCashierInfoVO
>
getCashierInfo
(
@
Request
Param
(
"id"
)
@NotNull
(
message
=
"id不能为空"
)
Integer
id
)
{
CarrierCashierInfoVO
vo
=
ownerLoanRecordService
.
getCashierInfo
(
id
);
CarrierCashierInfoVO
vo
=
ownerLoanRecordService
.
getCashierInfo
(
id
);
return
Result
.
ok
(
vo
);
return
Result
.
ok
(
vo
);
}
}
...
@@ -67,7 +75,7 @@ public class CarrierOwnerLoanRecordController {
...
@@ -67,7 +75,7 @@ public class CarrierOwnerLoanRecordController {
@ApiOperation
(
value
=
"订单支付详情"
,
notes
=
"<br>By:刘海泉"
)
@ApiOperation
(
value
=
"订单支付详情"
,
notes
=
"<br>By:刘海泉"
)
@GetMapping
(
"/getOrderPaymentDetail"
)
@GetMapping
(
"/getOrderPaymentDetail"
)
@UnitCovert
(
param
=
false
)
@UnitCovert
(
param
=
false
)
public
Result
<
OwnerOrderPaymentDetailVO
>
getOrderPaymentDetail
(
@Param
(
"id"
)
@NotNull
(
message
=
"id不能为空"
)
Integer
id
)
{
public
Result
<
OwnerOrderPaymentDetailVO
>
getOrderPaymentDetail
(
@
Request
Param
(
"id"
)
@NotNull
(
message
=
"id不能为空"
)
Integer
id
)
{
OwnerOrderPaymentDetailVO
vo
=
ownerLoanRecordService
.
getOrderPaymentDetail
(
id
);
OwnerOrderPaymentDetailVO
vo
=
ownerLoanRecordService
.
getOrderPaymentDetail
(
id
);
return
Result
.
ok
(
vo
);
return
Result
.
ok
(
vo
);
}
}
...
@@ -75,7 +83,7 @@ public class CarrierOwnerLoanRecordController {
...
@@ -75,7 +83,7 @@ public class CarrierOwnerLoanRecordController {
@ApiOperation
(
value
=
"转账支付详情"
,
notes
=
"<br>By:刘海泉"
)
@ApiOperation
(
value
=
"转账支付详情"
,
notes
=
"<br>By:刘海泉"
)
@GetMapping
(
"/getTransferPaymentDetail"
)
@GetMapping
(
"/getTransferPaymentDetail"
)
@UnitCovert
(
param
=
false
)
@UnitCovert
(
param
=
false
)
public
Result
<
CarrierTransferPaymentDetailVO
>
getTransferPaymentDetail
(
@Param
(
"id"
)
@NotNull
(
message
=
"id不能为空"
)
Integer
id
)
{
public
Result
<
CarrierTransferPaymentDetailVO
>
getTransferPaymentDetail
(
@
Request
Param
(
"id"
)
@NotNull
(
message
=
"id不能为空"
)
Integer
id
)
{
CarrierTransferPaymentDetailVO
vo
=
ownerLoanRecordService
.
getTransferPaymentDetail
(
id
);
CarrierTransferPaymentDetailVO
vo
=
ownerLoanRecordService
.
getTransferPaymentDetail
(
id
);
return
Result
.
ok
(
vo
);
return
Result
.
ok
(
vo
);
}
}
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/loan/OwnerLoanRecordDaoImpl.java
浏览文件 @
b09cb1b3
...
@@ -98,12 +98,18 @@ public class OwnerLoanRecordDaoImpl extends BaseDaoImpl<OwnerLoanRecordMapper, O
...
@@ -98,12 +98,18 @@ public class OwnerLoanRecordDaoImpl extends BaseDaoImpl<OwnerLoanRecordMapper, O
@Override
@Override
public
boolean
updatePaySuccess
(
OwnerLoanRecord
item
)
{
public
boolean
updatePaySuccess
(
OwnerLoanRecord
item
)
{
return
false
;
return
update
(
lUdWrapper
()
.
eq
(
OwnerLoanRecord:
:
getId
,
item
.
getId
())
.
set
(
OwnerLoanRecord:
:
getStatus
,
item
.
getStatus
())
);
}
}
@Override
@Override
public
boolean
updatePayFail
(
OwnerLoanRecord
item
)
{
public
boolean
updatePayFail
(
OwnerLoanRecord
item
)
{
return
false
;
return
update
(
lUdWrapper
()
.
eq
(
OwnerLoanRecord:
:
getId
,
item
.
getId
())
.
set
(
OwnerLoanRecord:
:
getStatus
,
item
.
getStatus
())
);
}
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/loan/OwnerLoanRecordServiceImpl.java
浏览文件 @
b09cb1b3
...
@@ -498,6 +498,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
...
@@ -498,6 +498,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
payFail
(
String
loanNo
){
public
void
payFail
(
String
loanNo
){
OwnerLoanRecord
ownerLoanRecord
=
ownerLoanRecordDao
.
getOneByField
(
OwnerLoanRecord:
:
getLoanNo
,
loanNo
)
OwnerLoanRecord
ownerLoanRecord
=
ownerLoanRecordDao
.
getOneByField
(
OwnerLoanRecord:
:
getLoanNo
,
loanNo
)
.
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
.
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
...
@@ -508,11 +509,12 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
...
@@ -508,11 +509,12 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
ownerLoanRecord
.
setStatus
(
OwnerLoanRecordEnum
.
Status
.
PAY_FAIL
.
getCode
());
ownerLoanRecord
.
setStatus
(
OwnerLoanRecordEnum
.
Status
.
PAY_FAIL
.
getCode
());
ownerLoanRecordDao
.
updatePay
Success
(
ownerLoanRecord
);
ownerLoanRecordDao
.
updatePay
Fail
(
ownerLoanRecord
);
}
}
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
paySuccess
(
String
loanNo
){
public
void
paySuccess
(
String
loanNo
){
OwnerLoanRecord
ownerLoanRecord
=
ownerLoanRecordDao
.
getOneByField
(
OwnerLoanRecord:
:
getLoanNo
,
loanNo
)
OwnerLoanRecord
ownerLoanRecord
=
ownerLoanRecordDao
.
getOneByField
(
OwnerLoanRecord:
:
getLoanNo
,
loanNo
)
.
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
.
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
...
@@ -523,9 +525,71 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
...
@@ -523,9 +525,71 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
}
}
ownerLoanRecord
.
setStatus
(
OwnerLoanRecordEnum
.
Status
.
PAY_SUCCESS
.
getCode
());
ownerLoanRecord
.
setStatus
(
OwnerLoanRecordEnum
.
Status
.
PAY_SUCCESS
.
getCode
());
while
(
true
)
{
OwnerLoanAccount
ownerLoanAccount
=
ownerLoanAccountDao
.
getOneByField
(
OwnerLoanAccount:
:
getOwnerUserNo
,
ownerLoanRecord
.
getOwnerUserNo
()).
get
();
OwnerLoanAccount
entity
=
new
OwnerLoanAccount
();
entity
.
setId
(
ownerLoanAccount
.
getId
());
entity
.
setFundingAccountBalance
(
BigDecimal
.
ZERO
);
entity
.
setFundingFrozenBalance
(
BigDecimal
.
ZERO
);
entity
.
setFundingUsableBalance
(
BigDecimal
.
ZERO
);
entity
.
setVirtuallyAccountBalance
(
ownerLoanRecord
.
getLoanBalance
());
entity
.
setVirtuallyFrozenBalance
(
BigDecimal
.
ZERO
);
entity
.
setVirtuallyUsableBalance
(
ownerLoanRecord
.
getLoanBalance
());
entity
.
setModifiedTime
(
ownerLoanAccount
.
getModifiedTime
());
Integer
flag
=
ownerLoanAccountDao
.
updateAccountCAS
(
entity
,
LocalDateTime
.
now
(),
true
);
if
(
flag
==
1
)
{
//生成借款流水
initOwnerLoanRunningWaterRecord
(
ownerLoanRecord
);
//生成还款记录
initOwnerRepayment
(
ownerLoanRecord
);
ownerLoanRecordDao
.
updatePaySuccess
(
ownerLoanRecord
);
break
;
}
}
}
@Override
public
void
ownerLoanRecordRetryPay
(
String
loanNo
)
{
BankTrade
bankTrade
=
bankTradeDao
.
selectByMerchantRunningWaterNo
(
loanNo
).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
OwnerLoanRecord
ownerLoanRecord
=
ownerLoanRecordDao
.
getOneByField
(
OwnerLoanRecord:
:
getLoanNo
,
loanNo
)
.
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
borrowerConfigDao
.
selectByBorrowerIdAndType
(
ownerLoanRecord
.
getBorrowerId
(),
OwnerLoanRecordEnum
.
LoanType
.
FUND
.
getCode
())
.
orElseThrow
(
PerformanceResultEnum
.
BORROWER_CONFIG_TYPE_NOT_SUPPORT_ERROR
);
Borrower
borrower
=
borrowerDao
.
getEntityByKey
(
ownerLoanRecord
.
getBorrowerId
())
.
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
if
(
BankTradeEnum
.
TradeType
.
ORDER_DIRECT_PAY
.
getCode
().
equals
(
bankTrade
.
getTradeType
()))
{
//资金 TODO 调宁波银企直连的产品,从诚联信账户中给鑫祥和执行转账
// 订单支付
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderDirectPay
(
Long
.
valueOf
(
loanNo
),
ownerLoanRecord
.
getLoanBalance
().
intValue
(),
borrower
.
getOpenBankId
(),
borrower
.
getBankCardNo
(),
borrower
.
getName
());
ownerLoanRecord
.
setRunningWaterOpenNo
(
orderPayResultVO
.
getTransSeqNo
());
ownerLoanRecord
.
setMerchantRunningWaterNo
(
orderPayResultVO
.
getMerSeqNo
());
ownerLoanRecord
.
setRemittanceIdentificationCode
(
null
);
ownerLoanRecord
.
setStatus
(
OwnerLoanRecordEnum
.
Status
.
PAYING
.
getCode
());
ownerLoanRecord
.
setLoanResidueBalance
(
ownerLoanRecord
.
getLoanBalance
());
ownerLoanRecord
.
setLendingParty
(
borrower
.
getName
());
ownerLoanRecord
.
setLendingPartyAccount
(
borrower
.
getBankCardNo
());
}
else
{
//资金 TODO 调宁波银企直连的产品,从诚联信账户中给鑫祥和执行转账
// 转账支付
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderTransferPay
(
ownerLoanRecord
.
getLoanBalance
().
intValue
());
ownerLoanRecord
.
setRunningWaterOpenNo
(
orderPayResultVO
.
getTransSeqNo
());
ownerLoanRecord
.
setMerchantRunningWaterNo
(
orderPayResultVO
.
getMerSeqNo
());
ownerLoanRecord
.
setRemittanceIdentificationCode
(
orderPayResultVO
.
getSignNo
());
ownerLoanRecord
.
setStatus
(
OwnerLoanRecordEnum
.
Status
.
PAYING
.
getCode
());
ownerLoanRecord
.
setLoanResidueBalance
(
ownerLoanRecord
.
getLoanBalance
());
ownerLoanRecord
.
setLendingParty
(
null
);
ownerLoanRecord
.
setLendingPartyAccount
(
null
);
}
// 更新借款支付信息
ownerLoanRecordDao
.
updatePay
(
ownerLoanRecord
);
ownerLoanRecordDao
.
updatePaySuccess
(
ownerLoanRecord
);
}
}
public
void
generateFrozenOwnerLoanRunningWater
(
OwnerLoanRecord
ownerLoanRecord
,
String
childNo
,
BigDecimal
orderChildPrice
)
{
public
void
generateFrozenOwnerLoanRunningWater
(
OwnerLoanRecord
ownerLoanRecord
,
String
childNo
,
BigDecimal
orderChildPrice
)
{
...
...
performance-web/src/main/java/com/clx/performance/service/loan/OwnerLoanRecordService.java
浏览文件 @
b09cb1b3
...
@@ -45,4 +45,6 @@ public interface OwnerLoanRecordService {
...
@@ -45,4 +45,6 @@ public interface OwnerLoanRecordService {
void
payFail
(
String
loanNo
);
void
payFail
(
String
loanNo
);
void
paySuccess
(
String
loanNo
);
void
paySuccess
(
String
loanNo
);
void
ownerLoanRecordRetryPay
(
String
loanNo
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论