idea 數據庫mysql5.7+ 數據庫鏈接工具:navcat,小海豚等
?? 隨著信息化時代的到來,管理系統都趨向于智能化、系統化,平面設計課程在線學習平臺系統也不例外,但目前國內的市場仍都使用人工管理,市場規模越來越大,同時信息量也越來越龐大,人工管理顯然已無法應對時代的變化,而平面設計課程在線學習平臺系統能很好地解決這一問題,輕松應對平面設計課程在線學習平時的工作,既能提高人力物力財力,又能加快工作的效率,取代人工管理是必然趨勢。
本平面設計課程在線學習平臺系統以ssm作為框架,b/s模式以及MySql作為后臺運行的數據庫,同時使用Tomcat用為系統的服務器。本系統主要包括以下功能模塊:首頁,個人中心,學生管理,教師管理,課程類型管理,課程學習管理,試題講解管理,作業信息管理,作業提交管理,作業批改管理,在線測試管理,試題管理,我的收藏管理,在線討論,系統管理,考試管理等模塊,通過這些模塊的實現能夠基本滿足日常平面設計課程在線學習管理的操作。
本文著重闡述了平面設計課程在線學習平臺系統的分析、設計與實現,首先介紹開發系統和環境配置、數據庫的設計,接著說明功能模塊的詳細實現,最后進行了總結。
關鍵詞:平面設計課程在線學習平臺系統; ssm;MySql數據庫;Tomcat;
基于ssm平面設計課程在線學習平臺系統源碼和論文746
演示視頻:
基于ssm平面設計課程在線學習平臺系統源碼和論文
Abstract
With the advent of the era of information technology, management systems tend to be intelligent, systematic, graphic design courses online learning platform system is no exception, but the current domestic market still use manual management, the size of the market is more and more big, at the same time, the amount of information is becoming more and more big, artificial management has clearly unable to cope with the changes of The Times, The graphic design course online learning platform system can well solve this problem, easy to cope with the usual work of graphic design course online learning, can not only improve human and material resources and financial resources, but also speed up the efficiency of work, replacing manual management is an inevitable trend.
The online learning platform system of the graphic design course takes SSM as the framework, B/S mode and MySql as the database running in the background, and Tomcat is used as the server of the system. The system mainly includes the following functional modules: Home page, personal center, student management, teacher management, course type management, course learning management, test explanation management, homework information management, homework submission management, homework correcting management, online test management, test management, my collection management, online discussion, system management, examination management and other modules, Through the realization of these modules can basically meet the daily graphic design course online learning management operation.
This paper focuses on the graphic design course online learning platform system analysis, design and implementation, first introduces the development system and environment configuration, database design, then explains the detailed implementation of functional modules, and finally summarized.
Key words: Graphic design course online learning platform system; ssm; MySql database; Tomcat;
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.ExamrecordEntity;
import com.entity.view.ExamrecordView;import com.service.ExamrecordService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 考試記錄表* 后端接口* @author * @email * @date 2022-01-04 15:17:01*/
@RestController
@RequestMapping("/examrecord")
public class ExamrecordController {@Autowiredprivate ExamrecordService examrecordService;/*** 考試記錄接口*/@RequestMapping("/groupby")public R page2(@RequestParam Map<String, Object> params,ExamrecordEntity examrecord, HttpServletRequest request){if(!request.getSession().getAttribute("role").toString().equals("管理員")) {examrecord.setUserid((Long)request.getSession().getAttribute("userId"));}EntityWrapper<ExamrecordEntity> ew = new EntityWrapper<ExamrecordEntity>();PageUtils page = examrecordService.queryPageGroupBy(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, examrecord), params), params));return R.ok().put("data", page);}/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,ExamrecordEntity examrecord, HttpServletRequest request){if(!request.getSession().getAttribute("role").toString().equals("管理員")) {examrecord.setUserid((Long)request.getSession().getAttribute("userId"));}EntityWrapper<ExamrecordEntity> ew = new EntityWrapper<ExamrecordEntity>();PageUtils page = examrecordService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, examrecord), params), params));return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,ExamrecordEntity examrecord, HttpServletRequest request){if(!request.getSession().getAttribute("role").toString().equals("管理員")) {examrecord.setUserid((Long)request.getSession().getAttribute("userId"));}EntityWrapper<ExamrecordEntity> ew = new EntityWrapper<ExamrecordEntity>();PageUtils page = examrecordService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, examrecord), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( ExamrecordEntity examrecord){EntityWrapper<ExamrecordEntity> ew = new EntityWrapper<ExamrecordEntity>();ew.allEq(MPUtil.allEQMapPre( examrecord, "examrecord")); return R.ok().put("data", examrecordService.selectListView(ew));}/*** 查詢*/@RequestMapping("/query")public R query(ExamrecordEntity examrecord){EntityWrapper< ExamrecordEntity> ew = new EntityWrapper< ExamrecordEntity>();ew.allEq(MPUtil.allEQMapPre( examrecord, "examrecord")); ExamrecordView examrecordView = examrecordService.selectView(ew);return R.ok("查詢考試記錄表成功").put("data", examrecordView);}/*** 后端詳情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){ExamrecordEntity examrecord = examrecordService.selectById(id);return R.ok().put("data", examrecord);}/*** 前端詳情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){ExamrecordEntity examrecord = examrecordService.selectById(id);return R.ok().put("data", examrecord);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody ExamrecordEntity examrecord, HttpServletRequest request){examrecord.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(examrecord);examrecord.setUserid((Long)request.getSession().getAttribute("userId"));examrecordService.insert(examrecord);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody ExamrecordEntity examrecord, HttpServletRequest request){examrecord.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(examrecord);examrecord.setUserid((Long)request.getSession().getAttribute("userId"));examrecordService.insert(examrecord);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody ExamrecordEntity examrecord, HttpServletRequest request){//ValidatorUtils.validateEntity(examrecord);examrecordService.updateById(examrecord);//全部更新return R.ok();}/*** 刪除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){examrecordService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<ExamrecordEntity> wrapper = new EntityWrapper<ExamrecordEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}if(!request.getSession().getAttribute("role").toString().equals("管理員")) {wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));}int count = examrecordService.selectCount(wrapper);return R.ok().put("count", count);}/*** 當重新考試時,刪除考生的某個試卷的所有考試記錄*/@RequestMapping("/deleteRecords")public R deleteRecords(@RequestParam Long userid,@RequestParam Long paperid){examrecordService.delete(new EntityWrapper<ExamrecordEntity>().eq("paperid", paperid).eq("userid", userid));return R.ok();}}
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.ZuoyetijiaoEntity;
import com.entity.view.ZuoyetijiaoView;import com.service.ZuoyetijiaoService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 作業提交* 后端接口* @author * @email * @date 2022-01-04 15:17:01*/
@RestController
@RequestMapping("/zuoyetijiao")
public class ZuoyetijiaoController {@Autowiredprivate ZuoyetijiaoService zuoyetijiaoService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,ZuoyetijiaoEntity zuoyetijiao, HttpServletRequest request){String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {zuoyetijiao.setGonghao((String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {zuoyetijiao.setXuehao((String)request.getSession().getAttribute("username"));}EntityWrapper<ZuoyetijiaoEntity> ew = new EntityWrapper<ZuoyetijiaoEntity>();PageUtils page = zuoyetijiaoService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zuoyetijiao), params), params));return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,ZuoyetijiaoEntity zuoyetijiao, HttpServletRequest request){EntityWrapper<ZuoyetijiaoEntity> ew = new EntityWrapper<ZuoyetijiaoEntity>();PageUtils page = zuoyetijiaoService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, zuoyetijiao), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( ZuoyetijiaoEntity zuoyetijiao){EntityWrapper<ZuoyetijiaoEntity> ew = new EntityWrapper<ZuoyetijiaoEntity>();ew.allEq(MPUtil.allEQMapPre( zuoyetijiao, "zuoyetijiao")); return R.ok().put("data", zuoyetijiaoService.selectListView(ew));}/*** 查詢*/@RequestMapping("/query")public R query(ZuoyetijiaoEntity zuoyetijiao){EntityWrapper< ZuoyetijiaoEntity> ew = new EntityWrapper< ZuoyetijiaoEntity>();ew.allEq(MPUtil.allEQMapPre( zuoyetijiao, "zuoyetijiao")); ZuoyetijiaoView zuoyetijiaoView = zuoyetijiaoService.selectView(ew);return R.ok("查詢作業提交成功").put("data", zuoyetijiaoView);}/*** 后端詳情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){ZuoyetijiaoEntity zuoyetijiao = zuoyetijiaoService.selectById(id);return R.ok().put("data", zuoyetijiao);}/*** 前端詳情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){ZuoyetijiaoEntity zuoyetijiao = zuoyetijiaoService.selectById(id);return R.ok().put("data", zuoyetijiao);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody ZuoyetijiaoEntity zuoyetijiao, HttpServletRequest request){zuoyetijiao.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(zuoyetijiao);zuoyetijiaoService.insert(zuoyetijiao);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody ZuoyetijiaoEntity zuoyetijiao, HttpServletRequest request){zuoyetijiao.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(zuoyetijiao);zuoyetijiaoService.insert(zuoyetijiao);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody ZuoyetijiaoEntity zuoyetijiao, HttpServletRequest request){//ValidatorUtils.validateEntity(zuoyetijiao);zuoyetijiaoService.updateById(zuoyetijiao);//全部更新return R.ok();}/*** 刪除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){zuoyetijiaoService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<ZuoyetijiaoEntity> wrapper = new EntityWrapper<ZuoyetijiaoEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}String tableName = request.getSession().getAttribute("tableName").toString();if(tableName.equals("jiaoshi")) {wrapper.eq("gonghao", (String)request.getSession().getAttribute("username"));}if(tableName.equals("xuesheng")) {wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));}int count = zuoyetijiaoService.selectCount(wrapper);return R.ok().put("count", count);}}