Java项目:平行志愿管理系统(java+Springboot+Maven+mybatis+Vue+Mysql)

news/2024/7/10 1:08:11 标签: java, mysql, maven, Springboot, vue

源码获取:博客首页 "资源" 里下载!

一、项目简述

本系统功能包括:
系统管理,招生计划,学生管理,录取结果,自动分配,调剂管理等等。

二、项目运行

环境配置:

Jdk1.8 + Tomcat8.5 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)。

项目技术:

Springboot + Maven + mybatis+ Vue 等等组成,B/S模式 + Maven管理等等。


 

 

 

 

 

登录控制层:

@RestController
@RequestMapping("/login")
public class LoginController {

    @Autowired
    LoginProperties properties;

    @Resource(name = "globalStorage")
    Map<String, Object> storage;

    @RequestMapping("/doLogin")
    public JsonResponse doLogin(String name, String pass, HttpSession session){
        if(properties.getAdminName().equals(name) && properties.getAdminPass().equals(pass)){
            storage.put("authSession", session);
            return new JsonResponse(JsonResponse.OK, null, null);
        } else {
            return new JsonResponse(JsonResponse.AUTH_ERR, null, "登陆失败");
        }
    }

    @RequestMapping("/checkLogin")
    public JsonResponse checkLogin(HttpSession session){
//        if (session.equals(storage.get("authSession"))){
            return new JsonResponse(JsonResponse.OK, null, "已登录");
//        } else {
//            return new JsonResponse(JsonResponse.AUTH_ERR, null, "未登录");
//        }
    }


    @RequestMapping("/logout")
    public JsonResponse logout(){
        storage.remove("authSession");
        return new JsonResponse(JsonResponse.OK, null, "注销成功");
    }
}

学生管理控制层:

@RestController
@RequestMapping("/student")
public class StudentController {

    @Autowired
    IStudentService studentService;

    @RequestMapping("/getStudentRaw")
    public JsonResponse getStudentRaw(@RequestParam(required = false, defaultValue = "1") Integer currentPage){
        if(currentPage == null || currentPage<=0)
            return new JsonResponse(JsonResponse.INVALID_REQUEST,null, null);
        return new JsonResponse(JsonResponse.OK, studentService.getStudentRaw(currentPage), null);
    }

    @RequestMapping("/getAdjustStudentRaw")
    public JsonResponse getAdjustStudentRaw(@RequestParam(required = false, defaultValue = "1") int currentPage){
        return new JsonResponse(JsonResponse.OK, studentService.getAdjustStudentRaw(currentPage), null);
    }

    @RequestMapping("/getExitStudentRaw")
    public JsonResponse getExitStudentRaw(@RequestParam(required = false, defaultValue = "1") int currentPage){
        return new JsonResponse(JsonResponse.OK, studentService.getExitStudentRaw(currentPage), null);
    }

    @RequestMapping("/doEnroll")
    public JsonResponse doEnroll(){
        studentService.doEnroll();
        return new JsonResponse(JsonResponse.OK, null, null);
    }

    @RequestMapping("/doAdjust")
    public JsonResponse doAdjust(){
        studentService.doAdjust();
        return new JsonResponse(JsonResponse.OK, null, null);
    }


//    StatisticsResult getResult(int currentPage, boolean desc);
    @RequestMapping("/getResult")
    public JsonResponse getResult(@RequestParam(required = false, defaultValue = "1") int currentPage,
                                  @RequestParam(required = false, defaultValue = "false") boolean desc,
                                  QueryResultOption option){
        return new JsonResponse(JsonResponse.OK, studentService.getResult(currentPage, desc, option), null);
    }
//    StatisticsResult getResultByDepartment( int departmentId, int currentPage, boolean desc);
    /**
     * @description t通过学院、专业、排名查询已弃用,请使用上面的getResult
     * @author 李宏鑫
     * @param null
     * @return
     * @updateTime 2021/1/7 20:53
     * @throws
     */
    @RequestMapping("/getResultByDepartment")
    @Deprecated
    public JsonResponse getResultByDepartment(int departmentId, @RequestParam(required = false, defaultValue = "1") int currentPage, @RequestParam(required = false, defaultValue = "false") boolean desc){
        return new JsonResponse(JsonResponse.OK, studentService.getResultByDepartment(departmentId, currentPage, desc), null);
    }
//    StatisticsResult getResultByMajor( String majorId, int currentPage, boolean desc);
    @RequestMapping("/getResultByMajor")
    @Deprecated
    public JsonResponse getResultByMajor(String majorId, @RequestParam(required = false, defaultValue = "1") int currentPage, @RequestParam(required = false, defaultValue = "false") boolean desc){
        return new JsonResponse(JsonResponse.OK, studentService.getResultByMajor(majorId, currentPage, desc), null);
    }

