From eee4a9fdb1e87d25b39d9c08a7b43b09642df5ad Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Wed, 19 Aug 2020 15:19:20 +0800 Subject: [PATCH] finish closing order --- src/main/java/com/xcong/excoin/utils/LogRecordUtils.java | 33 ++++++++++++++++++++++++++++++++- 1 files changed, 32 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/xcong/excoin/utils/LogRecordUtils.java b/src/main/java/com/xcong/excoin/utils/LogRecordUtils.java index 274b052..1722f78 100644 --- a/src/main/java/com/xcong/excoin/utils/LogRecordUtils.java +++ b/src/main/java/com/xcong/excoin/utils/LogRecordUtils.java @@ -1,7 +1,11 @@ package com.xcong.excoin.utils; +import com.xcong.excoin.modules.coin.dao.MemberAccountFlowEntityDao; import com.xcong.excoin.modules.coin.dao.MemberAccountMoneyChangeDao; +import com.xcong.excoin.modules.coin.entity.MemberAccountFlowEntity; import com.xcong.excoin.modules.coin.entity.MemberAccountMoneyChange; +import com.xcong.excoin.modules.documentary.dao.FollowFollowerNoticeDao; +import com.xcong.excoin.modules.documentary.entity.FollowFollowerNoticeEntity; import java.math.BigDecimal; @@ -13,7 +17,7 @@ **/ public class LogRecordUtils { - public static void insertMemberAccountMoneyChange(Long memberId,String content, BigDecimal amount, String symbol, Integer status, Integer type) { + public static void insertMemberAccountMoneyChange(Long memberId, String content, BigDecimal amount, String symbol, Integer status, Integer type) { MemberAccountMoneyChange accountRecord = new MemberAccountMoneyChange(); accountRecord.setContent(content); accountRecord.setMemberId(memberId); @@ -23,4 +27,31 @@ accountRecord.setType(type); SpringContextHolder.getBean(MemberAccountMoneyChangeDao.class).insert(accountRecord); } + + public static void insertMemberAccountFlow(Long memberId, BigDecimal price, BigDecimal balance, String symbol, String source, String remark) { + MemberAccountFlowEntity memberAccountFlowEntity = new MemberAccountFlowEntity(); + memberAccountFlowEntity.setMemberId(memberId); + memberAccountFlowEntity.setPrice(price); + memberAccountFlowEntity.setBalance(balance); + memberAccountFlowEntity.setSymbol(symbol); + memberAccountFlowEntity.setSource(source); + memberAccountFlowEntity.setRemark(remark); + SpringContextHolder.getBean(MemberAccountFlowEntityDao.class).insert(memberAccountFlowEntity); + } + + /** + * 插入跟随者消息 + * + * @param memberId 跟随者用户ID + * @param title 消息标题 + * @param content 消息内容 + */ + public static void insertFollowerNotice(Long memberId, String title, String content) { + FollowFollowerNoticeEntity noticeEntity = new FollowFollowerNoticeEntity(); + noticeEntity.setMemberId(memberId); + noticeEntity.setTitle(title); + noticeEntity.setContent(content); + SpringContextHolder.getBean(FollowFollowerNoticeDao.class).insert(noticeEntity); + } + } -- Gitblit v1.9.1