Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
4f1aea08
提交
4f1aea08
authored
8月 30, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
打印日志
上级
a49526b4
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
83 行增加
和
59 行删除
+83
-59
PayWalletDao.java
.../main/java/com/mmc/iuav/user/dao/wallet/PayWalletDao.java
+2
-1
PayWalletServiceImpl.java
...c/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
+27
-22
WithdrawalServiceImpl.java
...mc/iuav/user/service/xzsz/impl/WithdrawalServiceImpl.java
+1
-1
XzServiceImpl.java
...va/com/mmc/iuav/user/service/xzsz/impl/XzServiceImpl.java
+8
-5
WithdrawalResp.java
.../src/main/java/com/mmc/iuav/user/xzsz/WithdrawalResp.java
+8
-0
PayWalletDao.xml
...ce-user/src/main/resources/mapper/wallet/PayWalletDao.xml
+37
-30
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/wallet/PayWalletDao.java
浏览文件 @
4f1aea08
...
@@ -7,6 +7,7 @@ import com.mmc.iuav.user.entity.wallet.WithdrawalLogDO;
...
@@ -7,6 +7,7 @@ import com.mmc.iuav.user.entity.wallet.WithdrawalLogDO;
import
com.mmc.iuav.user.model.qo.wallet.WalletFlowQO
;
import
com.mmc.iuav.user.model.qo.wallet.WalletFlowQO
;
import
com.mmc.iuav.user.model.qo.wallet.WithdrawalApplyQO
;
import
com.mmc.iuav.user.model.qo.wallet.WithdrawalApplyQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -35,7 +36,7 @@ public interface PayWalletDao {
...
@@ -35,7 +36,7 @@ public interface PayWalletDao {
List
<
WithdrawalLogDO
>
getWithdrawalListByUserAccountId
(
WalletFlowQO
param
);
List
<
WithdrawalLogDO
>
getWithdrawalListByUserAccountId
(
WalletFlowQO
param
);
XzWithdrawalApplyDO
getWithdrawalApplyById
(
Integer
id
);
XzWithdrawalApplyDO
getWithdrawalApplyById
OrOuterTradeNo
(
@Param
(
value
=
"id"
)
Integer
id
,
@Param
(
value
=
"outerTradeNo"
)
String
outerTradeNo
);
List
<
WithdrawalLogDO
>
listPayWithdrawalLog
(
Integer
id
);
List
<
WithdrawalLogDO
>
listPayWithdrawalLog
(
Integer
id
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
浏览文件 @
4f1aea08
...
@@ -86,28 +86,33 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -86,28 +86,33 @@ public class PayWalletServiceImpl implements PayWalletService {
}
}
// 判断状态进行资金的扣减等于100时 发布订单
// 判断状态进行资金的扣减等于100时 发布订单
if
(
publisherWalletFlowVO
!=
null
&&
publisherWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
PUBLISH_ORDER
.
getCode
()))
{
if
(
publisherWalletFlowVO
!=
null
&&
publisherWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
PUBLISH_ORDER
.
getCode
()))
{
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
if
(
publisherWalletFlowVO
.
getCashAmount
().
compareTo
(
new
BigDecimal
(
0
))
>
0
||
publishUpdatePayWallet
.
setUserAccountId
(
publisherWalletFlowVO
.
getUserAccountId
());
publisherWalletFlowVO
.
getSalaryAmount
().
compareTo
(
new
BigDecimal
(
0
))
>
0
)
{
publishUpdatePayWallet
.
setPid
(
publishWallet
.
getPid
());
PayWalletDO
publishUpdatePayWallet
=
new
PayWalletDO
();
publishUpdatePayWallet
.
setCashAmt
(
publishWallet
.
getCashAmt
().
add
(
publisherWalletFlowVO
.
getCashAmount
())
publishUpdatePayWallet
.
setUserAccountId
(
publisherWalletFlowVO
.
getUserAccountId
());
.
add
(
publisherWalletFlowVO
.
getTopYxjAmount
()).
add
(
publisherWalletFlowVO
.
getUrgentYxjAmount
()));
publishUpdatePayWallet
.
setPid
(
publishWallet
.
getPid
());
publishUpdatePayWallet
.
setCashFreeze
(
publishWallet
.
getCashFreeze
().
subtract
(
publisherWalletFlowVO
.
getCashAmount
())
publishUpdatePayWallet
.
setCashAmt
(
publishWallet
.
getCashAmt
().
add
(
publisherWalletFlowVO
.
getCashAmount
())
.
subtract
(
publisherWalletFlowVO
.
getTopYxjAmount
()).
subtract
(
publisherWalletFlowVO
.
getUrgentYxjAmount
()));
.
add
(
publisherWalletFlowVO
.
getTopYxjAmount
()).
add
(
publisherWalletFlowVO
.
getUrgentYxjAmount
()));
publishUpdatePayWallet
.
setSalaryAmt
(
publishWallet
.
getSalaryAmt
().
add
(
publisherWalletFlowVO
.
getSalaryAmount
())
publishUpdatePayWallet
.
setCashFreeze
(
publishWallet
.
getCashFreeze
().
subtract
(
publisherWalletFlowVO
.
getCashAmount
())
.
add
(
publisherWalletFlowVO
.
getTopSalaryAmount
()).
add
(
publisherWalletFlowVO
.
getUrgentSalaryAmount
()));
.
subtract
(
publisherWalletFlowVO
.
getTopYxjAmount
()).
subtract
(
publisherWalletFlowVO
.
getUrgentYxjAmount
()));
publishUpdatePayWallet
.
setSalaryFreeze
(
publishWallet
.
getSalaryFreeze
().
subtract
(
publisherWalletFlowVO
.
getSalaryAmount
())
publishUpdatePayWallet
.
setSalaryAmt
(
publishWallet
.
getSalaryAmt
().
add
(
publisherWalletFlowVO
.
getSalaryAmount
())
.
subtract
(
publisherWalletFlowVO
.
getTopSalaryAmount
()).
subtract
(
publisherWalletFlowVO
.
getUrgentSalaryAmount
()));
.
add
(
publisherWalletFlowVO
.
getTopSalaryAmount
()).
add
(
publisherWalletFlowVO
.
getUrgentSalaryAmount
()));
int
i
=
payWalletDao
.
updatePayWallet
(
publishUpdatePayWallet
);
publishUpdatePayWallet
.
setSalaryFreeze
(
publishWallet
.
getSalaryFreeze
().
subtract
(
publisherWalletFlowVO
.
getSalaryAmount
())
if
(
i
>
0
)
{
.
subtract
(
publisherWalletFlowVO
.
getTopSalaryAmount
()).
subtract
(
publisherWalletFlowVO
.
getUrgentSalaryAmount
()));
PayLogDO
payLogDO
=
buildPayLogDO
(
publisherWalletFlowVO
,
null
);
int
i
=
payWalletDao
.
updatePayWallet
(
publishUpdatePayWallet
);
payLogDO
.
setCashAmtPaid
(
publisherWalletFlowVO
.
getCashAmount
().
add
(
publisherWalletFlowVO
.
getTopYxjAmount
()).
add
(
publisherWalletFlowVO
.
getUrgentYxjAmount
()));
if
(
i
>
0
)
{
payLogDO
.
setSalaryAmtPaid
(
publisherWalletFlowVO
.
getSalaryAmount
().
add
(
publisherWalletFlowVO
.
getTopSalaryAmount
()).
add
(
publisherWalletFlowVO
.
getUrgentSalaryAmount
()));
PayLogDO
payLogDO
=
buildPayLogDO
(
publisherWalletFlowVO
,
null
);
// 插入流水记录表
payLogDO
.
setCashAmtPaid
(
publisherWalletFlowVO
.
getCashAmount
().
add
(
publisherWalletFlowVO
.
getTopYxjAmount
()).
add
(
publisherWalletFlowVO
.
getUrgentYxjAmount
()));
payWalletDao
.
insertPayLogDO
(
payLogDO
);
payLogDO
.
setSalaryAmtPaid
(
publisherWalletFlowVO
.
getSalaryAmount
().
add
(
publisherWalletFlowVO
.
getTopSalaryAmount
()).
add
(
publisherWalletFlowVO
.
getUrgentSalaryAmount
()));
return
ResultBody
.
success
();
// 插入流水记录表
payWalletDao
.
insertPayLogDO
(
payLogDO
);
return
ResultBody
.
success
();
}
else
{
log
.
error
(
"发布订单时,用户钱包更新失败,用户id是:{},传入参数是:{}"
,
publisherWalletFlowVO
.
getUserAccountId
(),
publisherWalletFlowVO
);
return
ResultBody
.
error
(
"钱包操作错误"
);
}
}
else
{
}
else
{
log
.
error
(
"发布订单时,用户钱包更新失败,用户id是:{},传入参数是:{}"
,
publisherWalletFlowVO
.
getUserAccountId
(),
publisherWalletFlowVO
);
return
ResultBody
.
success
();
return
ResultBody
.
error
(
"钱包操作错误"
);
}
}
}
else
if
(
publisherWalletFlowVO
!=
null
&&
publisherWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
CANCEL_ORDER_TAKING
.
getCode
()))
{
}
else
if
(
publisherWalletFlowVO
!=
null
&&
publisherWalletFlowVO
.
getModeOfPayment
().
equals
(
PayMethodEnums
.
CANCEL_ORDER_TAKING
.
getCode
()))
{
// 等于200时 发布方取消订单,无飞手接单
// 等于200时 发布方取消订单,无飞手接单
...
@@ -502,7 +507,7 @@ public class PayWalletServiceImpl implements PayWalletService {
...
@@ -502,7 +507,7 @@ public class PayWalletServiceImpl implements PayWalletService {
PayLogDO
payLogDO
=
payWalletDao
.
getPayLogById
(
id
);
PayLogDO
payLogDO
=
payWalletDao
.
getPayLogById
(
id
);
return
ResultBody
.
success
(
payLogDO
.
buildUserBillingDetailVO
());
return
ResultBody
.
success
(
payLogDO
.
buildUserBillingDetailVO
());
}
else
{
}
else
{
XzWithdrawalApplyDO
apply
=
payWalletDao
.
getWithdrawalApplyById
(
id
);
XzWithdrawalApplyDO
apply
=
payWalletDao
.
getWithdrawalApplyById
OrOuterTradeNo
(
id
,
null
);
UserBillingDetailVO
detail
=
apply
.
buildUserBillingDetailVO
();
UserBillingDetailVO
detail
=
apply
.
buildUserBillingDetailVO
();
List
<
WithdrawalLogDO
>
rebates
=
payWalletDao
.
listPayWithdrawalLog
(
apply
.
getId
());
List
<
WithdrawalLogDO
>
rebates
=
payWalletDao
.
listPayWithdrawalLog
(
apply
.
getId
());
detail
.
buildSchedules
(
rebates
);
detail
.
buildSchedules
(
rebates
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/xzsz/impl/WithdrawalServiceImpl.java
浏览文件 @
4f1aea08
...
@@ -165,7 +165,7 @@ public class WithdrawalServiceImpl implements WithdrawalService {
...
@@ -165,7 +165,7 @@ public class WithdrawalServiceImpl implements WithdrawalService {
}
}
// 查询申请单信息
// 查询申请单信息
XzWithdrawalApplyDO
applyInfo
=
payWalletDao
.
getWithdrawalApplyById
(
id
);
XzWithdrawalApplyDO
applyInfo
=
payWalletDao
.
getWithdrawalApplyById
OrOuterTradeNo
(
id
,
null
);
if
(
applyInfo
==
null
)
{
if
(
applyInfo
==
null
)
{
return
ResultBody
.
error
(
ResultEnum
.
WITHDRAWAL_INFO_NOT_FIND_ERROR
);
return
ResultBody
.
error
(
ResultEnum
.
WITHDRAWAL_INFO_NOT_FIND_ERROR
);
}
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/xzsz/impl/XzServiceImpl.java
浏览文件 @
4f1aea08
...
@@ -266,12 +266,13 @@ public class XzServiceImpl implements XzService {
...
@@ -266,12 +266,13 @@ public class XzServiceImpl implements XzService {
@Override
@Override
public
String
xzWithdrawNotify
(
JSONObject
notify
)
{
public
String
xzWithdrawNotify
(
JSONObject
notify
)
{
log
.
info
(
"xzWithdrawNotify获取到的推送结果:{}"
,
notify
.
toString
());
log
.
info
(
"xzWithdrawNotify获取到的推送结果:{}"
,
notify
.
toString
());
// TODO 会受到两次回调
if
(
"T"
.
equals
(
notify
.
get
(
"isSuccess"
).
toString
()))
{
if
(
notify
.
get
(
"isSuccess"
).
toString
().
equals
(
"T"
))
{
String
s
=
decrypt
(
com
.
alibaba
.
fastjson2
.
JSONObject
.
parseObject
(
notify
.
get
(
"data"
).
toString
()).
get
(
"bizAESContent"
).
toString
());
String
s
=
decrypt
(
com
.
alibaba
.
fastjson2
.
JSONObject
.
parseObject
(
notify
.
get
(
"data"
).
toString
()).
get
(
"bizAESContent"
).
toString
());
WithdrawalResp
.
Data
data
=
com
.
alibaba
.
fastjson2
.
JSONObject
.
parseObject
(
s
,
WithdrawalResp
.
Data
.
class
);
WithdrawalResp
.
Data
data
=
com
.
alibaba
.
fastjson2
.
JSONObject
.
parseObject
(
s
,
WithdrawalResp
.
Data
.
class
);
// TODO 判断是否已经处理,处理过就不用处理了
log
.
info
(
"提现回调解密数据内容:{}"
,
data
);
if
(
data
.
getNotifyType
().
equals
(
"submitResult"
))
{
// 获取用户提现申请信息
XzWithdrawalApplyDO
withdrawCashApplyDetails
=
payWalletDao
.
getWithdrawalApplyByIdOrOuterTradeNo
(
null
,
data
.
getOuterTradeNo
());
if
(
"submitResult"
.
equals
(
data
.
getNotifyType
()))
{
// 对上报的数据进行业务校验,例如:是否超限、是否有余额、是否有电签、参数是否准确等等前置校验。如果校验成功,订单进入待发队列等待发放
// 对上报的数据进行业务校验,例如:是否超限、是否有余额、是否有电签、参数是否准确等等前置校验。如果校验成功,订单进入待发队列等待发放
log
.
info
(
"deal submitResult"
);
log
.
info
(
"deal submitResult"
);
// 根据订单编号修改信息
// 根据订单编号修改信息
...
@@ -281,13 +282,15 @@ public class XzServiceImpl implements XzService {
...
@@ -281,13 +282,15 @@ public class XzServiceImpl implements XzService {
xzWithdrawalApplyDO
.
setTradeResult
(
data
.
getTradeResult
());
xzWithdrawalApplyDO
.
setTradeResult
(
data
.
getTradeResult
());
xzWithdrawalApplyDO
.
setTaxFundId
(
userSystemConstant
.
getTaxFundId
());
xzWithdrawalApplyDO
.
setTaxFundId
(
userSystemConstant
.
getTaxFundId
());
payWalletDao
.
updateWithdrawalApply
(
xzWithdrawalApplyDO
);
payWalletDao
.
updateWithdrawalApply
(
xzWithdrawalApplyDO
);
}
else
if
(
data
.
getNotifyType
().
equals
(
"tradeResult"
))
{
}
else
if
(
"tradeResult"
.
equals
(
data
.
getNotifyType
()
))
{
// 根据银行\微信\支付宝的反馈,推送订单的发放结果,发放成功\发放失败
// 根据银行\微信\支付宝的反馈,推送订单的发放结果,发放成功\发放失败
// todo 待处理
// todo 待处理
log
.
info
(
"deal tradeResult"
);
log
.
info
(
"deal tradeResult"
);
}
}
}
else
{
}
else
{
log
.
info
(
"xzWithdrawNotify fail:{}"
,
notify
);
log
.
info
(
"xzWithdrawNotify fail:{}"
,
notify
);
}
}
return
"success"
;
return
"success"
;
}
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/xzsz/WithdrawalResp.java
浏览文件 @
4f1aea08
...
@@ -50,6 +50,7 @@ public class WithdrawalResp {
...
@@ -50,6 +50,7 @@ public class WithdrawalResp {
private
String
tradeTime
;
private
String
tradeTime
;
private
String
frontLogNo
;
private
String
frontLogNo
;
private
String
tradeResult
;
private
String
tradeResult
;
private
String
tradeFailCode
;
public
Data
()
{
public
Data
()
{
}
}
...
@@ -166,5 +167,12 @@ public class WithdrawalResp {
...
@@ -166,5 +167,12 @@ public class WithdrawalResp {
this
.
tradeResult
=
tradeResult
;
this
.
tradeResult
=
tradeResult
;
}
}
public
String
getTradeFailCode
()
{
return
tradeFailCode
;
}
public
void
setTradeFailCode
(
String
tradeFailCode
)
{
this
.
tradeFailCode
=
tradeFailCode
;
}
}
}
}
}
csm-service/cms-service-user/src/main/resources/mapper/wallet/PayWalletDao.xml
浏览文件 @
4f1aea08
...
@@ -217,38 +217,45 @@
...
@@ -217,38 +217,45 @@
order by create_time DESC
order by create_time DESC
limit #{pageNo},#{pageSize}
limit #{pageNo},#{pageSize}
</select>
</select>
<select
id=
"getWithdrawalApplyById"
resultType=
"com.mmc.iuav.user.entity.XzWithdrawalApplyDO"
>
<select
id=
"getWithdrawalApplyById
OrOuterTradeNo
"
resultType=
"com.mmc.iuav.user.entity.XzWithdrawalApplyDO"
>
select id,
select id,
user_account_id,
user_account_id,
bank_name,
bank_name,
bank_remo,
bank_remo,
emp_num,
emp_num,
emp_name,
emp_name,
emp_phone,
emp_phone,
license_id,
license_id,
license_type,
license_type,
`month`,
`month`,
notify_url,
notify_url,
outer_trade_no,
outer_trade_no,
pay_account,
pay_account,
pay_amount,
pay_amount,
position_name,
position_name,
remarks,
remarks,
settle_type,
settle_type,
tax_fund_id,
tax_fund_id,
wechat_app_id,
wechat_app_id,
trade_status,
trade_status,
trade_time,
trade_time,
front_log_no,
front_log_no,
trade_fail_code,
trade_fail_code,
trade_result,
trade_result,
submit_status,
submit_status,
error_code,
error_code,
error_message,
error_message,
charge_amount,
charge_amount,
create_time
create_time
from xz_withdrawal_apply
from xz_withdrawal_apply
where id = #{id}
<where>
<if
test=
"id != null"
>
id = #{id}
</if>
<if
test=
"outerTradeNo != null and outerTradeNo != ''"
>
outer_trade_no = #{outerTradeNo}
</if>
</where>
</select>
</select>
<select
id=
"listPayWithdrawalLog"
resultType=
"com.mmc.iuav.user.entity.wallet.WithdrawalLogDO"
>
<select
id=
"listPayWithdrawalLog"
resultType=
"com.mmc.iuav.user.entity.wallet.WithdrawalLogDO"
>
select id,
select id,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论