Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
b16f3d32
提交
b16f3d32
authored
2月 22, 2024
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
转账支付需要返回识别码
上级
0b7548a0
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
77 行增加
和
44 行删除
+77
-44
OwnerRepaymentParam.java
...erformance/param/pc/loan/carrier/OwnerRepaymentParam.java
+1
-1
TempBankController.java
...m/clx/performance/controller/temp/TempBankController.java
+2
-2
OwnerLoanPayNotifyListener.java
.../clx/performance/listener/OwnerLoanPayNotifyListener.java
+4
-0
OwnerLoanAccountServiceImpl.java
...rmance/service/impl/loan/OwnerLoanAccountServiceImpl.java
+7
-32
OwnerLoanRecordServiceImpl.java
...ormance/service/impl/loan/OwnerLoanRecordServiceImpl.java
+54
-3
NbBankServiceImpl.java
...nce/service/impl/thirdparty/nbbank/NbBankServiceImpl.java
+6
-3
OwnerLoanAccountService.java
...clx/performance/service/loan/OwnerLoanAccountService.java
+0
-2
OwnerLoanRecordService.java
.../clx/performance/service/loan/OwnerLoanRecordService.java
+2
-0
NbBankService.java
.../performance/service/thirdparty/nbbank/NbBankService.java
+1
-1
没有找到文件。
performance-api/src/main/java/com/clx/performance/param/pc/loan/carrier/OwnerRepaymentParam.java
浏览文件 @
b16f3d32
...
...
@@ -9,7 +9,7 @@ import lombok.Setter;
@Setter
public
class
OwnerRepaymentParam
{
@ApiModelProperty
(
"
借
款单号"
)
@ApiModelProperty
(
"
还
款单号"
)
private
Long
repaymentNo
;
@ApiModelProperty
(
"支付通道:1订单支付 2转账支付"
)
...
...
performance-web/src/main/java/com/clx/performance/controller/temp/TempBankController.java
浏览文件 @
b16f3d32
...
...
@@ -39,7 +39,7 @@ public class TempBankController {
// return Result.ok(bankService.orderDirectPay(null,2,"313332082914","86041110000076809", "黑玫瑰"));
// return Result.ok(bankService.orderDirectPay(null,2,"313332082914","86041110000075926", "客户客户"));
return
Result
.
ok
(
bankService
.
orderDirectPay
(
null
,
1
,
"313332082914"
,
"86031110000180611"
,
"槟榔王"
));
return
Result
.
ok
(
bankService
.
orderDirectPay
(
null
,
""
,
1
,
"313332082914"
,
"86031110000180611"
,
"槟榔王"
));
}
@ApiOperation
(
value
=
"订单支付1"
,
notes
=
"<br>By:艾庆国"
)
...
...
@@ -48,7 +48,7 @@ public class TempBankController {
// return Result.ok(bankService.orderDirectPay(null,2,"313332082914","86041110000076809", "黑玫瑰"));
// return Result.ok(bankService.orderDirectPay(null,2,"313332082914","86041110000075926", "客户客户"));
return
Result
.
ok
(
bankService
.
orderDirectPay
(
null
,
1
,
"313332082914"
,
payAcctNo
,
payAcctNm
));
return
Result
.
ok
(
bankService
.
orderDirectPay
(
null
,
""
,
1
,
"313332082914"
,
payAcctNo
,
payAcctNm
));
}
@ApiOperation
(
value
=
"查询"
,
notes
=
"<br>By:艾庆国"
)
...
...
performance-web/src/main/java/com/clx/performance/listener/OwnerLoanPayNotifyListener.java
浏览文件 @
b16f3d32
...
...
@@ -4,6 +4,7 @@ import cn.hutool.json.JSONUtil;
import
com.clx.performance.param.OwnerLoanPayNotifyMqParam
;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.enums.nbbank.NbBankStatusEnum
;
import
com.clx.performance.service.loan.OwnerLoanAccountService
;
import
com.clx.performance.service.loan.OwnerLoanRecordService
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -22,6 +23,8 @@ public class OwnerLoanPayNotifyListener {
private
final
OwnerLoanRecordService
ownerLoanRecordService
;
private
final
OwnerLoanAccountService
ownerLoanAccountService
;
@RabbitListener
(
queues
=
RabbitKeyConstants
.
OWNER_LOAN_PAY_QUEUE
)
public
void
onMessage
(
String
message
)
{
log
.
info
(
"处理货主借款支付监听器执行,数据为{}"
,
message
);
...
...
@@ -30,6 +33,7 @@ public class OwnerLoanPayNotifyListener {
if
(
Objects
.
equals
(
param
.
getPayStatus
(),
NbBankStatusEnum
.
Status
.
SUCCESS
.
getCode
()))
{
// 支付成功
ownerLoanRecordService
.
paySuccess
(
param
.
getMerSeqNo
());
}
else
if
(
Objects
.
equals
(
param
.
getPayStatus
(),
NbBankStatusEnum
.
Status
.
FAIL
.
getCode
()))
{
// 支付失败
...
...
performance-web/src/main/java/com/clx/performance/service/impl/loan/OwnerLoanAccountServiceImpl.java
浏览文件 @
b16f3d32
...
...
@@ -113,55 +113,30 @@ public class OwnerLoanAccountServiceImpl implements OwnerLoanAccountService {
return
ownerAccountVO
;
}
/**
* 货主借款后执行阻塞流程的相关运单
*
* @param ownerUserNo
*/
@Override
public
void
orderChildLoanProcess
(
Long
ownerUserNo
)
{
List
<
OrderChildLoanRetryRecord
>
orderChildLoanRetryRecordList
=
orderChildLoanRetryRecordDao
.
selectListByIdAsc
();
for
(
OrderChildLoanRetryRecord
retryRecord
:
orderChildLoanRetryRecordList
)
{
//生成借款标识
SettlementDriverDetail
settlementDriverDetail
=
settlementDriverDetailDao
.
getEntityByKey
(
retryRecord
.
getSettlementDriverId
()).
get
();
SettlementOwnerDetail
settlementOwnerDetail
=
settlementOwnerDetailDao
.
getEntityByKey
(
retryRecord
.
getSettlementOwnerId
()).
get
();
OrderChild
orderChild
=
orderChildDao
.
getByChildNo
(
settlementDriverDetail
.
getChildNo
()).
get
();
OwnerLoanMqDTO
dto
=
new
OwnerLoanMqDTO
();
dto
.
setSettlementOwnerDetail
(
settlementOwnerDetail
);
dto
.
setSettlementDriverDetail
(
settlementDriverDetail
);
dto
.
setOrderChild
(
orderChild
);
//货主借款监听器处理
Message
message
=
MessageBuilder
.
withBody
(
JSONUtil
.
parse
(
dto
).
toString
().
getBytes
()).
build
();
rabbitTemplate
.
send
(
RabbitKeyConstants
.
OWNER_LOAN_EXCHANGE
,
RabbitKeyConstants
.
OWNER_LOAN_ROUTE_KEY
,
message
);
orderChildLoanRetryRecordDao
.
deleteByKey
(
retryRecord
.
getId
());
}
}
@Override
public
void
ownerRepayment
(
OwnerRepaymentParam
param
)
{
OwnerRepayment
ownerRepayment
=
ownerRepaymentDao
.
getOneByField
(
OwnerRepayment:
:
getRepaymentNo
,
param
.
getRepaymentNo
()).
get
();
OwnerLoanRecord
ownerLoanRecord
=
ownerLoanRecordDao
.
getOneByField
(
OwnerLoanRecord:
:
getLoanNo
,
ownerRepayment
.
getLoanNo
()).
get
();
BankTrade
bankTrade
=
new
BankTrade
();
if
(
OwnerLoanRecordEnum
.
PayChannel
.
ORDER_DIRECT_PAY
.
getCode
().
equals
(
param
.
getPayChannel
()))
{
// 订单支付
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderDirectPay
(
ownerRepayment
.
getRepaymentNo
(),
ownerRepayment
.
getRepaymentBalance
().
intValue
(),
null
,
null
,
""
);
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderDirectPay
(
ownerRepayment
.
getRepaymentNo
(),
"还款单"
,
ownerRepayment
.
getRepaymentBalance
().
intValue
(),
ownerLoanRecord
.
getPayeeBankCode
(),
ownerLoanRecord
.
getPayeeAccount
(),
ownerLoanRecord
.
getPayee
());
ownerRepayment
.
setRunningWaterOpenNo
(
orderPayResultVO
.
getTransSeqNo
());
ownerRepayment
.
setMerchantRunningWaterNo
(
orderPayResultVO
.
getMerSeqNo
());
ownerRepayment
.
setStatus
(
OwnerLoanRecordEnum
.
Status
.
PAYING
.
getCode
());
bankTrade
.
setTradeType
(
BankTradeEnum
.
TradeType
.
ORDER_DIRECT_PAY
.
getCode
());
}
else
{
//TODO 是否转账是部分支付
// 转账支付
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderTransferPay
(
ownerLoanRecord
.
getLoanBalance
().
intValue
());
bankTrade
.
setTradeType
(
BankTradeEnum
.
TradeType
.
ORDER_TRANSFER_PAY
.
getCode
());
}
ownerRepayment
.
setStatus
(
OwnerLoanRecordEnum
.
Status
.
PAYING
.
getCode
());
// 更新还款支付信息
//ownerRepaymentDao.updatePay(ownerLoanRecord);
...
...
@@ -170,7 +145,7 @@ public class OwnerLoanAccountServiceImpl implements OwnerLoanAccountService {
bankTrade
.
setAmount
(
ownerLoanRecord
.
getLoanBalance
());
bankTrade
.
setMerchantRunningWaterNo
(
ownerLoanRecord
.
getMerchantRunningWaterNo
());
bankTrade
.
setRunningWaterOpenNo
(
ownerLoanRecord
.
getRunningWaterOpenNo
());
bankTrade
.
setRemark
(
"还款单"
);
// 保存银行交易记录
bankTradeDao
.
saveEntity
(
bankTrade
);
...
...
performance-web/src/main/java/com/clx/performance/service/impl/loan/OwnerLoanRecordServiceImpl.java
浏览文件 @
b16f3d32
...
...
@@ -14,14 +14,19 @@ import com.clx.performance.config.ClxMessageConfig;
import
com.clx.performance.config.loan.ClxPayeeConfig
;
import
com.clx.performance.config.loan.PaymentFromConfig
;
import
com.clx.performance.config.nbbank.NbBankConfig
;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.dao.OrderChildDao
;
import
com.clx.performance.dao.OwnerBindCardRecordDao
;
import
com.clx.performance.dao.loan.BorrowerDao
;
import
com.clx.performance.dao.loan.OwnerLoanAccountDao
;
import
com.clx.performance.dao.loan.OwnerLoanAccountRunningWaterRecordDao
;
import
com.clx.performance.dao.loan.OwnerLoanRecordDao
;
import
com.clx.performance.dao.loan.OwnerRepaymentDao
;
import
com.clx.performance.dao.settle.SettlementDriverDetailDao
;
import
com.clx.performance.dao.settle.SettlementOwnerDetailDao
;
import
com.clx.performance.dto.LoanBalanceDTO
;
import
com.clx.performance.dao.loan.*
;
import
com.clx.performance.dto.OwnerLoanMqDTO
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.enums.RunningWaterTypeEnum
;
import
com.clx.performance.enums.loan.BankTradeEnum
;
...
...
@@ -30,8 +35,11 @@ import com.clx.performance.enums.loan.OwnerLoanRecordEnum;
import
com.clx.performance.enums.loan.OwnerRePaymentEnum
;
import
com.clx.performance.enums.nbbank.NbBankStatusEnum
;
import
com.clx.performance.extranal.user.impl.OwnerInfoServiceImpl
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OwnerBindCardRecord
;
import
com.clx.performance.model.loan.*
;
import
com.clx.performance.model.settle.SettlementDriverDetail
;
import
com.clx.performance.model.settle.SettlementOwnerDetail
;
import
com.clx.performance.param.pc.loan.carrier.*
;
import
com.clx.performance.param.pc.loan.owner.ExportPaymentApplicationFormParam
;
import
com.clx.performance.param.pc.loan.owner.OwnerLoanRecordParam
;
...
...
@@ -59,6 +67,9 @@ import com.msl.user.data.UserSessionData;
import
com.msl.user.utils.TokenUtil
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.core.MessageBuilder
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -108,6 +119,17 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
private
final
ClxMessageOpenapiFeign
clxMessageOpenapiFeign
;
private
final
ClxMessageConfig
messageConfig
;
private
final
OrderChildLoanRetryRecordDao
orderChildLoanRetryRecordDao
;
private
final
SettlementDriverDetailDao
settlementDriverDetailDao
;
private
final
SettlementOwnerDetailDao
settlementOwnerDetailDao
;
private
final
OrderChildDao
orderChildDao
;
private
final
RabbitTemplate
rabbitTemplate
;
@Override
public
IPage
<
OwnerLoanRecordVO
>
pageOwnerLoanRecord
(
PageCarrierOwnerLoanRecordParam
param
)
{
IPage
<
OwnerLoanRecord
>
page
=
ownerLoanRecordDao
.
pageOwnerLoanRecord
(
param
);
...
...
@@ -221,7 +243,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
bankTrade
.
setRemark
(
"借款单"
);
if
(
OwnerLoanRecordEnum
.
PayChannel
.
ORDER_DIRECT_PAY
.
getCode
().
equals
(
param
.
getPayChannel
()))
{
// 订单支付
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderDirectPay
(
param
.
getLoanNo
(),
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderDirectPay
(
param
.
getLoanNo
(),
"借款单"
,
ownerLoanRecord
.
getLoanBalance
().
intValue
(),
borrower
.
getOpenBankId
(),
borrower
.
getBankCardNo
(),
borrower
.
getName
());
ownerLoanRecord
.
setRunningWaterOpenNo
(
orderPayResultVO
.
getTransSeqNo
());
ownerLoanRecord
.
setMerchantRunningWaterNo
(
orderPayResultVO
.
getMerSeqNo
());
...
...
@@ -486,7 +508,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
if
(
OwnerLoanRecordEnum
.
PayChannel
.
ORDER_DIRECT_PAY
.
getCode
().
equals
(
param
.
getPayChannel
()))
{
//资金 TODO 调宁波银企直连的产品,从诚联信账户中给鑫祥和执行转账
// 订单支付
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderDirectPay
(
param
.
getLoanNo
(),
NbBankOrderPayResultVO
orderPayResultVO
=
bankService
.
orderDirectPay
(
param
.
getLoanNo
(),
"借款单"
,
ownerLoanRecord
.
getLoanBalance
().
intValue
(),
borrower
.
getOpenBankId
(),
borrower
.
getBankCardNo
(),
borrower
.
getName
());
ownerLoanRecord
.
setRunningWaterOpenNo
(
orderPayResultVO
.
getTransSeqNo
());
ownerLoanRecord
.
setMerchantRunningWaterNo
(
orderPayResultVO
.
getMerSeqNo
());
...
...
@@ -560,7 +582,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
.
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
if
(
Objects
.
equals
(
ownerLoanRecord
.
getStatus
(),
OwnerLoanRecordEnum
.
Status
.
PAYING
.
getCode
()))
{
log
.
info
(
"借款单非支付中状态, loanNo:{}"
,
bankTrade
.
getRelatio
nNo
());
log
.
info
(
"借款单非支付中状态, loanNo:{}"
,
ownerLoanRecord
.
getLoa
nNo
());
return
;
}
...
...
@@ -584,10 +606,39 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
//生成还款记录
initOwnerRepayment
(
ownerLoanRecord
);
ownerLoanRecordDao
.
updateStatusById
(
ownerLoanRecord
);
//执行货主未处理借款标志的计费(运单确认生成后因为借款不够阻塞流程的相关计费进行处理)
orderChildLoanProcess
(
ownerLoanRecord
.
getOwnerUserNo
());
break
;
}
}
}
/**
* 执行货主未处理借款标志的计费
* @param ownerUserNo
*/
@Override
public
void
orderChildLoanProcess
(
Long
ownerUserNo
)
{
List
<
OrderChildLoanRetryRecord
>
orderChildLoanRetryRecordList
=
orderChildLoanRetryRecordDao
.
selectListByIdAsc
();
for
(
OrderChildLoanRetryRecord
retryRecord
:
orderChildLoanRetryRecordList
)
{
//生成借款标识
SettlementDriverDetail
settlementDriverDetail
=
settlementDriverDetailDao
.
getEntityByKey
(
retryRecord
.
getSettlementDriverId
()).
get
();
SettlementOwnerDetail
settlementOwnerDetail
=
settlementOwnerDetailDao
.
getEntityByKey
(
retryRecord
.
getSettlementOwnerId
()).
get
();
OrderChild
orderChild
=
orderChildDao
.
getByChildNo
(
settlementDriverDetail
.
getChildNo
()).
get
();
OwnerLoanMqDTO
dto
=
new
OwnerLoanMqDTO
();
dto
.
setSettlementOwnerDetail
(
settlementOwnerDetail
);
dto
.
setSettlementDriverDetail
(
settlementDriverDetail
);
dto
.
setOrderChild
(
orderChild
);
//货主借款监听器处理
Message
message
=
MessageBuilder
.
withBody
(
JSONUtil
.
parse
(
dto
).
toString
().
getBytes
()).
build
();
rabbitTemplate
.
send
(
RabbitKeyConstants
.
OWNER_LOAN_EXCHANGE
,
RabbitKeyConstants
.
OWNER_LOAN_ROUTE_KEY
,
message
);
orderChildLoanRetryRecordDao
.
deleteByKey
(
retryRecord
.
getId
());
}
}
@Override
...
...
performance-web/src/main/java/com/clx/performance/service/impl/thirdparty/nbbank/NbBankServiceImpl.java
浏览文件 @
b16f3d32
...
...
@@ -83,7 +83,7 @@ public class NbBankServiceImpl implements NbBankService {
* @param payAcctNm 付款户名
*/
@Override
public
NbBankOrderPayResultVO
orderDirectPay
(
Long
loanNo
,
Integer
amount
,
public
NbBankOrderPayResultVO
orderDirectPay
(
Long
loanNo
,
String
remark
,
Integer
amount
,
String
payAcctOpenBankId
,
String
payAcctNo
,
String
payAcctNm
)
{
String
merSeqNo
=
idGenerateSnowFlake
.
nextIdToString
(
1L
);
...
...
@@ -94,7 +94,7 @@ public class NbBankServiceImpl implements NbBankService {
String
transSeqNo
=
data
.
getString
(
"transSeqNo"
);
if
(
StringUtils
.
isBlank
(
transSeqNo
))
{
log
.
info
(
"宁波银行订单支付失败,
借款
单号{},返回结果:{}"
,
loanNo
,
data
);
log
.
info
(
"宁波银行订单支付失败,单号{},返回结果:{}"
,
loanNo
,
data
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
NB_BANK_ORDER_PAY_ERROR
);
}
NbBankOrderPayResultVO
result
=
new
NbBankOrderPayResultVO
();
...
...
@@ -242,10 +242,13 @@ public class NbBankServiceImpl implements NbBankService {
param
.
setPayStatus
(
transStatus
);
Message
message
=
MessageBuilder
.
withBody
(
JSONUtil
.
parse
(
param
).
toString
().
getBytes
()).
build
();
//执行解绑自有车辆处理逻辑,将绑定记录正常改为取消
if
(
"借款单"
.
equals
(
bankTrade
.
getRemark
()))
{
//执行借款支付成功通知
rabbitTemplate
.
send
(
RabbitKeyConstants
.
OWNER_LOAN_EXCHANGE
,
RabbitKeyConstants
.
OWNER_LOAN_PAY_ROUTE_KEY
,
message
);
}
}
...
...
performance-web/src/main/java/com/clx/performance/service/loan/OwnerLoanAccountService.java
浏览文件 @
b16f3d32
...
...
@@ -19,7 +19,5 @@ public interface OwnerLoanAccountService {
OwnerAccountVO
getOwnerLoanAccount
();
void
orderChildLoanProcess
(
Long
ownerUserNo
);
void
ownerRepayment
(
OwnerRepaymentParam
param
);
}
performance-web/src/main/java/com/clx/performance/service/loan/OwnerLoanRecordService.java
浏览文件 @
b16f3d32
...
...
@@ -55,4 +55,6 @@ public interface OwnerLoanRecordService {
String
sendOrderPaySms
(
String
mobile
,
String
payee
,
String
payeeAccount
);
void
ownerLoanRecordSubmitNbBank
(
CarrierOwnerLoanRecordApproveParam
param
);
void
orderChildLoanProcess
(
Long
ownerUserNo
);
}
performance-web/src/main/java/com/clx/performance/service/thirdparty/nbbank/NbBankService.java
浏览文件 @
b16f3d32
...
...
@@ -10,7 +10,7 @@ public interface NbBankService {
NbBankOrderPayResultVO
orderTransferPay
(
Integer
amount
);
NbBankOrderPayResultVO
orderDirectPay
(
Long
loanNo
,
Integer
amount
,
NbBankOrderPayResultVO
orderDirectPay
(
Long
loanNo
,
String
remark
,
Integer
amount
,
String
payAcctOpenBankId
,
String
payAcctNo
,
String
payAcctNm
);
NbBankOrderResultVO
getResult
(
String
merSeqNo
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论