From 556de16f65ae7b776fbf77e48bfcfa8523c1aff3 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期三, 27 十一月 2024 17:20:31 +0800 Subject: [PATCH] 1 --- se-modules/se-system/src/main/java/com/se/system/controller/IndexController.java | 34 ++++++++++++++++++++++++---------- 1 files changed, 24 insertions(+), 10 deletions(-) diff --git a/se-modules/se-system/src/main/java/com/se/system/controller/IndexController.java b/se-modules/se-system/src/main/java/com/se/system/controller/IndexController.java index 1df023e..723e298 100644 --- a/se-modules/se-system/src/main/java/com/se/system/controller/IndexController.java +++ b/se-modules/se-system/src/main/java/com/se/system/controller/IndexController.java @@ -41,8 +41,12 @@ // PV鍙嶆槧浜嗙綉绔欑敤鎴疯闂殑缃戦〉鏁伴噺锛屾槸琛¢噺缃戠珯娴侀噺鐨勯噸瑕佹寚鏍囦箣涓� @Log(title = "PV缁熻", businessType = BusinessType.OTHER) @GetMapping("/pvCount") - public Map<String, Object> pvCount() { + public Map<String, Object> pvCount(Integer day) { + if (null == day || day < 1) day = 15; + if (day > 365) day = 365; + Map<String, Object> map = new HashMap<>(); + map.put("pvCount", indexService.pvCount(day)); return map; } @@ -52,8 +56,12 @@ // 濡傛灉鏇存崲浜咺P鍚庝絾涓嶆竻闄ookies锛屽啀璁块棶鐩稿悓缃戠珯锛岃缃戠珯鐨勭粺璁′腑UV鏁版槸涓嶅彉鐨勩�� @Log(title = "UV缁熻", businessType = BusinessType.OTHER) @GetMapping("/uvCount") - public Map<String, Object> uvCount() { + public Map<String, Object> uvCount(Integer day) { + if (null == day || day < 1) day = 15; + if (day > 365) day = 365; + Map<String, Object> map = new HashMap<>(); + map.put("uvCount", indexService.uvCount(day)); return map; } @@ -62,7 +70,7 @@ @Log(title = "鏂板鐢ㄦ埛缁熻", businessType = BusinessType.OTHER) @GetMapping("/newUserCount") public Map<String, Object> newUserCount(Integer day) { - if (null == day || day < 1) day = 7; + if (null == day || day < 1) day = 15; if (day > 365) day = 365; Map<String, Object> map = new HashMap<>(); @@ -84,20 +92,26 @@ // 鈶ょ敤鎴风粺璁℃帓琛岋紙娲昏穬鐢ㄦ埛锛夛細浠ヤ竴瀹氭椂闂存鍐呯殑鐧诲綍鏃堕棿鎴栫櫥褰曟鏁版帓鍚嶏紝灞曠ず鍓嶄簲鍚嶇殑鐢ㄦ埛淇℃伅 @Log(title = "鐢ㄦ埛缁熻鎺掕", businessType = BusinessType.OTHER) @GetMapping("/userCountList") - public Map<String, Object> userCountList() { - Map<String, Object> map = new HashMap<>(); + public List<Map<String, Object>> userCountList(Integer day, Integer amount) { + if (null == day || day < 1) day = 15; + if (day > 365) day = 365; + if (null == amount) amount = 5; + if (amount > 100) amount = 100; - return map; + return indexService.userCountList(day, amount); } // 鈶ュ父鐢ㄧ郴缁熷睍绀�/鍚勭郴缁熻闂俊鎭細鍩轰簬鐢ㄦ埛璁块棶娆℃暟鎺掑悕锛屽睍绀哄墠浜斾釜绯荤粺鐨勬帓鍚� // 骞跺睍绀哄悇涓郴缁熶竴澶╁唴銆佷笁澶╁唴銆佷竴鍛ㄥ唴鐨勮闂鏁般�傘�愬彲鑰冭檻鎸夊叾浠栨寚鏍囪繘琛屾帓鍚嶅睍绀恒�� - @Log(title = "鐢ㄦ埛缁熻鎺掕", businessType = BusinessType.OTHER) + @Log(title = "甯哥敤绯荤粺灞曠ず", businessType = BusinessType.OTHER) @GetMapping("/sysVisitList") - public Map<String, Object> sysVisitList() { - Map<String, Object> map = new HashMap<>(); + public List<Map<String, Object>> sysVisitList(Integer day, Integer amount) { + if (null == day || day < 1) day = 15; + if (day > 365) day = 365; + if (null == amount) amount = 5; + if (amount > 100) amount = 100; - return map; + return indexService.sysVisitList(day, amount); } @Log(title = "杩愮淮鐩戞帶", businessType = BusinessType.OTHER) -- Gitblit v1.9.3