xuhy
2024-12-12 412ed345ecf217516fa697f0a25cf7e67559958f
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TIndexMenuController.java
@@ -214,10 +214,10 @@
    public R allert() {
        Long userId = tokenService.getLoginUser().getUserId();
        TAppUser byId = appUserService.getById(userId);
        Object cacheObject = redisCache.getCacheObject("ALLERT:"+userId);
        Long cacheObject = redisCache.getCacheObject("ALLERT:"+userId);
        if (cacheObject!=null && byId.getIsSetPreference() == 1){
            return R.ok(cacheObject);
            return R.ok(cacheObject == 1);
        }else {
            return R.ok(false);
        }
@@ -276,9 +276,7 @@
    @ApiOperation(value = "订单统计1",tags = {"后台-统计"})
    @PostMapping(value = "/order/count1")
    public R<List<Map<String,String>>> ordercount1(@RequestBody OrderCountQuery orderCountQuery) {
        List<Map<String,String>> map = new ArrayList<>();
            map = indexMenuService.count1(orderCountQuery.getStartDate(),orderCountQuery.getEndDate(),orderCountQuery.getPaymentStatus(),orderCountQuery.getDayType());
        List<Map<String,String>> map = indexMenuService.count1(orderCountQuery.getStartDate(),orderCountQuery.getEndDate(),orderCountQuery.getPaymentStatus(),orderCountQuery.getDayType());
        return R.ok(map);
    }
@@ -308,6 +306,10 @@
            notices = new ArrayList<>(notices.subList(0, 16));
        }
        notices = notices.stream().distinct().collect(Collectors.toList());
        Set<Long> cacheSet = redisCache.getCacheSet("INFORMATION:" + userId);
        for (TInformation notice : notices) {
            notice.setIsCollect(cacheSet.contains(notice.getId())?1:0);
        }
        return R.ok(notices);
    }