最新代码

This commit is contained in:
xiao-fajia 2024-08-04 09:00:54 +08:00
parent bbdd8156ef
commit 6af99fc852
6 changed files with 26 additions and 30 deletions

View File

@ -24,7 +24,7 @@ public class IndexInfoController extends BaseController {
private RuoYiConfig ruoYiConfig; private RuoYiConfig ruoYiConfig;
/** /**
* 统计栏目内容大赛参数人数 * 统计栏目内容虚仿课程参数人数
* @return * @return
*/ */
@GetMapping() @GetMapping()

View File

@ -15,8 +15,8 @@ public class SiteStatVo extends BaseEntity {
/** 文章数量 */ /** 文章数量 */
private Long contentCount; private Long contentCount;
/** 大赛数量 */ /** 虚仿课程数量 */
private Long competitionCount; private Long imitationCount;
/** 参赛人员数量 */ /** 参赛人员数量 */
private Long studentCount; private Long studentCount;

View File

@ -2,32 +2,28 @@ package com.ruoyi.cms.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.cms.domain.CmsCategory; import com.ruoyi.cms.domain.*;
import com.ruoyi.cms.domain.CmsContent;
import com.ruoyi.cms.domain.HitCompetition;
import com.ruoyi.cms.domain.HitRegistrationStudentInfo;
import com.ruoyi.cms.domain.vo.SiteStatVo; import com.ruoyi.cms.domain.vo.SiteStatVo;
import com.ruoyi.cms.mapper.CmsCategoryMapper; import com.ruoyi.cms.mapper.*;
import com.ruoyi.cms.mapper.CmsContentMapper;
import com.ruoyi.cms.mapper.HitCompetitionMapper;
import com.ruoyi.cms.mapper.HitRegistrationStudentInfoMapper;
import com.ruoyi.cms.service.IndexInfoService; import com.ruoyi.cms.service.IndexInfoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service @Service
public class IndexInfoServiceImpl implements IndexInfoService { public class IndexInfoServiceImpl implements IndexInfoService {
@Autowired @Resource
private CmsContentMapper contentMapper; private CmsContentMapper contentMapper;
@Autowired @Resource
private CmsCategoryMapper categoryMapper; private CmsCategoryMapper categoryMapper;
@Autowired @Resource
private HitCompetitionMapper competitionMapper; private ImitationMapper imitationMapper;
@Autowired @Resource
private HitRegistrationStudentInfoMapper studentInfoMapper; private HitRegistrationStudentInfoMapper studentInfoMapper;
@Override @Override
@ -35,7 +31,7 @@ public class IndexInfoServiceImpl implements IndexInfoService {
SiteStatVo siteStatVo = new SiteStatVo(); SiteStatVo siteStatVo = new SiteStatVo();
siteStatVo.setCategoryCount(categoryMapper.selectCount(new QueryWrapper<CmsCategory>().eq("is_disable", 0))); siteStatVo.setCategoryCount(categoryMapper.selectCount(new QueryWrapper<CmsCategory>().eq("is_disable", 0)));
siteStatVo.setContentCount(contentMapper.selectCount(new QueryWrapper<CmsContent>().eq("del_flag", 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>())); siteStatVo.setStudentCount(studentInfoMapper.selectCount(new QueryWrapper<HitRegistrationStudentInfo>()));
return siteStatVo; return siteStatVo;
} }

View File

@ -5,14 +5,14 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
druid: 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: master:
url: jdbc:mysql://localhost:3306/ry-cms?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://122.51.230.86:3306/hgd_website?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: hgdRoot
password: root 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: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@ -50,20 +50,20 @@
"fileActionName": "uploadfile", /* controller,action */ "fileActionName": "uploadfile", /* controller,action */
"fileFieldName": "upfile", /* */ "fileFieldName": "upfile", /* */
"filePathFormat": "file/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */ "filePathFormat": "file/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */
"fileUrlPrefix": "", /* 访 */ "fileUrlPrefix": "https://f382b38516.zicp.fun", /* 访 */
"fileMaxSize": 51200000, /* B50MB */ "fileMaxSize": 51200000, /* B50MB */
"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" ], /* */ "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 */ "imageManagerActionName": "listimage", /* action */
"imageManagerListPath": "image/", /* */ "imageManagerListPath": "image/", /* */
"imageManagerListSize": 20, /* */ "imageManagerListSize": 20, /* */
"imageManagerUrlPrefix": "", /* 访 */ "imageManagerUrlPrefix": "https://f382b38516.zicp.fun", /* 访 */
"imageManagerInsertAlign": "none", /* */ "imageManagerInsertAlign": "none", /* */
"imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* */ "imageManagerAllowFiles": [".png", ".jpg", ".jpeg", ".gif", ".bmp"], /* */
/* */ /* */
"fileManagerActionName": "listfile", /* action */ "fileManagerActionName": "listfile", /* action */
"fileManagerListPath": "file/", /* */ "fileManagerListPath": "file/", /* */
"fileManagerUrlPrefix": "", /* 访 */ "fileManagerUrlPrefix": "https://f382b38516.zicp.fun", /* 访 */
"fileManagerListSize": 20, /* */ "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" ] /* */ "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" ] /* */
} }

View File

@ -41,8 +41,8 @@
<svg-icon icon-class="druid" class-name="cc-card-panel-icon" /> <svg-icon icon-class="druid" class-name="cc-card-panel-icon" />
</el-col> </el-col>
<el-col :span="16"> <el-col :span="16">
<el-statistic title="大赛数"> <el-statistic title="虚仿课程数">
<template slot="formatter"> {{ siteStat.competitionCount }} </template> <template slot="formatter"> {{ siteStat.imitationCount }} </template>
</el-statistic> </el-statistic>
</el-col> </el-col>
</el-row> </el-row>
@ -81,7 +81,7 @@ export default {
siteStat: { siteStat: {
categoryCount: 0, categoryCount: 0,
contentCount: 0, contentCount: 0,
competitionCount: 0, imitationCount: 0,
studentCount: 0, studentCount: 0,
} }
}; };