資源簡介
名稱:基于ssm的在線學習系統
框架:SSM
運行環境:jdk8+tomcat8+mysql
開發工具:IntelliJ IDEA
maven項目
代碼片段和文件信息
package?com.wxs.controller;
import?com.wxs.controller.common.GlobalConstant;
import?com.wxs.controller.common.SHA1Utils;
import?com.wxs.exception.CustomException;
import?com.wxs.po.*;
import?com.wxs.service.*;
import?org.springframework.beans.BeanUtils;
import?org.springframework.stereotype.Controller;
import?org.springframework.ui.Model;
import?org.springframework.web.bind.annotation.RequestMapping;
import?org.springframework.web.bind.annotation.RequestMethod;
import?javax.annotation.Resource;
import?java.util.ArrayList;
import?java.util.List;
/**
?*?Author:?jitwxs
?*?Date:?2017-11-3
?*?管理員Controller層
?*/
@Controller
@RequestMapping(“/admin“)
public?class?AdminController?{
????@Resource(name?=?“studentServiceImpl“)
????private?StudentService?studentService;
????@Resource(name?=?“teacherServiceImpl“)
????private?TeacherService?teacherService;
????@Resource(name?=?“courseServiceImpl“)
????private?CourseService?courseService;
????@Resource(name?=?“studentCourseServiceImpl“)
????private?StudentCourseService?studentCourseService;
????@Resource(name?=?“userloginServiceImpl“)
????private?UserloginService?userloginService;
????/*?-----?普通方法區?START?-----?*/
????/**
?????*?List轉List
?????*?@param?courseList
?????*?@return
?????*?@throws?Exception
?????*/
????List?getCourseCustomList(List?courseList)?throws?Exception{
????????List?list?=?new?ArrayList();
????????for?(Course?course?:?courseList)?{
????????????CourseCustom?courseCustom?=?new?CourseCustom();
????????????BeanUtils.copyProperties(coursecourseCustom);
????????????Integer?teacherId?=?course.getTeacherId();
????????????if(teacherId?!=?null)?{
????????????????Teacher?teacher?=?teacherService.findById(teacherId);
????????????????String?teacherName?=?teacher.getName();
????????????????courseCustom.setTeacherName(teacherName);
????????????}?else?{
????????????????courseCustom.setTeacherName(““);
????????????}
????????????list.add(courseCustom);
????????}
????????return?list;
????}
????/**
?????*?Course轉CourseCustom
?????*?@param?course
?????*?@return
?????*?@throws?Exception
?????*/
????CourseCustom?getCourseCustom(Course?course)?throws?Exception{
????????CourseCustom?courseCustom?=?new?CourseCustom();
????????BeanUtils.copyProperties(coursecourseCustom);
????????Integer?teacherId?=?course.getTeacherId();
????????if(teacherId?!=?null)?{
????????????Teacher?teacher?=?teacherService.findById(teacherId);
????????????String?teacherName?=?teacher.getName();
????????????courseCustom.setTeacherName(teacherName);
????????}?else?{
????????????courseCustom.setTeacherName(““);
????????}
????????return?courseCustom;
????}
????/*?-----?普通方法區?END?-----?*/
????/*?-----?課程管理區?START?-----?*/
????@RequestMapping(“/showCourse“)
????public?String?showCourse(Model?model?Integer?page)?throws?Exception?{
????????List?list
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-11-01?11:14??基于ssm的在線學習系統\
?????目錄???????????0??2020-10-20?13:16??基于ssm的在線學習系統\Online_Study_System\
?????目錄???????????0??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\
?????文件?????????592??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.gitignore
?????文件?????????312??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\config
?????文件??????????73??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\desc
?????文件??????????23??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\HEAD
?????目錄???????????0??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\
?????文件?????????478??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\applypatch-msg.sample
?????文件?????????896??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\commit-msg.sample
?????文件????????4655??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\fsmonitor-watchman.sample
?????文件?????????189??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\post-update.sample
?????文件?????????424??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\pre-applypatch.sample
?????文件????????1643??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\pre-commit.sample
?????文件?????????416??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\pre-merge-commit.sample
?????文件????????1348??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\pre-push.sample
?????文件????????4898??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\pre-reba
?????文件?????????544??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\pre-receive.sample
?????文件????????1492??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\prepare-commit-msg.sample
?????文件????????3635??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\hooks\update.sample
?????文件???????13437??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\index
?????目錄???????????0??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\info\
?????文件?????????240??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\info\exclude
?????目錄???????????0??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\logs\
?????文件?????????190??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\logs\HEAD
?????目錄???????????0??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\logs\refs\
?????目錄???????????0??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\logs\refs\heads\
?????文件?????????190??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\logs\refs\heads\master
?????目錄???????????0??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\logs\refs\remotes\
?????目錄???????????0??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\logs\refs\remotes\origin\
?????文件?????????190??2020-10-20?12:56??基于ssm的在線學習系統\Online_Study_System\.git\logs\refs\remotes\origin\HEAD
............此處省略489個文件信息
- 上一篇:agensgraph-2.1.3.tar.gz
- 下一篇:OA系統SSM畢設項目
評論
共有 條評論