Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
cddd686f
提交
cddd686f
authored
2月 23, 2024
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
处理结算金额BUg
上级
aed8e053
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
51 行增加
和
7 行删除
+51
-7
OwnerBankNotifyMqParam.java
...ava/com/clx/performance/param/OwnerBankNotifyMqParam.java
+1
-1
OrderChildLoanComponent.java
...om/clx/performance/component/OrderChildLoanComponent.java
+3
-2
OwnerLoanPayNotifyListener.java
.../clx/performance/listener/OwnerLoanPayNotifyListener.java
+2
-2
OwnerRepaymentPayNotifyListener.java
...performance/listener/OwnerRepaymentPayNotifyListener.java
+43
-0
NbBankServiceImpl.java
...nce/service/impl/thirdparty/nbbank/NbBankServiceImpl.java
+2
-2
没有找到文件。
performance-api/src/main/java/com/clx/performance/param/Owner
LoanPay
NotifyMqParam.java
→
performance-api/src/main/java/com/clx/performance/param/Owner
Bank
NotifyMqParam.java
浏览文件 @
cddd686f
...
...
@@ -6,7 +6,7 @@ import lombok.Data;
import
javax.validation.constraints.NotNull
;
@Data
public
class
Owner
LoanPay
NotifyMqParam
{
public
class
Owner
Bank
NotifyMqParam
{
@NotNull
(
message
=
"流水号不能为空"
)
@ApiModelProperty
(
"流水号"
)
...
...
performance-web/src/main/java/com/clx/performance/component/OrderChildLoanComponent.java
浏览文件 @
cddd686f
...
...
@@ -179,6 +179,9 @@ public class OrderChildLoanComponent {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
childLoanConfirmAfterProcess
(
SettlementDriverDetail
settlementDriverDetail
,
SettlementOwnerDetail
settlementOwnerDetail
,
OrderChild
orderChild
)
{
log
.
info
(
"1.运单确认收货后借款相关处理执行"
);
//临时结算金额,借款抵扣后需要重新赋值结算金额为0,如果不需要借款相关逻辑,正常设置结算金额
settlementOwnerDetail
.
setSettlementFreight
(
settlementFreightCalc
(
orderChild
.
getSettlementWay
(),
settlementOwnerDetail
));
OwnerQuotationDetailVO
quotationDetailVO
=
orderFeign
.
getQuotationByOrderNo
(
settlementDriverDetail
.
getOrderNo
()).
getData
();
BigDecimal
freightFreezeRate
=
quotationDetailVO
.
getFreightFreezeRate
();
...
...
@@ -202,8 +205,6 @@ public class OrderChildLoanComponent {
List
<
OwnerLoanAccountRunningWaterRecord
>
runningWaterRecordList
=
ownerLoanAccountRunningWaterRecordDao
.
getListByOrderNoAndRunningWaterType
(
childNo
,
OwnerLoanAccountRunningWaterRecordEnum
.
RunWaterType
.
APPROVE_FROZEN
.
getCode
());
//临时结算金额,借款抵扣后需要重新赋值结算金额为0
settlementOwnerDetail
.
setSettlementFreight
(
settlementFreightCalc
(
orderChild
.
getSettlementWay
(),
settlementOwnerDetail
));
log
.
info
(
"4.查询当前运单号:{}, 当前货主,{}, 此运单借款冻结记录:{}"
,
childNo
,
settlementOwnerDetail
.
getOwnerUserNo
(),
JSONUtil
.
parse
(
runningWaterRecordList
));
if
(
CollectionUtil
.
isEmpty
(
runningWaterRecordList
))
{
...
...
performance-web/src/main/java/com/clx/performance/listener/OwnerLoanPayNotifyListener.java
浏览文件 @
cddd686f
package
com
.
clx
.
performance
.
listener
;
import
cn.hutool.json.JSONUtil
;
import
com.clx.performance.param.Owner
LoanPay
NotifyMqParam
;
import
com.clx.performance.param.Owner
Bank
NotifyMqParam
;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.enums.nbbank.NbBankStatusEnum
;
import
com.clx.performance.service.loan.OwnerLoanAccountService
;
...
...
@@ -28,7 +28,7 @@ public class OwnerLoanPayNotifyListener {
@RabbitListener
(
queues
=
RabbitKeyConstants
.
OWNER_LOAN_PAY_QUEUE
)
public
void
onMessage
(
String
message
)
{
log
.
info
(
"处理货主借款支付监听器执行,数据为{}"
,
message
);
Owner
LoanPayNotifyMqParam
param
=
JSONUtil
.
toBean
(
message
,
OwnerLoanPay
NotifyMqParam
.
class
);
Owner
BankNotifyMqParam
param
=
JSONUtil
.
toBean
(
message
,
OwnerBank
NotifyMqParam
.
class
);
if
(
Objects
.
equals
(
param
.
getPayStatus
(),
NbBankStatusEnum
.
Status
.
SUCCESS
.
getCode
()))
{
// 支付成功
...
...
performance-web/src/main/java/com/clx/performance/listener/OwnerRepaymentPayNotifyListener.java
0 → 100644
浏览文件 @
cddd686f
package
com
.
clx
.
performance
.
listener
;
import
cn.hutool.json.JSONUtil
;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.enums.nbbank.NbBankStatusEnum
;
import
com.clx.performance.param.OwnerBankNotifyMqParam
;
import
com.clx.performance.service.loan.OwnerLoanAccountService
;
import
com.clx.performance.service.loan.OwnerLoanRecordService
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.amqp.rabbit.annotation.RabbitListener
;
import
org.springframework.stereotype.Component
;
import
java.util.Objects
;
/**
* 处理货主还款支付监听器
*/
@Slf4j
@Component
@AllArgsConstructor
public
class
OwnerRepaymentPayNotifyListener
{
private
final
OwnerLoanRecordService
ownerLoanRecordService
;
private
final
OwnerLoanAccountService
ownerLoanAccountService
;
@RabbitListener
(
queues
=
RabbitKeyConstants
.
OWNER_LOAN_PAY_QUEUE
)
public
void
onMessage
(
String
message
)
{
log
.
info
(
"处理货主还款支付监听器执行,数据为{}"
,
message
);
OwnerBankNotifyMqParam
param
=
JSONUtil
.
toBean
(
message
,
OwnerBankNotifyMqParam
.
class
);
if
(
Objects
.
equals
(
param
.
getPayStatus
(),
NbBankStatusEnum
.
Status
.
SUCCESS
.
getCode
()))
{
// 支付成功
ownerLoanRecordService
.
paySuccess
(
param
.
getMerSeqNo
());
}
else
if
(
Objects
.
equals
(
param
.
getPayStatus
(),
NbBankStatusEnum
.
Status
.
FAIL
.
getCode
()))
{
// 支付失败
ownerLoanRecordService
.
payFail
(
param
.
getMerSeqNo
());
}
}
}
performance-web/src/main/java/com/clx/performance/service/impl/thirdparty/nbbank/NbBankServiceImpl.java
浏览文件 @
cddd686f
...
...
@@ -2,7 +2,7 @@ package com.clx.performance.service.impl.thirdparty.nbbank;
import
cn.hutool.json.JSONUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.clx.performance.param.Owner
LoanPay
NotifyMqParam
;
import
com.clx.performance.param.Owner
Bank
NotifyMqParam
;
import
com.clx.performance.component.IdGenerateSnowFlake
;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.dao.loan.BankTradeDao
;
...
...
@@ -237,7 +237,7 @@ public class NbBankServiceImpl implements NbBankService {
bankTradeDao
.
updateStatus
(
bankTrade
);
// 货主借款支付回调
if
(
Objects
.
equals
(
bankTrade
.
getOrderType
(),
BankTradeEnum
.
OrderType
.
OWNER_LOAN_RECORD
.
getCode
())){
Owner
LoanPayNotifyMqParam
param
=
new
OwnerLoanPay
NotifyMqParam
();
Owner
BankNotifyMqParam
param
=
new
OwnerBank
NotifyMqParam
();
param
.
setMerSeqNo
(
merSeqNo
);
param
.
setPayStatus
(
transStatus
);
Message
message
=
MessageBuilder
.
withBody
(
JSONUtil
.
parse
(
param
).
toString
().
getBytes
()).
build
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论