栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

基于Javaweb实现的教务管理系统

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

基于Javaweb实现的教务管理系统

使用技术栈

前端::vue
后端::springboot +mysql8.0+mybatisplus+redis6.0

具体实现

目前所使用的技术都是在当今企业,主流的技术栈,SpringBoot框架没有过多的繁杂的配置,能够实现快速开发,
通过Mysql8.0优化之后,优化了数据的存储,对于经常性不变的数据,通过使用redis作为缓存…

交流

如果大家感兴趣,可以联系我哦!

package com.stum.web.controller.stum;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
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.RestController;
import com.stum.common.annotation.Log;
import com.stum.common.core.controller.baseController;
import com.stum.common.core.domain.AjaxResult;
import com.stum.common.enums.BusinessType;
import com.stum.web.domain.TbAdmin;
import com.stum.web.service.ITbAdminService;
import com.stum.common.utils.poi.ExcelUtil;
import com.stum.common.core.page.TableDataInfo;


@RestController
@RequestMapping("/system/admin")
public class TbAdminController extends baseController
{
    @Autowired
    private ITbAdminService tbAdminService;

    
    @PreAuthorize("@ss.hasPermi('system:admin:list')")
    @GetMapping("/list")
    public TableDataInfo list(TbAdmin tbAdmin)
    {
        startPage();
        List list = tbAdminService.selectTbAdminList(tbAdmin);
        return getDataTable(list);
    }

    
    @PreAuthorize("@ss.hasPermi('system:admin:export')")
    @Log(title = "管理员", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, TbAdmin tbAdmin)
    {
        List list = tbAdminService.selectTbAdminList(tbAdmin);
        ExcelUtil util = new ExcelUtil(TbAdmin.class);
        util.exportExcel(response, list, "管理员数据");
    }

    
    @PreAuthorize("@ss.hasPermi('system:admin:query')")
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") Long id)
    {
        return AjaxResult.success(tbAdminService.selectTbAdminById(id));
    }

    
    @PreAuthorize("@ss.hasPermi('system:admin:add')")
    @Log(title = "管理员", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody TbAdmin tbAdmin)
    {
        return toAjax(tbAdminService.insertTbAdmin(tbAdmin));
    }

    
    @PreAuthorize("@ss.hasPermi('system:admin:edit')")
    @Log(title = "管理员", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody TbAdmin tbAdmin)
    {
        return toAjax(tbAdminService.updateTbAdmin(tbAdmin));
    }

    
    @PreAuthorize("@ss.hasPermi('system:admin:remove')")
    @Log(title = "管理员", businessType = BusinessType.DELETE)
	@DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable Long[] ids)
    {
        return toAjax(tbAdminService.deleteTbAdminByIds(ids));
    }
}

欢迎大家来交流学习

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/667412.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号