最新代码
This commit is contained in:
parent
bbdd8156ef
commit
6af99fc852
@ -24,7 +24,7 @@ public class IndexInfoController extends BaseController {
|
||||
private RuoYiConfig ruoYiConfig;
|
||||
|
||||
/**
|
||||
* 统计栏目、内容、大赛、参数人数
|
||||
* 统计栏目、内容、虚仿课程、参数人数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping()
|
||||
|
@ -15,8 +15,8 @@ public class SiteStatVo extends BaseEntity {
|
||||
/** 文章数量 */
|
||||
private Long contentCount;
|
||||
|
||||
/** 大赛数量 */
|
||||
private Long competitionCount;
|
||||
/** 虚仿课程数量 */
|
||||
private Long imitationCount;
|
||||
|
||||
/** 参赛人员数量 */
|
||||
private Long studentCount;
|
||||
|
@ -2,32 +2,28 @@ package com.ruoyi.cms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.ruoyi.cms.domain.CmsCategory;
|
||||
import com.ruoyi.cms.domain.CmsContent;
|
||||
import com.ruoyi.cms.domain.HitCompetition;
|
||||
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
|
||||
import com.ruoyi.cms.domain.*;
|
||||
import com.ruoyi.cms.domain.vo.SiteStatVo;
|
||||
import com.ruoyi.cms.mapper.CmsCategoryMapper;
|
||||
import com.ruoyi.cms.mapper.CmsContentMapper;
|
||||
import com.ruoyi.cms.mapper.HitCompetitionMapper;
|
||||
import com.ruoyi.cms.mapper.HitRegistrationStudentInfoMapper;
|
||||
import com.ruoyi.cms.mapper.*;
|
||||
import com.ruoyi.cms.service.IndexInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Service
|
||||
public class IndexInfoServiceImpl implements IndexInfoService {
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private CmsContentMapper contentMapper;
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private CmsCategoryMapper categoryMapper;
|
||||
|
||||
@Autowired
|
||||
private HitCompetitionMapper competitionMapper;
|
||||
@Resource
|
||||
private ImitationMapper imitationMapper;
|
||||
|
||||
@Autowired
|
||||
@Resource
|
||||
private HitRegistrationStudentInfoMapper studentInfoMapper;
|
||||
|
||||
@Override
|
||||
@ -35,7 +31,7 @@ public class IndexInfoServiceImpl implements IndexInfoService {
|
||||
SiteStatVo siteStatVo = new SiteStatVo();
|
||||
siteStatVo.setCategoryCount(categoryMapper.selectCount(new QueryWrapper<CmsCategory>().eq("is_disable", 0)));
|
||||
siteStatVo.setContentCount(contentMapper.selectCount(new QueryWrapper<CmsContent>().eq("del_flag", 0)));
|
||||
siteStatVo.setCompetitionCount(competitionMapper.selectCount(new QueryWrapper<HitCompetition>()));
|
||||
siteStatVo.setImitationCount(imitationMapper.selectCount(new QueryWrapper<Imitation>()));
|
||||
siteStatVo.setStudentCount(studentInfoMapper.selectCount(new QueryWrapper<HitRegistrationStudentInfo>()));
|
||||
return siteStatVo;
|
||||
}
|
||||
|
@ -5,14 +5,14 @@ spring:
|
||||
driverClassName: com.mysql.cj.jdbc.Driver
|
||||
druid:
|
||||
# 主库数据源
|
||||
# master:
|
||||
# url: jdbc:mysql://122.51.230.86:3306/hgd_website?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: hgdRoot
|
||||
# password: qqzcy@1014
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry-cms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: root
|
||||
url: jdbc:mysql://122.51.230.86:3306/hgd_website?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: hgdRoot
|
||||
password: qqzcy@1014
|
||||
# master:
|
||||
# url: jdbc:mysql://localhost:3306/ry-cms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: root
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
@ -50,20 +50,20 @@
|
||||
"fileActionName": "uploadfile", /* controller里,执行上传视频的action名称 */
|
||||
"fileFieldName": "upfile", /* 提交的文件表单名称 */
|
||||
"filePathFormat": "file/{yyyy}{mm}{dd}/{time}{rand:6}", /* 上传保存路径,可以自定义保存路径和文件名格式 */
|
||||
"fileUrlPrefix": "", /* 文件访问路径前缀 */
|
||||
"fileUrlPrefix": "https://f382b38516.zicp.fun", /* 文件访问路径前缀 */
|
||||
"fileMaxSize": 51200000, /* 上传大小限制,单位B,默认50MB */
|
||||
"fileAllowFiles": [ ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" ], /* 上传文件格式显示 */
|
||||
/* 列出指定目录下的图片 */
|
||||
"imageManagerActionName": "listimage", /* 执行图片管理的action名称 */
|
||||
"imageManagerListPath": "image/", /* 指定要列出图片的目录 */
|
||||
"imageManagerListSize": 20, /* 每次列出文件数量 */
|
||||
"imageManagerUrlPrefix": "", /* 图片访问路径前缀 */
|
||||
"imageManagerUrlPrefix": "https://f382b38516.zicp.fun", /* 图片访问路径前缀 */
|
||||
"imageManagerInsertAlign": "none", /* 插入的图片浮动方式 */
|
||||
"imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* 列出的文件类型 */
|
||||
/* 列出指定目录下的文件 */
|
||||
"fileManagerActionName": "listfile", /* 执行文件管理的action名称 */
|
||||
"fileManagerListPath": "file/", /* 指定要列出文件的目录 */
|
||||
"fileManagerUrlPrefix": "", /* 文件访问路径前缀 */
|
||||
"fileManagerUrlPrefix": "https://f382b38516.zicp.fun", /* 文件访问路径前缀 */
|
||||
"fileManagerListSize": 20, /* 每次列出文件数量 */
|
||||
"fileManagerAllowFiles": [ ".png", ".jpg", ".jpeg", ".gif", ".bmp", ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid", ".rar", ".zip", ".tar", ".gz", ".7z", ".bz2", ".cab", ".iso", ".doc", ".docx", ".xls", ".xlsx", ".ppt", ".pptx", ".pdf", ".txt", ".md", ".xml" ] /* 列出的文件类型 */
|
||||
}
|
||||
|
@ -41,8 +41,8 @@
|
||||
<svg-icon icon-class="druid" class-name="cc-card-panel-icon" />
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-statistic title="大赛数">
|
||||
<template slot="formatter"> {{ siteStat.competitionCount }} </template>
|
||||
<el-statistic title="虚仿课程数">
|
||||
<template slot="formatter"> {{ siteStat.imitationCount }} </template>
|
||||
</el-statistic>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -81,7 +81,7 @@ export default {
|
||||
siteStat: {
|
||||
categoryCount: 0,
|
||||
contentCount: 0,
|
||||
competitionCount: 0,
|
||||
imitationCount: 0,
|
||||
studentCount: 0,
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user