puzhibing
2025-01-13 acccff9860b271d55c55dc87486f7c20b9896e6c
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java
@@ -183,5 +183,19 @@
        List<UserPoint> list = userPointService.list(queryWrapper);
        return R.ok(list);
    }
    /**
     * 判断当天是否分享获得过积分
     * @param appUserId
     * @return
     */
    @PostMapping("/judgmentDailyShare")
    public R<Boolean> judgmentDailyShare(@RequestParam("appUserId") Long appUserId){
        long count = userPointService.count(new LambdaQueryWrapper<UserPoint>().eq(UserPoint::getAppUserId, appUserId)
                .eq(UserPoint::getType, 4).last(" and DATE_FORMAT(NOW(), '%Y-%m-%d') = DATE_FORMAT(create_time, '%Y-%m-%d')"));
        return R.ok(count != 0);
    }
}