权限控制

This commit is contained in:
13405411873 2024-09-16 22:47:48 +08:00
parent 6d2875feb0
commit fc557fda5e
14 changed files with 86 additions and 55 deletions

View File

@ -43,7 +43,7 @@ public class HitRegInfoController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(HitRegInfo hitRegInfo) public TableDataInfo list(HitRegInfo hitRegInfo)
{ {
startPage();
List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoList(hitRegInfo); List<HitRegInfo> list = hitRegInfoService.selectHitRegInfoList(hitRegInfo);
return getDataTable(list); return getDataTable(list);
} }

View File

@ -34,7 +34,6 @@ public class HitRegistrationTeachInfoController extends BaseController
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(HitRegistrationTeachInfo hitRegistrationTeachInfo) public TableDataInfo list(HitRegistrationTeachInfo hitRegistrationTeachInfo)
{ {
startPage();
List<HitRegistrationTeachInfo> list = hitRegistrationTeachInfoService.selectHitRegistrationTeachInfoList(hitRegistrationTeachInfo); List<HitRegistrationTeachInfo> list = hitRegistrationTeachInfoService.selectHitRegistrationTeachInfoList(hitRegistrationTeachInfo);
return getDataTable(list); return getDataTable(list);

View File

@ -18,6 +18,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.domain.model.LoginUser; import com.ruoyi.common.core.domain.model.LoginUser;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysUserMapper; import com.ruoyi.system.mapper.SysUserMapper;
@ -88,9 +89,10 @@ public class HitCompetitionStudentInfoServiceImpl extends ServiceImpl<HitCompeti
//当前教师的学校 //当前教师的学校
LoginUser loginUser = SecurityUtils.getLoginUser(); LoginUser loginUser = SecurityUtils.getLoginUser();
HitRegistrationTeachInfo hitRegistrationTeachInfo = hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoByUserId(loginUser.getUserId()); HitRegistrationTeachInfo hitRegistrationTeachInfo = hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoByUserId(loginUser.getUserId());
if(ObjectUtils.isNotEmpty(hitRegistrationTeachInfo)){ if(ObjectUtils.isNotEmpty(hitRegistrationTeachInfo)&&hitRegistrationTeachInfo.getStatus().equals("1")){
hitCompetitionStudentInfo.setSchoolName(hitRegistrationTeachInfo.getSchoolName()); hitCompetitionStudentInfo.setSchoolName(hitRegistrationTeachInfo.getSchoolName());
} }
PageUtils.startPage();
return hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoList(hitCompetitionStudentInfo); return hitCompetitionStudentInfoMapper.selectHitCompetitionStudentInfoList(hitCompetitionStudentInfo);
} }

View File

@ -20,6 +20,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
import com.ruoyi.common.core.domain.HitRegistrationTeachInfo; import com.ruoyi.common.core.domain.HitRegistrationTeachInfo;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -82,6 +83,7 @@ public class HitRegInfoServiceImpl implements IHitRegInfoService
if (teacherInfo != null && teacherInfo.getType().equals("1")) { if (teacherInfo != null && teacherInfo.getType().equals("1")) {
hitRegInfo.setSchoolName(teacherInfo.getSchoolName()); hitRegInfo.setSchoolName(teacherInfo.getSchoolName());
} }
PageUtils.startPage();
List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo); List<HitRegInfo> hitRegInfos = hitRegInfoMapper.selectHitRegInfoList(hitRegInfo);
for (HitRegInfo regInfo : hitRegInfos) { for (HitRegInfo regInfo : hitRegInfos) {
HitRegInfoUser hitRegInfoUser =new HitRegInfoUser(); HitRegInfoUser hitRegInfoUser =new HitRegInfoUser();

View File

@ -16,10 +16,7 @@ import com.ruoyi.common.core.domain.model.RegisterBody;
import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.exception.user.CaptchaException; import com.ruoyi.common.exception.user.CaptchaException;
import com.ruoyi.common.exception.user.CaptchaExpireException; import com.ruoyi.common.exception.user.CaptchaExpireException;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.*;
import com.ruoyi.common.utils.MessageUtils;
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.manager.AsyncManager; import com.ruoyi.framework.manager.AsyncManager;
import com.ruoyi.framework.manager.factory.AsyncFactory; import com.ruoyi.framework.manager.factory.AsyncFactory;
import com.ruoyi.framework.web.service.SysRegisterService; import com.ruoyi.framework.web.service.SysRegisterService;
@ -93,6 +90,7 @@ public class HitRegistrationTeachInfoServiceImpl implements IHitRegistrationTeac
if(ObjectUtils.isNotEmpty(hitRegistrationTeachInfo1)){ if(ObjectUtils.isNotEmpty(hitRegistrationTeachInfo1)){
hitRegistrationTeachInfo.setSchoolName(hitRegistrationTeachInfo1.getSchoolName()); hitRegistrationTeachInfo.setSchoolName(hitRegistrationTeachInfo1.getSchoolName());
} }
PageUtils.startPage();
return hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoList(hitRegistrationTeachInfo); return hitRegistrationTeachInfoMapper.selectHitRegistrationTeachInfoList(hitRegistrationTeachInfo);
} }

