| | |
| | | @BusinessLog(title = "外部blog系统_统计_查询", opType = LogAnnotionOpTypeEnum.QUERY) |
| | | public ResponseData statistics() { |
| | | |
| | | //相差一个月,31天 |
| | | long betweenDay = DateUtil.between(DateUtil.parseDate("2020-05-27"), new Date(), DateUnit.DAY); |
| | | String updateDate; |
| | | BlogArticle lastUpdateBlog = blogArticleService.lambdaQuery().orderByDesc(BlogArticle::getUpdateDate) |
| | | .last(" limit 1 ").one(); |
| | | String updateDate = "--"; |
| | | BlogArticle lastUpdateBlog = blogArticleService.lambdaQuery().orderByDesc(BlogArticle::getUpdateDate).last(" limit 1 ").one(); |
| | | if (lastUpdateBlog != null && lastUpdateBlog.getUpdateDate() != null) { |
| | | updateDate = DateUtil.formatDate(lastUpdateBlog.getUpdateDate()); |
| | | } else { |
| | | updateDate = "--"; |
| | | } |
| | | |
| | | String startFrom = "从这开始: 2020-05-27 "; |
| | | String aliveDayCount = "已稳定运行:" + betweenDay + "天"; |
| | | String aliveDayCount = "已稳定运行:" + DateUtil.between(DateUtil.parseDate("2022-02-14"), new Date(), DateUnit.DAY) + "天"; |
| | | String lastUpdateDate = "上次更新:" + updateDate; |
| | | String visitCount = "累计访问:1010次"; |
| | | String visitorCount = "累计访客:1001名"; |
| | | String visitCount = "累计访问:1010次"; //24小时ip 访问次数 |
| | | String visitorCount = "累计访客:1001名";//所有时间ip个数 |
| | | |
| | | List<BlogStatisticsVo.simpleVo> res = new ArrayList<>(); |
| | | res.add(new BlogStatisticsVo.simpleVo().setName(startFrom)); |