From e7f03acfa5ee4ad4fd6d1ee9e9ae9a5655488f6d Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期二, 09 十一月 2021 17:04:46 +0800 Subject: [PATCH] 1109修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletChangeServiceImpl.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 52 insertions(+), 2 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..801c2f2 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 @@ -1,11 +1,16 @@ package com.panzhihua.service_community.service.impl; +import java.math.BigDecimal; +import java.util.Date; + +import org.springframework.stereotype.Service; + import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.service_community.dao.ComActUserWalletChangeMapper; import com.panzhihua.service_community.model.dos.ComActUserWalletChangeDO; import com.panzhihua.service_community.service.ComActUserWalletChangeService; + import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; /** * @auther lyq @@ -14,6 +19,51 @@ */ @Slf4j @Service -public class ComActUserWalletChangeServiceImpl extends ServiceImpl<ComActUserWalletChangeMapper, ComActUserWalletChangeDO> implements ComActUserWalletChangeService { +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