文末获取源码,项目编号: S 070 。 \color{red}{文末获取源码,项目编号:S070。} 文末获取源码,项目编号:S070。
基于JAVA+Vue+SpringBoot+MySQL的软件学院思政案例库系统,包含了新闻资讯、特色专区、院系专区、热门专题、热门课程、思政课程、思政案例、案例点赞、案例打分模块,还包含系统自带的用户管理、部门管理、角色管理、菜单管理、日志管理、数据字典管理、文件管理、图表展示等基础模块,软件学院思政案例库系统基于角色的访问控制,给系统管理员、普通教师使用,可将权限精确到按钮级别,您可以自定义角色并分配权限,系统适合设计精确的权限约束需求。
源码下载
按照软件工程规范描述管理员端需求,细化用例规约,合理设计数据库,实现管理员端以下功能。
按照软件工程规范描述普通教师端需求,细化用例规约,合理设计数据库,实现普通教师端以下功能。
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询思政案例")
public Result<IPage<ThoCase>> getByPage(@ModelAttribute ThoCase thoCase ,@ModelAttribute PageVo page){
QueryWrapper<ThoCase> qw = new QueryWrapper<>();
User currUser = securityUtil.getCurrUser();
QueryWrapper<User> userQw = new QueryWrapper<>();
userQw.eq("id",currUser.getId());
userQw.inSql("id","SELECT user_id FROM a_user_role WHERE del_flag = 0 AND role_id = '1536606659751841799'");
if(iUserService.count(userQw) < 1L) {
qw.eq("status","审核通过");
}
if(!ZwzNullUtils.isNull(thoCase.getTitle())) {
qw.like("title",thoCase.getTitle());
}
if(!ZwzNullUtils.isNull(thoCase.getQues())) {
qw.like("ques",thoCase.getQues());
}
if(!ZwzNullUtils.isNull(thoCase.getType())) {
qw.like("type",thoCase.getType());
}
IPage<ThoCase> data = iThoCaseService.page(PageUtil.initMpPage(page),qw);
for (ThoCase c : data.getRecords()) {
QueryWrapper<ThoZan> zanQw = new QueryWrapper<>();
zanQw.eq("case_id",c.getId());
zanQw.eq("user_id",currUser.getId());
c.setZanFlag(iThoZanService.count(zanQw));
}
return new ResultUtil<IPage<ThoCase>>().setData(data);
}
@RequestMapping(value = "/audit", method = RequestMethod.POST)
@ApiOperation(value = "审核思政案例")
public Result<Object> audit(@RequestParam String id,@RequestParam String type,@RequestParam String msg){
ThoCase c = iThoCaseService.getById(id);
if(c == null) {
return ResultUtil.error("案例不存在");
}
c.setStatus(type);
c.setAuditMsg(msg);
iThoCaseService.saveOrUpdate(c);
return ResultUtil.success();
}
@RequestMapping(value = "/getByPage", method = RequestMethod.GET)
@ApiOperation(value = "查询思政课程")
public Result<IPage<ThoCurriculum>> getByPage(@ModelAttribute ThoCurriculum thoCurriculum ,@ModelAttribute PageVo page){
QueryWrapper<ThoCurriculum> qw = new QueryWrapper<>();
if(!ZwzNullUtils.isNull(thoCurriculum.getTitle())) {
qw.like("title",thoCurriculum.getTitle());
}
if(!ZwzNullUtils.isNull(thoCurriculum.getContent())) {
qw.like("content",thoCurriculum.getContent());
}
IPage<ThoCurriculum> data = iThoCurriculumService.page(PageUtil.initMpPage(page),qw);
return new ResultUtil<IPage<ThoCurriculum>>().setData(data);
}
@RequestMapping(value = "/addOne", method = RequestMethod.GET)
@ApiOperation(value = "新增点赞")
public Result<Object> addOne(@RequestParam String id){
ThoCase c = iThoCaseService.getById(id);
if(c == null) {
return ResultUtil.error("案例不存在");
}
User currUser = securityUtil.getCurrUser();
ThoZan z = new ThoZan();
z.setCaseId(c.getId());
z.setTitle(c.getTitle());
z.setUserId(currUser.getId());
iThoZanService.saveOrUpdate(z);
return ResultUtil.success();
}
@RequestMapping(value = "/addOne", method = RequestMethod.GET)
@ApiOperation(value = "新增评语")
public Result<Object> addOne(@RequestParam String id,@RequestParam String value,@RequestParam String content){
ThoCase c = iThoCaseService.getById(id);
if(c == null) {
return ResultUtil.error("案例不存在");
}
User currUser = securityUtil.getCurrUser();
ThoScore z = new ThoScore();
z.setCaseId(c.getId());
z.setTitle(c.getTitle());
z.setValue(value);
z.setContent(content);
z.setUserId(currUser.getId());
iThoScoreService.saveOrUpdate(z);
return ResultUtil.success();
}
下载本系统代码或使用本系统的用户,必须同意以下内容,否则请勿下载!