无关风月
2024-11-12 e4647df6128c67d4ffd645183fcf3ddef423bfff
代码提交
2个文件已修改
16 ■■■■ 已修改文件
xinquan-modules/xinquan-meditation/src/main/java/com/xinquan/meditation/service/impl/MeditationServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/utils/TaskUtil.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xinquan-modules/xinquan-meditation/src/main/java/com/xinquan/meditation/service/impl/MeditationServiceImpl.java
@@ -95,7 +95,10 @@
            }else{
                voList = baseMapper.getMeditationListByTagId(null, null);
            }
            voList = handlePaidMeditation(voList);
//            voList = handlePaidMeditation(voList);
            if(voList.isEmpty()){
                voList = baseMapper.getMeditationListByTagId(null, null);
            }
            return voList;
        }else{
            voList = baseMapper.getMeditationListByTagId(null, null);
xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/utils/TaskUtil.java
@@ -77,6 +77,11 @@
        }
    }
    public static void main(String[] args) {
        LocalDateTime localDateTime = LocalDateTime.now().minusDays(7);
        long between = ChronoUnit.DAYS.between(LocalDateTime.now(),localDateTime);
        System.err.println(between);
    }
    @Scheduled(cron = "0 0 7 * * ?")
    public void taskSivenDay() {
        try {
@@ -86,8 +91,8 @@
            for (AppUser appUser : list) {
                if (appUser.getVipExpireTime()!=null && appUser.getVipExpireTime().isAfter(now)){
                    // 计算两个now和time的天数差
                    long between = ChronoUnit.DAYS.between(appUser.getVipExpireTime(), now);
                    if (between<=7){
                    long between = ChronoUnit.DAYS.between(now,appUser.getVipExpireTime());
                    if (between<=7 &&between>=0){
                        NoticeRecord noticeRecord = new NoticeRecord();
                        noticeRecord.setAppUserId(appUser.getId());
                        noticeRecord.setReadStatus(1);
@@ -100,7 +105,7 @@
                }
                AppUserTree one = appUserTreeService.lambdaQuery().eq(AppUserTree::getAppUserId, appUser.getId())
                        .eq(AppUserTree::getSowAgain, 2).one();
                if(one.getTaskOne()==2||one.getTaskTwo()==2){
                if(one!=null&&(one.getTaskOne()==2||one.getTaskTwo()==2)){
                    NoticeRecord noticeRecord = new NoticeRecord();
                    noticeRecord.setAppUserId(appUser.getId());
                    noticeRecord.setReadStatus(1);