Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
f32318ad
提交
f32318ad
authored
6月 27, 2024
作者:
胡宁宁
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
如果运费为负,那么保证金冻结为0元
上级
d1507afc
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
23 行增加
和
8 行删除
+23
-8
PayPlatformFeeParam.java
...clx/performance/param/pc/payment/PayPlatformFeeParam.java
+4
-0
OrderChildPoundAuditServiceImpl.java
...ormance/service/impl/OrderChildPoundAuditServiceImpl.java
+6
-2
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+7
-6
PaymentServiceImpl.java
.../com/clx/performance/service/impl/PaymentServiceImpl.java
+6
-0
没有找到文件。
performance-api/src/main/java/com/clx/performance/param/pc/payment/PayPlatformFeeParam.java
浏览文件 @
f32318ad
...
@@ -20,6 +20,10 @@ public class PayPlatformFeeParam {
...
@@ -20,6 +20,10 @@ public class PayPlatformFeeParam {
@ApiModelProperty
(
value
=
"金额"
,
example
=
"2356"
,
dataType
=
"int"
)
@ApiModelProperty
(
value
=
"金额"
,
example
=
"2356"
,
dataType
=
"int"
)
Integer
figure
;
Integer
figure
;
@ApiModelProperty
(
value
=
"最新冻结金额金额"
,
example
=
"2356"
,
dataType
=
"int"
)
Integer
figureNew
;
@NotBlank
(
message
=
"交易单号不能为空"
)
@NotBlank
(
message
=
"交易单号不能为空"
)
@ApiModelProperty
(
value
=
"交易单号"
,
example
=
"2356"
,
dataType
=
"String"
)
@ApiModelProperty
(
value
=
"交易单号"
,
example
=
"2356"
,
dataType
=
"String"
)
String
tradeNo
;
String
tradeNo
;
...
...
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildPoundAuditServiceImpl.java
浏览文件 @
f32318ad
...
@@ -156,7 +156,7 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
...
@@ -156,7 +156,7 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
//判断是否平衡冻结金额
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
orderChild
.
getChildNo
(),
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
orderChild
.
getChildNo
(),
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
//保存运单日志数据
//保存运单日志数据
orderChildLogService
.
saveOrderChildLog
(
param
.
getChildNo
(),
type
,
OrderChildLogEnum
.
Type
.
getByCode
(
type
).
isPresent
()
?
OrderChildLogEnum
.
Type
.
getByCode
(
type
).
get
().
getMsg
()
:
""
,
orderChildLogService
.
saveOrderChildLog
(
param
.
getChildNo
(),
type
,
OrderChildLogEnum
.
Type
.
getByCode
(
type
).
isPresent
()
?
OrderChildLogEnum
.
Type
.
getByCode
(
type
).
get
().
getMsg
()
:
""
,
...
@@ -167,11 +167,12 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
...
@@ -167,11 +167,12 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
/***
/***
* 平衡司机冻结保证金
* 平衡司机冻结保证金
*/
*/
public
void
paymentChangePlatformFee
(
String
childNo
,
BigDecimal
changeDeposite
){
public
void
paymentChangePlatformFee
(
String
childNo
,
BigDecimal
changeDeposite
,
BigDecimal
figureNew
){
if
(
changeDeposite
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
if
(
changeDeposite
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
PayPlatformFeeParam
payPlatformFeeParam
=
new
PayPlatformFeeParam
();
PayPlatformFeeParam
payPlatformFeeParam
=
new
PayPlatformFeeParam
();
payPlatformFeeParam
.
setTradeNo
(
childNo
);
payPlatformFeeParam
.
setTradeNo
(
childNo
);
payPlatformFeeParam
.
setFigure
(
changeDeposite
.
intValue
());
payPlatformFeeParam
.
setFigure
(
changeDeposite
.
intValue
());
payPlatformFeeParam
.
setFigureNew
(
figureNew
.
intValue
());
//冻结司机押金
//冻结司机押金
paymentService
.
paymentChangePlatformFee
(
payPlatformFeeParam
);
paymentService
.
paymentChangePlatformFee
(
payPlatformFeeParam
);
}
}
...
@@ -226,6 +227,9 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
...
@@ -226,6 +227,9 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
//本次调整金额
//本次调整金额
BigDecimal
platformServiceFeeNew
=
BigDecimal
.
ZERO
;
BigDecimal
platformServiceFeeNew
=
BigDecimal
.
ZERO
;
log
.
info
(
"运单号 {} ,原始冻结金额 {} "
,
orderChild
.
getChildNo
(),
platformServiceFee
);
log
.
info
(
"运单号 {} ,原始冻结金额 {} "
,
orderChild
.
getChildNo
(),
platformServiceFee
);
if
(
freight
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
return
PaymentDTO
.
builder
().
changeDeposit
(
platformServiceFee
.
multiply
(
new
BigDecimal
(
"-1"
))).
platformServiceFeeNew
(
platformServiceFeeNew
).
build
();
}
/**
/**
* 如果之前未冻结保证金,本次不调整
* 如果之前未冻结保证金,本次不调整
* 如果 平台服务费率 为0 本次不处理
* 如果 平台服务费率 为0 本次不处理
...
...
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
f32318ad
...
@@ -819,7 +819,7 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -819,7 +819,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
}
else
{
}
else
{
//计算司机保证金
//计算司机保证金
...
@@ -837,7 +837,7 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -837,7 +837,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
}
}
}
}
...
@@ -1018,7 +1018,7 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -1018,7 +1018,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
}
else
{
}
else
{
//计算司机保证金
//计算司机保证金
...
@@ -1039,7 +1039,7 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -1039,7 +1039,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
}
}
}
}
...
@@ -1047,11 +1047,12 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -1047,11 +1047,12 @@ public class OrderChildServiceImpl implements OrderChildService {
/***
/***
* 平衡司机冻结保证金
* 平衡司机冻结保证金
*/
*/
public
void
paymentChangePlatformFee
(
String
childNo
,
BigDecimal
changeDeposite
){
public
void
paymentChangePlatformFee
(
String
childNo
,
BigDecimal
changeDeposite
,
BigDecimal
deposite
){
if
(
changeDeposite
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
if
(
changeDeposite
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
PayPlatformFeeParam
payPlatformFeeParam
=
new
PayPlatformFeeParam
();
PayPlatformFeeParam
payPlatformFeeParam
=
new
PayPlatformFeeParam
();
payPlatformFeeParam
.
setTradeNo
(
childNo
);
payPlatformFeeParam
.
setTradeNo
(
childNo
);
payPlatformFeeParam
.
setFigure
(
changeDeposite
.
intValue
());
payPlatformFeeParam
.
setFigure
(
changeDeposite
.
intValue
());
payPlatformFeeParam
.
setFigureNew
(
deposite
.
intValue
());
//冻结司机押金
//冻结司机押金
paymentService
.
paymentChangePlatformFee
(
payPlatformFeeParam
);
paymentService
.
paymentChangePlatformFee
(
payPlatformFeeParam
);
}
}
...
@@ -1299,7 +1300,7 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -1299,7 +1300,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
}
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/PaymentServiceImpl.java
浏览文件 @
f32318ad
...
@@ -43,6 +43,7 @@ import java.security.GeneralSecurityException;
...
@@ -43,6 +43,7 @@ import java.security.GeneralSecurityException;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.UUID
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -253,8 +254,13 @@ public class PaymentServiceImpl implements PaymentService {
...
@@ -253,8 +254,13 @@ public class PaymentServiceImpl implements PaymentService {
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
);
}
}
if
(
notify
.
getCode
()
!=
0
)
{
if
(
notify
.
getCode
()
!=
0
)
{
if
(
Objects
.
equals
(
notify
.
getCode
(),
""
)){
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"预估接单保证金"
+
new
BigDecimal
(
param
.
getFigureNew
()).
movePointLeft
(
2
)+
"元,车主钱包余额不足,请先充值"
);
}
else
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
notify
.
getMsg
());
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
notify
.
getMsg
());
}
}
}
return
notify
;
return
notify
;
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论