    @RequestMapping("/searchStudent")
    @Deprecated
    public JsonResponse searchStudent(@RequestParam(required = false, defaultValue = "1") int currentPage,String keyword){
        return new JsonResponse(JsonResponse.OK, studentService.searchStudent(currentPage,keyword), null);
    }


    @RequestMapping("/searchStudentByCandidate")
    public JsonResponse searchStudentByCandidate(@RequestParam(required = false, defaultValue = "1") int currentPage,String keyword){
        return new JsonResponse(JsonResponse.OK, studentService.searchStudentByCandidate(currentPage,keyword), null);
    }

    @RequestMapping("/getStudentBeforeRank")
    public JsonResponse getStudentBeforeRank(@RequestParam(required = false, defaultValue = "1") int currentPage, int rank){
        return new JsonResponse(JsonResponse.OK, studentService.getStudentBeforeRank(currentPage, rank), null);
    }


    @RequestMapping("/getStatisticsResult")
    public JsonResponse getStatisticsResult(){
        return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResult(), null);
    }
//    List<Map<String, Object>> getResultInDepartment(int departmentId);
    @RequestMapping("/getStatisticsResultInDepartment")
    public JsonResponse getStatisticsResultInDepartment(){
        return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResultInDepartment(), null);
    }
//    List<Map<String, Object>> getResultInMajor(String majorId);
    @RequestMapping("/getStatisticsResultInMajor")
    public JsonResponse getStatisticsResultInMajor(){
        return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResultInMajor(), null);
    }
    //    Map<String, Integer> getDistribute();
    @RequestMapping("/getDistribute")
    public JsonResponse getDistribute(){
        return new JsonResponse(JsonResponse.OK, studentService.getDistribute(), null);
    }
    //    Map<String, Integer> getDistributeInProvince(String province);
    @RequestMapping("/getDistributeInProvince")
    public JsonResponse getDistributeInProvince(String province){
        return new JsonResponse(JsonResponse.OK, studentService.getDistributeInProvince(province), null);
    }
    //    Map<String, Integer> getGradeDistribute();
    @RequestMapping("/getGradeDistribute")
    public JsonResponse getGradeDistribute(){
        return new JsonResponse(JsonResponse.OK, studentService.getGradeDistribute(), null);
    }
    //    Map<String, Integer> getGradeDistributeByDepartment( int departmentId);
    @RequestMapping("/getGradeDistributeByDepartment")
    public JsonResponse getGradeDistributeByDepartment(int departmentId){
        return new JsonResponse(JsonResponse.OK, studentService.getGradeDistributeByDepartment(departmentId), null);
    }
    //    Map<String, Integer> getGradeDistributeByMajor(String majorId);
    @RequestMapping("/getGradeDistributeByMajor")
    public JsonResponse getGradeDistributeByMajor(String majorId){
        return new JsonResponse(JsonResponse.OK, studentService.getGradeDistributeByMajor(majorId), null);
    }
    //    Map<String, Integer> getCountDistributeInDepartment();
    @RequestMapping("/getCountDistributeInDepartment")
    public JsonResponse getCountDistributeInDepartment(){
        return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInDepartment(), null);
    }
    //    Map<String, Integer> getCountDistributeInMajor();
    @RequestMapping("/getCountDistributeInMajor")
    public JsonResponse getCountDistributeInMajor(){
        return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInMajor(), null);
    }
    //    Map<String, Integer> getCountDistributeInMajorByDepartment(int departmentId);
    @RequestMapping("/getCountDistributeInMajorByDepartment")
    public JsonResponse getCountDistributeInMajorByDepartment(int departmentId){
        return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInMajorByDepartment(departmentId), null);
    }

    @RequestMapping("/reset")
    @Deprecated
    public JsonResponse reset(){
        studentService.reset();
        return new JsonResponse(JsonResponse.OK, null, null);
    }

    @RequestMapping("/formalReady")
    @Deprecated
    public JsonResponse formalReady(){
        studentService.formallyReady();
        return new JsonResponse(JsonResponse.OK, null, null);
    }
}

