| | |
| | | // 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; |
| | | } |
| | |
| | | // 如果更换了IP后但不清除cookies,再访问相同网站,该网站的统计中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; |
| | | } |