From 2fd7075278ae5fc451fe0eb39a84c898f26c21f6 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期五, 13 八月 2021 22:21:33 +0800
Subject: [PATCH] 随手拍改版
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletChangeServiceImpl.java | 37 +++++++++++++++++++++++++++++++++++++
1 files changed, 37 insertions(+), 0 deletions(-)
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletChangeServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletChangeServiceImpl.java
index a1fdc01..be981bc 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletChangeServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletChangeServiceImpl.java
@@ -7,6 +7,9 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
+import java.math.BigDecimal;
+import java.util.Date;
+
/**
* @auther lyq
* @create 2021-06-25 10:35:34
@@ -16,4 +19,38 @@
@Service
public class ComActUserWalletChangeServiceImpl extends ServiceImpl<ComActUserWalletChangeMapper, ComActUserWalletChangeDO> implements ComActUserWalletChangeService {
+ /**
+ * 添加用户资产变动记录
+ * @param userId 用户id
+ * @param communityId 社区id
+ * @param walletId 钱包id
+ * @param incomeAmountTop 收益金额变动前
+ * @param incomeAmountBack 收益金额变动后
+ * @param availableAmountTop 可用金额变动前
+ * @param availableAmountBack 可用金额变动后
+ * @param settlementAmountTop 已结算金额变动前
+ * @param settlementAmountBack 已结算金额变动后
+ * @param serviceId 交易记录id
+ */
+ @Override
+ public void addWalletChange(Long userId, Long communityId, Long walletId, BigDecimal incomeAmountTop
+ ,BigDecimal incomeAmountBack,BigDecimal availableAmountTop,BigDecimal availableAmountBack
+ ,BigDecimal settlementAmountTop,BigDecimal settlementAmountBack,Long serviceId){
+
+ ComActUserWalletChangeDO walletChangeDO = new ComActUserWalletChangeDO();
+ walletChangeDO.setUserId(userId);
+ walletChangeDO.setCommunityId(communityId);
+ walletChangeDO.setWalletId(walletId);
+ walletChangeDO.setIncomeAmountTop(incomeAmountTop);
+ walletChangeDO.setIncomeAmountBack(incomeAmountBack);
+ walletChangeDO.setAvailableAmountTop(availableAmountTop);
+ walletChangeDO.setAvailableAmountBack(availableAmountBack);
+ walletChangeDO.setSettlementAmountTop(settlementAmountTop);
+ walletChangeDO.setSettlementAmountBack(settlementAmountBack);
+ walletChangeDO.setServiceId(serviceId);
+ walletChangeDO.setCreateAt(new Date());
+ this.baseMapper.insert(walletChangeDO);
+ }
+
+
}
--
Gitblit v1.7.1