• 大小: 1.17MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-28
  • 语言: Java
  • 标签: ssm  

资源简介

ssm在线选课平台,项目使用:spring springmvc mybatis shiro bootstript mybatisgentor jquery jsp mysql eclipse jdk7等。 所以需要看懂代码:必须具有以上储备知识。

资源截图

代码片段和文件信息

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 = null;
        //页码对象
        PagingVO pagingVO = new PagingVO();
        //设置总页数
        pagingVO.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        546  2019-03-14 13:01  Online_Study_System-master\.gitignore

     文件      11357  2019-03-14 13:01  Online_Study_System-master\LICENSE

     文件       1258  2019-03-14 13:01  Online_Study_System-master\README.md

     文件       6883  2019-05-14 15:03  Online_Study_System-master\pom.xml

     文件       1436  2019-05-14 15:06  Online_Study_System-master\.project

     文件       1330  2019-05-14 15:06  Online_Study_System-master\.classpath

     文件       6612  2019-03-14 13:01  Online_Study_System-master\sql\online_study_system.sql

     文件      14203  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\controller\AdminController.java

     文件       1858  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\controller\LoginController.java

     文件       1532  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\controller\RestPasswordController.java

     文件      14593  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\controller\StudentController.java

     文件       7082  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\controller\TeacherController.java

     文件       1861  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\controller\common\GlobalConstant.java

     文件       3567  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\controller\common\SHA1Utils.java

     文件        800  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\controller\converter\CustomDateConverter.java

     文件        640  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\exception\CustomException.java

     文件       2049  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\exception\CustomExceptionResolver.java

     文件        924  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\CourseMapper.java

     文件       7850  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\CourseMapper.xml

     文件        770  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\RoleMapper.java

     文件       6382  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\RoleMapper.xml

     文件        711  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\StudentCourseMapper.java

     文件       6500  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\StudentCourseMapper.xml

     文件        898  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\StudentMapper.java

     文件       8273  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\StudentMapper.xml

     文件        898  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\TeacherMapper.java

     文件       8254  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\TeacherMapper.xml

     文件        849  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\UserloginMapper.java

     文件       6966  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\mapper\UserloginMapper.xml

     文件        906  2019-03-14 13:01  Online_Study_System-master\src\main\java\com\wxs\po\Course.java

............此处省略299个文件信息

评论

共有 条评论