Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
b2426499
提交
b2426499
authored
5月 09, 2024
作者:
李瑞鑫
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sonar 检测问题修改
上级
2f0aa4cc
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
18 行增加
和
14 行删除
+18
-14
WalletResidueDTO.java
...ava/com/clx/performance/dto/payment/WalletResidueDTO.java
+7
-7
OrderNoGenerateJob.java
...main/java/com/clx/performance/job/OrderNoGenerateJob.java
+3
-3
PaymentServiceImpl.java
.../com/clx/performance/service/impl/PaymentServiceImpl.java
+8
-4
没有找到文件。
performance-web/src/main/java/com/clx/performance/dto/payment/WalletResidueDTO.java
浏览文件 @
b2426499
...
...
@@ -14,19 +14,19 @@ import java.math.BigDecimal;
*/
public
class
WalletResidueDTO
{
//余额
@ApiModelProperty
(
value
=
"余额"
,
dataType
=
"double"
,
example
=
"11.10"
)
private
Long
residue
;
//冻结的资金
@ApiModelProperty
(
value
=
"冻结的资金"
,
dataType
=
"double"
,
example
=
"11.10"
)
private
Long
frozen
;
//保证金
@ApiModelProperty
(
value
=
"保证金"
,
dataType
=
"double"
,
example
=
"11.10"
)
private
Double
deposit
;
//状态0锁定1正常2异常
@ApiModelProperty
(
value
=
"状态0锁定1正常2异常"
,
dataType
=
"int"
,
example
=
"1"
)
private
Integer
status
;
//是否设置交易密码0没有1有
@ApiModelProperty
(
value
=
"是否设置交易密码0没有1有"
,
dataType
=
"String"
,
example
=
"1"
)
private
String
pwd
;
...
...
@@ -56,7 +56,7 @@ public class WalletResidueDTO {
}
@JsonGetter
(
value
=
"frozen"
)
public
BigDecimal
frozenFormat
()
{
return
new
BigDecimal
(
new
Double
(
this
.
frozen
)/
100
);
return
BigDecimal
.
valueOf
(
new
Double
(
this
.
frozen
)/
100
);
}
@JsonGetter
(
value
=
"residue"
)
public
Double
residueFormat
()
{
...
...
@@ -64,7 +64,7 @@ public class WalletResidueDTO {
}
@JsonGetter
(
value
=
"deposit"
)
public
Double
depositFormat
()
{
return
new
Double
(
this
.
deposit
)
/
100
;
return
this
.
deposit
/
100
;
}
public
Double
getDeposit
()
{
...
...
performance-web/src/main/java/com/clx/performance/job/OrderNoGenerateJob.java
浏览文件 @
b2426499
...
...
@@ -38,7 +38,7 @@ public class OrderNoGenerateJob implements InitializingBean {
* 提前生成订单号
*/
@XxlJob
(
"generateOrderNo"
)
public
void
generateOrderNo
()
throws
InterruptedException
{
public
void
generateOrderNo
(){
LocalDateTime
today
=
LocalDateTime
.
now
();
//检验今天的订单池有没有,没有就生成一套
String
todayKey
=
RedisConstants
.
CARRIER_ORDER_NUM_POOL_KEY
.
replace
(
"{date}"
,
today
.
format
(
DateTimeFormatter
.
BASIC_ISO_DATE
));
...
...
@@ -150,14 +150,14 @@ public class OrderNoGenerateJob implements InitializingBean {
*/
@Override
public
void
afterPropertiesSet
()
throws
Exception
{
public
void
afterPropertiesSet
(){
//初始化redis中的订单池
executor
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
try
{
generateOrderNo
();
}
catch
(
Interrupted
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/PaymentServiceImpl.java
浏览文件 @
b2426499
...
...
@@ -89,8 +89,10 @@ public class PaymentServiceImpl implements PaymentService {
log
.
info
(
"发起支付请求日志 {}"
,
JSON
.
toJSONString
(
payUserDTO
));
Result
<
Object
>
notify
=
(
Result
<
Object
>)
postRequest
(
mslPaymentConfig
.
getHost
()+
PERFORMANCE_PAY_CLX_PAYMENT
.
getUrl
(),
JSON
.
toJSONString
(
payUserDTO
));
log
.
info
(
"支付返回日志 {}"
,
notify
);
if
(
notify
==
null
||
notify
.
getCode
()
!=
0
)
{
//FEGIN返回null
if
(
notify
==
null
)
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
);
}
if
(
notify
.
getCode
()
!=
0
)
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
notify
.
getMsg
());
}
return
notify
;
...
...
@@ -130,8 +132,10 @@ public class PaymentServiceImpl implements PaymentService {
log
.
info
(
"发起支付请求日志 {}"
,
payUserDTO
);
Result
<
Object
>
notify
=
(
Result
<
Object
>)
postRequest
(
mslPaymentConfig
.
getHost
()+
PERFORMANCE_PAY_CLX_PAYMENT
.
getUrl
(),
JSON
.
toJSONString
(
payUserDTO
));
log
.
info
(
"支付返回日志 {}"
,
notify
);
if
(
notify
==
null
||
notify
.
getCode
()
!=
0
)
{
//FEGIN返回null
if
(
notify
==
null
)
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
);
}
if
(
notify
.
getCode
()
!=
0
)
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
notify
.
getMsg
());
}
return
notify
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论