xiaoyong931011
2021-03-25 e823e2703d216c65ca529aa184edf9993e62a4d9
20210325  消息提醒
1 files modified
16 ■■■■■ changed files
src/main/java/com/xcong/excoin/utils/LogRecordUtils.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/utils/LogRecordUtils.java
@@ -1,11 +1,17 @@
package com.xcong.excoin.utils;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
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 com.xcong.excoin.modules.member.dao.MemberSettingDao;
import com.xcong.excoin.modules.member.entity.MemberSettingEntity;
import cn.hutool.core.util.ObjectUtil;
import java.math.BigDecimal;
@@ -40,7 +46,7 @@
    }
    /**
     * 插入跟随者消息
     * 插入跟随者消息,更新消息状态
     *
     * @param memberId 跟随者用户ID
     * @param title    消息标题
@@ -52,6 +58,14 @@
        noticeEntity.setTitle(title);
        noticeEntity.setContent(content);
        SpringContextHolder.getBean(FollowFollowerNoticeDao.class).insert(noticeEntity);
        QueryWrapper<MemberSettingEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("member_id", memberId);
        MemberSettingEntity selectOne = SpringContextHolder.getBean(MemberSettingDao.class).selectOne(queryWrapper);
        if(ObjectUtil.isNotEmpty(selectOne)) {
            selectOne.setMessageReminder(1);
            SpringContextHolder.getBean(MemberSettingDao.class).updateById(selectOne);
        }
    }
}