From ea73e0fcc705bd95c35ef95f17f98f482475a0dd Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 14 十一月 2024 13:50:52 +0800 Subject: [PATCH] 代码提交 --- xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserTreeController.java | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserTreeController.java b/xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserTreeController.java index 7026766..446069d 100644 --- a/xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserTreeController.java +++ b/xinquan-modules/xinquan-user/src/main/java/com/xinquan/user/controller/client/ClientAppUserTreeController.java @@ -130,7 +130,10 @@ .between(AppUserViewingHistory::getCreateTime, startOfDay, endOfDay).list(); int temp = 0; for (AppUserViewingHistory appUserViewingHistory : list) { - temp += appUserViewingHistory.getTimeLook(); + if (appUserViewingHistory.getTimeLook()!=null){ + temp += appUserViewingHistory.getTimeLook(); + + } } AppUserTree one = appUserTreeService.lambdaQuery().eq(AppUserTree::getAppUserId, userId) .eq(AppUserTree::getSowAgain, 2).one(); @@ -148,7 +151,7 @@ } else { appUserTree.setIsSign(2); } - if (temp >= 120) { + if (temp >= 3600) { if (appUserTree.getTaskOne() == 2) { AppUserEnergyRecord appUserEnergyRecord = new AppUserEnergyRecord(); appUserEnergyRecord.setAppUserId(userId); @@ -170,7 +173,7 @@ } appUserTree.setTaskOne(1); appUserTree.setTaskTwo(1); - } else if (temp >= 60) { + } else if (temp >= 1800) { if (appUserTree.getTaskOne() == 2) { AppUserEnergyRecord appUserEnergyRecord = new AppUserEnergyRecord(); appUserEnergyRecord.setAppUserId(userId); @@ -192,7 +195,7 @@ appUserTree.setTotalEnergyValue(byId.getTotalEnergyValue()); return R.ok(appUserTree); } else { - if (temp >= 120) { + if (temp >= 3600) { if (one.getTaskOne() == 2) { AppUserEnergyRecord appUserEnergyRecord = new AppUserEnergyRecord(); appUserEnergyRecord.setAppUserId(userId); @@ -214,7 +217,7 @@ } one.setTaskOne(1); one.setTaskTwo(1); - } else if (temp >= 60) { + } else if (temp >= 1800) { if (one.getTaskOne() == 2) { AppUserEnergyRecord appUserEnergyRecord = new AppUserEnergyRecord(); appUserEnergyRecord.setAppUserId(userId); @@ -406,7 +409,7 @@ noticeRecord.setReadStatus(1); noticeRecord.setNoticeType(1); noticeRecord.setTitle("树苗升级通知"); - noticeRecord.setContent("恭喜,您的树苗已升至"+y+"级,"+"继续加油哦"); + noticeRecord.setContent("恭喜,您的树苗已升至"+x+"级,"+"继续加油哦"); noticeRecordService.save(noticeRecord); } return R.ok(wateringVO); -- Gitblit v1.7.1