Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
db1a3468
提交
db1a3468
authored
5月 09, 2024
作者:
李瑞鑫
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'bug_sonar_20240426' into release
上级
3e715f4a
b2426499
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
21 行增加
和
16 行删除
+21
-16
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
NbBankThirdpartyServiceImpl.java
...e/impl/thirdparty/nbbank/NbBankThirdpartyServiceImpl.java
+3
-2
没有找到文件。
performance-web/src/main/java/com/clx/performance/dto/payment/WalletResidueDTO.java
浏览文件 @
db1a3468
...
...
@@ -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
浏览文件 @
db1a3468
...
...
@@ -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
浏览文件 @
db1a3468
...
...
@@ -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
;
...
...
performance-web/src/main/java/com/clx/performance/service/impl/thirdparty/nbbank/NbBankThirdpartyServiceImpl.java
浏览文件 @
db1a3468
...
...
@@ -68,9 +68,10 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService {
*/
private
static
void
downloadUsingStream
(
String
urlStr
,
String
file
)
throws
IOException
{
URL
url
=
new
URL
(
urlStr
);
BufferedInputStream
bis
=
n
ew
BufferedInputStream
(
url
.
openStream
())
;
BufferedInputStream
bis
=
n
ull
;
FileOutputStream
fis
=
null
;
try
{
bis
=
new
BufferedInputStream
(
url
.
openStream
());
fis
=
new
FileOutputStream
(
file
);
byte
[]
buffer
=
new
byte
[
1024
];
int
count
=
0
;
...
...
@@ -79,7 +80,7 @@ public class NbBankThirdpartyServiceImpl implements NbBankThirdpartyService {
}
}
finally
{
if
(
fis
!=
null
){
fis
.
close
();}
bis
.
close
();
if
(
bis
!=
null
){
bis
.
close
();}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论