• 大小: 24.61MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-23
  • 语言: 数据库
  • 标签: ssm  web  idea  

资源简介

ssm框架 研究生信息管理系统 IDEA mysql tomcat mybatis逆向工程 bootstrap前端 含管理员 研究生角色

资源截图

代码片段和文件信息

package com.system.controller;

import com.system.model.*;
import com.system.model.Class;
import com.system.services.interfaces.*;
import com.system.util.FormatDate;
import com.system.util.StrToTime;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;

@Controller
@RequestMapping(“/admin“)
public class AdminController {
    @Autowired
    private IAdminService adminService;
    @Autowired
    private IClassService classService;
    @Autowired
    private ClassExample classExample;
    @Autowired
    private IStudentService studentService;
    @Autowired
    private StudentExample studentExample;
    @Autowired
    private ITutorService tutorService;
    @Autowired
    private TutorExample tutorExample;
    @Autowired
    private SpecialtyExample specialtyExample;
    @Autowired
    private ISpecialtyService specialtyService;
    @Autowired
    private CourseExample courseExample;
    @Autowired
    private ICourseService courseService;
    @Autowired
    private RewardPunishExample rewardPunishExample;
    @Autowired
    private IRewardPunishService rewardPunishService;
    @Autowired
    private TermExample termExample;
    @Autowired
    private ITermSerivice termSerivice;
    @Autowired
    private RewardPunishRecordExample rewardPunishRecordExample;
    @Autowired
    private IRewardPunishRecordService rewardPunishRecordService;
    @RequestMapping(value = “/admin_login“method = RequestMethod.POST)
    public String AdminLogin(@RequestParam(value = “login_info“) String admin_name @RequestParam(value = “login_psw“) String admin_password HttpSession session Model model) {
        int login_result = adminService.adminLogin(admin_name admin_password);
        System.out.println(login_result);
        if(login_result==1){
            Admin login_admin = adminService.selectAdminByPK(admin_name);
            session.setAttribute(“login_admin“login_admin);
            return “redirect:course/showAllCourse“;
        }
        else if(login_result==-1) {
            model.addAttribute(“error_msg“ “管理员密码错误“);
            return “admin/error“;
        }
        else {
            model.addAttribute(“error_msg“ “此账号不存在“);
            return “admin/error“;
        }
    }

    @RequestMapping(“/exit“)
    public String exit(HttpSession session){
        session.invalidate();
        return “exit“;
    }
    @RequestMapping

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-12-11 19:31  PostgraduateInfoManagementSystem\
     目录           0  2019-01-04 09:43  PostgraduateInfoManagementSystem\.git\
     文件         937  2018-12-04 16:37  PostgraduateInfoManagementSystem\.gitignore
     文件           7  2018-12-27 19:43  PostgraduateInfoManagementSystem\.git\COMMIT_EDITMSG
     文件         327  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\config
     文件          73  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\description
     文件         122  2018-12-04 16:32  PostgraduateInfoManagementSystem\.git\FETCH_HEAD
     文件          23  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\HEAD
     目录           0  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\
     文件         478  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\applypatch-msg.sample
     文件         896  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\commit-msg.sample
     文件        3327  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\fsmonitor-watchman.sample
     文件         189  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\post-update.sample
     文件         424  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\pre-applypatch.sample
     文件        1642  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\pre-commit.sample
     文件        1348  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\pre-push.sample
     文件        4898  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\pre-rebase.sample
     文件         544  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\pre-receive.sample
     文件        1492  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\prepare-commit-msg.sample
     文件        3610  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\hooks\update.sample
     文件       29254  2018-12-27 19:43  PostgraduateInfoManagementSystem\.git\index
     目录           0  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\info\
     文件         240  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\info\exclude
     目录           0  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\logs\
     文件        3347  2018-12-27 19:43  PostgraduateInfoManagementSystem\.git\logs\HEAD
     目录           0  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\logs\refs\
     目录           0  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\logs\refs\heads\
     文件        3347  2018-12-27 19:43  PostgraduateInfoManagementSystem\.git\logs\refs\heads\master
     目录           0  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\logs\refs\remotes\
     目录           0  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\logs\refs\remotes\origin\
     文件         205  2018-12-03 08:33  PostgraduateInfoManagementSystem\.git\logs\refs\remotes\origin\HEAD
............此处省略1664个文件信息

评论

共有 条评论