View File

@ -6,12 +6,12 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
# url: jdbc:mysql://61.156.90.46:3360/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true url: jdbc:mysql://61.156.90.46:3360/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true # url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
# username: obrhgd username: obrhgd
username: root # username: root
# password: Obr7890&*() password: Obr7890&*()
password: 123456 # password: 123456
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@ -16,7 +16,7 @@ ruoyi:
# 开发环境配置 # 开发环境配置
server: server:
# 服务器的HTTP端口默认为8080 # 服务器的HTTP端口默认为8080
port: 8080 port: 8081
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: /hgdWebsite context-path: /hgdWebsite
@ -74,7 +74,7 @@ spring:
# 数据库索引 # 数据库索引
database: 9 database: 9
# 密码 # 密码
password: 123456 password: Obr1234!@#$
# password: # password:
# 连接超时时间 # 连接超时时间
timeout: 10s timeout: 10s

View File

@ -7,7 +7,7 @@
"imageCompressEnable": true, /* ,true */ "imageCompressEnable": true, /* ,true */
"imageCompressBorder": 1600, /* */ "imageCompressBorder": 1600, /* */
"imageInsertAlign": "none", /* */ "imageInsertAlign": "none", /* */
"imageUrlPrefix": "http://192.168.31.25:8080", /* 访 */ "imageUrlPrefix": "https://meevexp.oberyun.com/hgdWebsite", /* 访 */
"imagePathFormat": "image/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */ "imagePathFormat": "image/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */
/* {filename} , */ /* {filename} , */
/* {rand:6} , */ /* {rand:6} , */
@ -43,27 +43,27 @@
"videoActionName": "uploadvideo", /* action */ "videoActionName": "uploadvideo", /* action */
"videoFieldName": "upfile", /* */ "videoFieldName": "upfile", /* */
"videoPathFormat": "video/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */ "videoPathFormat": "video/{yyyy}{mm}{dd}/{time}{rand:6}", /* , */
"videoUrlPrefix": "http://192.168.31.25:8080", /* 访 */ "videoUrlPrefix": "https://meevexp.oberyun.com/hgdWebsite", /* 访 */
"videoMaxSize": 102400000, /* B100MB */ "videoMaxSize": 102400000, /* B100MB */
"videoAllowFiles": [ ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* */ "videoAllowFiles": [ ".flv", ".swf", ".mkv", ".avi", ".rm", ".rmvb", ".mpeg", ".mpg", ".ogg", ".ogv", ".mov", ".wmv", ".mp4", ".webm", ".mp3", ".wav", ".mid"], /* */
/* */ /* */
"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": "http://192.168.31.25:8080", /* 访 */ "fileUrlPrefix": "https://meevexp.oberyun.com/hgdWebsite", /* 访 */
"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": "http://192.168.31.25:8080", /* 访 */ "imageManagerUrlPrefix": "https://meevexp.oberyun.com/hgdWebsite", /* 访 */
"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": "http://192.168.31.25:8080", /* 访 */ "fileManagerUrlPrefix": "https://meevexp.oberyun.com/hgdWebsite", /* 访 */
"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

@ -43,8 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="type != null and type != ''"> and type = #{type}</if> <if test="type != null and type != ''"> and type = #{type}</if>
<if test="status != null and status != ''"> and status = #{status}</if> <if test="status != null and status != ''"> and status = #{status}</if>
<if test="year != null and year != ''"> and create_time like concat(#{year},'%') </if> <if test="year != null and year != ''"> and create_time like concat(#{year},'%') </if>
<if test="division != null and division != ''"> and division = #{division}</if>
</where> </where>
order by create_time desc order by teacher_school, create_time desc
</select> </select>
<select id="selectHitRegistrationTeachInfoById" parameterType="Long" resultMap="HitRegistrationTeachInfoResult"> <select id="selectHitRegistrationTeachInfoById" parameterType="Long" resultMap="HitRegistrationTeachInfoResult">
@ -55,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
resultType="com.ruoyi.common.core.domain.HitRegistrationTeachInfo"> resultType="com.ruoyi.common.core.domain.HitRegistrationTeachInfo">
select * from hit_registration_teach_info select * from hit_registration_teach_info
where user_id = #{userId} and YEAR(create_time) = YEAR(CURRENT_DATE) where user_id = #{userId} and YEAR(create_time) = YEAR(CURRENT_DATE)
</select> </select>
<insert id="insertHitRegistrationTeachInfo" parameterType="com.ruoyi.common.core.domain.HitRegistrationTeachInfo"> <insert id="insertHitRegistrationTeachInfo" parameterType="com.ruoyi.common.core.domain.HitRegistrationTeachInfo">

View File

@ -6,12 +6,12 @@ spring:
druid: druid:
# 主库数据源 # 主库数据源
master: master:
# url: jdbc:mysql://61.156.90.46:3360/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true url: jdbc:mysql://61.156.90.46:3360/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true # url: jdbc:mysql://localhost:3306/hgd_website?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&allowMultiQueries=true
# username: obrhgd username: obrhgd
username: root # username: root
# password: Obr7890&*() password: Obr7890&*()
password: 123456 # password: 123456
# 从库数据源 # 从库数据源
slave: slave:
# 从数据源开关/默认关闭 # 从数据源开关/默认关闭

View File

@ -215,11 +215,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<delete id="deleteUserById" parameterType="Long"> <delete id="deleteUserById" parameterType="Long">
update sys_user set del_flag = '2' where user_id = #{userId} delete from sys_user where user_id = #{userId}
</delete> </delete>
<delete id="deleteUserByIds" parameterType="Long"> <delete id="deleteUserByIds" parameterType="Long">
update sys_user set del_flag = '2' where user_id in delete from sys_user where user_id in
<foreach collection="array" item="userId" open="(" separator="," close=")"> <foreach collection="array" item="userId" open="(" separator="," close=")">
#{userId} #{userId}
</foreach> </foreach>

View File

@ -5,4 +5,4 @@ VUE_APP_TITLE = 虚拟仿真实验教学中心
ENV = 'production' ENV = 'production'
# 若依管理系统/生产环境 # 若依管理系统/生产环境
VUE_APP_BASE_API = 'http://122.51.230.86:8001' VUE_APP_BASE_API = 'https://meevexp.oberyun.com/hgdWebsite'

View File

@ -47,11 +47,11 @@
v-hasPermi="['hit:hitRegistrationStudentInfo:export']" v-hasPermi="['hit:hitRegistrationStudentInfo:export']"
>导出</el-button> >导出</el-button>
</el-col>--> </el-col>-->
<el-col :span="1.5" v-hasPermi="['hit:open']"> <!-- <el-col :span="1.5" v-hasPermi="['hit:open']">-->
<el-switch v-model="registerStatus" @change="updateRegisterStatus" active-value="1" inactive-value="0" <!-- <el-switch v-model="registerStatus" @change="updateRegisterStatus" active-value="1" inactive-value="0"-->
active-text="开启报名" inactive-text="关闭报名" > <!-- active-text="开启报名" inactive-text="关闭报名" >-->
</el-switch> <!-- </el-switch>-->
</el-col> <!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>

View File

@ -9,6 +9,33 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="赛区" prop="division">
<el-select v-model="queryParams.division" filterable allow-create default-first-option
placeholder="请选择赛区">
<el-option v-for="item in dict.type.com_region" :key="item.value" :label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="类型" prop="type">
<el-select v-model="queryParams.type"
placeholder="请选择类型">
<el-option key="0" label="指导老师"
value="0">
</el-option>
<el-option key="1" label="领队老师"
value="1">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="学校名称" prop="schoolName">
<el-input
v-model="queryParams.schoolName"
placeholder="请输入学校名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="手机号" prop="teacherNumber"> <el-form-item label="手机号" prop="teacherNumber">
<el-input <el-input
v-model="queryParams.teacherNumber" v-model="queryParams.teacherNumber"
@ -131,6 +158,7 @@ import { listHitRegistrationTeachInfo, getHitRegistrationTeachInfo, delHitRegist
export default { export default {
name: "HitRegistrationTeachInfo", name: "HitRegistrationTeachInfo",
dicts: ["com_region"],
data() { data() {
return { return {
// //