部门管理控制层:

@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Autowired
    private IDepartmentService departmentService;


    @RequestMapping("/getDepartments")
    public JsonResponse getDepartments(){
        return new JsonResponse(JsonResponse.OK, departmentService.getDepartments(), null);
    }
}

源码获取:博客首页 "资源" 里下载!


http://www.niftyadmin.cn/n/1554315.html

相关文章

ajax(判断浏览器创建xmlhttprequest对象),XMLHTTPRequest对象的创建与浏览器的兼容问题...

MLHttpRequest 对象是AJAX功能的核心&#xff0c;要开发AJAX程序必须从了解XMLHttpRequest 对象开始。了解XMLHttpRequest 对象就先从创建XMLHttpRequest 对象开始&#xff0c;在不同的浏览器中创建XMLHttpRequest 对象使用不同的方法&#xff1a;先看看IE创建XMLHttpRequest 对…

什么叫侧面指纹识别_带上口罩才知重要性:指纹识别是如何发展至今的

面部识别一直被很多朋友认定为未来的智能手机生物识别的发展大趋势&#xff0c;但可能谁都没想到&#xff0c;一场病毒性肺炎的爆发让面部识别几近瘫痪。此时面部识别的内心是崩溃的&#xff1a;脸包得跟粽子一样&#xff0c;还让我怎么识别&#xff1f;实际上&#xff0c;当面…

Java项目:花店商城系统(java+Springboot+Maven+mybatis+Vue+Mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 一、项目简述 本系统功能包括&#xff1a; 商品的分类展示&#xff0c;用户的注册登录&#xff0c;购物车&#xff0c;订单结算&#xff0c;购物车加减&#xff0c;后台商品管理&#xff0c;分类管理&#x…

微软免费服务器一个月多少流量,Win 10发布首日全球网络流量飙升35% 微软Hold住吗?...

Windows 10凤凰科技讯 北京时间7月30日消息&#xff0c;昨天是Windows 10正式发布的第一天&#xff0c;对无数翘首企盼的用户来说这无疑是令人激动和开心的一天&#xff0c;不过&#xff0c;全球互联网能够处理数百万人同时下载高达3.5GB的Windows 10安装包吗&#xff1f;截至目…

Java项目:宠物医院预约挂号系统(java+JSP+Spring+SpringBoot+MyBatis+html+layui+maven+Mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 一、项目简述功能包括&#xff1a; 用户分为宠物&#xff0c;医生&#xff0c;管理员&#xff0c;宠物主人可进行注册选择医生挂号&#xff0c;选择日期&#xff0c;选择号源&#xff0c;医生可进行宠物接诊…

服务器的硬盘内存型号大小怎么查看,linux 如何查看硬盘大小,内存大小等系统信息及硬件信息-Fun言...

linux CPU大小[rootidc ~]# cat /proc/cpuinfo |grep “model name” && cat /proc/cpuinfo |grep “physical id”model name: Intel(R) Xeon(TM) CPU 2.80GHzmodel name: Intel(R) Xeon(TM) CPU 2.80GHzmodel name: Intel(R) Xeon(TM) CPU 2.80GHzmodel name: Intel(…

ui在一定范围内移动 unity_手游UI界面测试

UI界面是每个游戏都会有且量特别大的内容&#xff0c;这边就简单说明下UI界面测试的通用的基础内容常用手游开发引擎介绍UI界面测试之前&#xff0c;先简单说下手游常用的引擎1、unity 3d全平台兼容&#xff0c;用户量大&#xff0c;入门简单特定效果需自己开发&#xff0c;开发…

Java项目:诚途旅游系统(java+JSP+Spring+SSM+Mysql)

源码获取&#xff1a;博客首页 "资源" 里下载&#xff01; 采用ssm架构实现的旅游网站系统 包括网站展示和后台管理功能&#xff0c;网站主要是页面浏览以及评论、制定旅游方案、智能推荐功能 后台就是维护网站展示的内容&#xff0c;添加旅游景点、管理用户、查看…