Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
7d869a38
提交
7d869a38
authored
10月 26, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提现资金池额度及提现总额
上级
44a79e5b
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
87 行增加
和
0 行删除
+87
-0
CashAmountDTO.java
...ava/com/mmc/iuav/user/model/dto/wallet/CashAmountDTO.java
+25
-0
CashPoolingDTO.java
...java/com/mmc/iuav/user/model/dto/xzsz/CashPoolingDTO.java
+23
-0
WithdrawalController.java
...mmc/iuav/user/controller/wallet/WithdrawalController.java
+9
-0
PayWalletDao.java
.../main/java/com/mmc/iuav/user/dao/wallet/PayWalletDao.java
+3
-0
WithdrawalService.java
...ava/com/mmc/iuav/user/service/xzsz/WithdrawalService.java
+4
-0
WithdrawalServiceImpl.java
...mc/iuav/user/service/xzsz/impl/WithdrawalServiceImpl.java
+19
-0
PayWalletDao.xml
...ce-user/src/main/resources/mapper/wallet/PayWalletDao.xml
+4
-0
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/wallet/CashAmountDTO.java
0 → 100644
浏览文件 @
7d869a38
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
wallet
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
/**
* @Author LW
* @date 2023/10/26 13:49
* 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
CashAmountDTO
{
@ApiModelProperty
(
value
=
"资金池余额"
)
private
Double
cashPoolAmount
;
@ApiModelProperty
(
value
=
"总提现金额"
)
private
BigDecimal
totalWithdrawAmt
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/xzsz/CashPoolingDTO.java
0 → 100644
浏览文件 @
7d869a38
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
xzsz
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author LW
* @date 2023/10/26 14:03
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
CashPoolingDTO
{
@ApiModelProperty
(
value
=
"商户企业名称"
)
private
String
companyName
;
@ApiModelProperty
(
value
=
"可用余额"
)
private
Double
availableBalance
;
@ApiModelProperty
(
value
=
"冻结余额"
)
private
Double
holdBalance
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/wallet/WithdrawalController.java
浏览文件 @
7d869a38
...
...
@@ -3,6 +3,7 @@ package com.mmc.iuav.user.controller.wallet;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.controller.BaseController
;
import
com.mmc.iuav.user.entity.wallet.UserBillingDetailVO
;
import
com.mmc.iuav.user.model.dto.wallet.CashAmountDTO
;
import
com.mmc.iuav.user.model.dto.wallet.WithdrawalApplyDTO
;
import
com.mmc.iuav.user.model.qo.wallet.WalletFlowQO
;
import
com.mmc.iuav.user.model.qo.wallet.WithdrawalApplyQO
;
...
...
@@ -66,4 +67,12 @@ public class WithdrawalController extends BaseController {
HttpServletRequest
request
)
{
return
ResultBody
.
success
(
withdrawalService
.
approveWithdrawalApply
(
id
,
applyStatus
,
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
(),
remark
));
}
@ApiOperation
(
value
=
"获取资金池余额及提现总额"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"getCashAmountAndWithdrawAmount"
)
public
ResultBody
<
CashAmountDTO
>
getCashAmountAndWithdrawAmount
(
HttpServletRequest
request
)
{
return
ResultBody
.
success
(
withdrawalService
.
getCashAmountAndWithdrawAmount
(
this
.
getUserLoginInfoFromRedis
(
request
)));
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/wallet/PayWalletDao.java
浏览文件 @
7d869a38
...
...
@@ -9,6 +9,7 @@ import com.mmc.iuav.user.model.qo.wallet.WithdrawalApplyQO;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
...
...
@@ -47,4 +48,6 @@ public interface PayWalletDao {
List
<
XzWithdrawalApplyDO
>
listPageWithdrawalApply
(
WithdrawalApplyQO
param
);
int
updateWithdrawalApply
(
XzWithdrawalApplyDO
apply
);
BigDecimal
getTotalWithdrawAmount
();
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/xzsz/WithdrawalService.java
浏览文件 @
7d869a38
...
...
@@ -2,6 +2,8 @@ package com.mmc.iuav.user.service.xzsz;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.wallet.CashAmountDTO
;
import
com.mmc.iuav.user.model.qo.wallet.WalletFlowQO
;
import
com.mmc.iuav.user.model.qo.wallet.WithdrawalApplyQO
;
import
com.mmc.iuav.user.model.vo.wallet.ApplyWithdrawalVO
;
...
...
@@ -18,4 +20,6 @@ public interface WithdrawalService {
PageResult
listPageWithdrawalApply
(
WithdrawalApplyQO
param
);
ResultBody
approveWithdrawalApply
(
Integer
id
,
Integer
applyStatus
,
Integer
userAccountId
,
String
remark
);
CashAmountDTO
getCashAmountAndWithdrawAmount
(
LoginSuccessDTO
loginSuccessDTO
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/xzsz/impl/WithdrawalServiceImpl.java
浏览文件 @
7d869a38
package
com
.
mmc
.
iuav
.
user
.
service
.
xzsz
.
impl
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.mmc.iuav.general.CodeUtil
;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.response.ResultBody
;
...
...
@@ -16,7 +17,10 @@ import com.mmc.iuav.user.entity.wallet.WithdrawalLogDO;
import
com.mmc.iuav.user.enums.WithdrawalApplyStatus
;
import
com.mmc.iuav.user.enums.WithdrawalMethod
;
import
com.mmc.iuav.user.enums.XzEnums
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.wallet.CashAmountDTO
;
import
com.mmc.iuav.user.model.dto.wallet.WithdrawalApplyDTO
;
import
com.mmc.iuav.user.model.dto.xzsz.CashPoolingDTO
;
import
com.mmc.iuav.user.model.qo.wallet.WalletFlowQO
;
import
com.mmc.iuav.user.model.qo.wallet.WithdrawalApplyQO
;
import
com.mmc.iuav.user.model.vo.XzWithdrawalVO
;
...
...
@@ -255,4 +259,19 @@ public class WithdrawalServiceImpl implements WithdrawalService {
payWalletDO
.
setWdlFreeze
(
wallet
.
getWdlFreeze
().
subtract
(
BigDecimal
.
valueOf
(
applyInfo
.
getPayAmount
())));
return
payWalletDao
.
updatePayWallet
(
payWalletDO
);
}
@Override
public
CashAmountDTO
getCashAmountAndWithdrawAmount
(
LoginSuccessDTO
loginSuccessDTO
)
{
if
(!
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
return
null
;
}
CashAmountDTO
cashAmountDTO
=
new
CashAmountDTO
();
BigDecimal
totalWithdrawAmount
=
payWalletDao
.
getTotalWithdrawAmount
();
cashAmountDTO
.
setTotalWithdrawAmt
(
totalWithdrawAmount
);
ResultBody
cashPooling
=
xzService
.
getCashPooling
();
String
s
=
JSONObject
.
toJSONString
(
cashPooling
.
getResult
());
CashPoolingDTO
cashPoolingDTO
=
JSONObject
.
parseObject
(
s
,
CashPoolingDTO
.
class
);
cashAmountDTO
.
setCashPoolAmount
(
cashPoolingDTO
.
getAvailableBalance
());
return
cashAmountDTO
;
}
}
csm-service/cms-service-user/src/main/resources/mapper/wallet/PayWalletDao.xml
浏览文件 @
7d869a38
...
...
@@ -411,4 +411,8 @@
order by create_time desc
limit #{pageNo},#{pageSize}
</select>
<select
id=
"getTotalWithdrawAmount"
resultType=
"java.math.BigDecimal"
>
select sum(salary_wdl)
from pay_wallet
</select>
</mapper>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论