ssm电子竞技管理平台源码和文档

ssm电子竞技管理平台源码和文档048

 开发工具:idea 
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm

摘  要

现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本电子竞技管理平台就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此电子竞技管理平台利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发.电子竞技管理平台的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。

关键词:电子竞技管理平台;SSM框架;Mysql;自动化

研究背景

当前社会各行业领域竞争压力非常大,随着当前时代的信息化,科学化发展,让社会各行业领域都争相使用新的信息技术,对行业内的各种相关数据进行科学化,规范化管理。这样的大环境让那些止步不前,不接受信息改革带来的信息技术的企业随时面临被淘汰,被取代的风险。所以当今,各个行业领域,不管是传统的教育行业,餐饮行业,还是旅游行业,医疗行业等领域都将使用新的信息技术进行信息革命,改变传统的纸质化,需要人手工处理工作事务的办公环境。软件信息技术能够覆盖社会各行业领域是时代的发展要求,各种数据以及文件真正实现电子化是信息社会发展的不可逆转的必然趋势。本电子竞技管理平台也是紧跟科学技术的发展,运用当今一流的软件技术实现软件系统的开发,让经理管理信息完全通过管理系统实现科学化,规范化,程序化管理。从而帮助信息管理者节省事务处理的时间,降低数据处理的错误率,对于基础数据的管理水平可以起到促进作用,也从一定程度上对随意的业务管理工作进行了避免,同时,电子竞技管理平台的数据库里面存储的各种动态信息,也为上层管理人员作出重大决策提供了大量的事实依据。总之,电子竞技管理平台是一款可以真正提升管理者的办公效率的软件系统。

 

package com.controller;

import java.text.SimpleDateFormat;
import java.util.*;
import javax.servlet.http.HttpServletRequest;

import com.entity.JiangchengEntity;
import com.entity.JingliEntity;
import com.service.JiangchengService;
import com.service.JingliService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

import com.entity.ShenshuEntity;

import com.service.ShenshuService;
import com.utils.PageUtils;
import com.utils.R;

/**
 * 申请表
 * 后端接口
 * @author
 * @email
 * @date 2021-03-02
*/
@RestController
@Controller
@RequestMapping("/shenshu")
public class ShenshuController {
    private static final Logger logger = LoggerFactory.getLogger(ShenshuController.class);

    @Autowired
    private ShenshuService shenshuService;

    @Autowired
    private JingliService jingliService;

    @Autowired
    private JiangchengService jiangchengService;


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("Controller:"+this.getClass().getName()+",page方法");
        Object role = request.getSession().getAttribute("role");
        PageUtils page = null;
        if(role.equals("选手") || role.equals("教练")){
            params.put("yh",request.getSession().getAttribute("userId"));
            page = shenshuService.queryPage(params);
        }else if(role.equals("经理")) {
            Integer userId = (Integer) request.getSession().getAttribute("userId");
            JingliEntity jingliEntity = jingliService.selectById(userId);
            if(jingliEntity == null){
                return R.error();
            }
            params.put("jlbTypes", jingliEntity.getJlbTypes());
            page = shenshuService.queryPage(params);
        }else{
            page = shenshuService.queryPage(params);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        logger.debug("Controller:"+this.getClass().getName()+",info方法");
        ShenshuEntity shenshu = shenshuService.selectById(id);
        if(shenshu!=null){
            return R.ok().put("data", shenshu);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody ShenshuEntity shenshu, HttpServletRequest request){
        logger.debug("Controller:"+this.getClass().getName()+",save");
        Wrapper<ShenshuEntity> queryWrapper = new EntityWrapper<ShenshuEntity>()
                .eq("jlb_types", shenshu.getJlbTypes())
                .eq("xs_types", shenshu.getXsTypes())
                .like("notice_content", shenshu.getNoticeContent()+"%")
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        ShenshuEntity shenshuEntity = shenshuService.selectOne(queryWrapper);
        if(shenshu.getTemporary() == shenshu.getJlbTypes()){
            return R.error("要转的俱乐部不能和现在所在的俱乐部相同");
        }

        if(shenshu.getJlbTypes() == 1){
            if(shenshu.getTemporary()==2){
                shenshu.setNoticeContent("俱乐部1 转 俱乐部2");
            }
            if(shenshu.getTemporary()==3){
                shenshu.setNoticeContent("俱乐部1 转 俱乐部3");
            }
        }
        if(shenshu.getJlbTypes() == 2){
            if(shenshu.getTemporary()==1){
                shenshu.setNoticeContent("俱乐部2 转 俱乐部1");
            }
            if(shenshu.getTemporary()==3){
                shenshu.setNoticeContent("俱乐部2 转 俱乐部3");
            }
        }
        if(shenshu.getJlbTypes() == 3){
            if(shenshu.getTemporary()==2){
                shenshu.setNoticeContent("俱乐部3 转 俱乐部2");
            }
            if(shenshu.getTemporary()==1){
                shenshu.setNoticeContent("俱乐部3 转 俱乐部1");
            }
        }

        if(shenshuEntity==null){
            shenshuService.insert(shenshu);
            return R.ok();
        }else {
            return R.error(511,"你已经申请过了,请不要重复申请");
        }
    }

    /**
    * 修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody ShenshuEntity shenshu, HttpServletRequest request){
        logger.debug("Controller:"+this.getClass().getName()+",update");
        //根据字段查询是否有相同数据
        Wrapper<ShenshuEntity> queryWrapper = new EntityWrapper<ShenshuEntity>()
            .notIn("id",shenshu.getId())
            .eq("jlb_types", shenshu.getJlbTypes())
            .eq("xs_types", shenshu.getXsTypes())
            .eq("notice_content", shenshu.getNoticeContent())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        ShenshuEntity shenshuEntity = shenshuService.selectOne(queryWrapper);
        if(shenshuEntity==null){
            shenshuService.updateById(shenshu);//根据id更新
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }


    /**
     * 申请
     */
    @RequestMapping("/apply")
    public R apply(@RequestBody Integer ids){
        JiangchengEntity jiangcheng = jiangchengService.selectById(ids);
        if(jiangcheng == null){
            return R.error();
        }
        ShenshuEntity shenshu = new ShenshuEntity();
        shenshu.setCreateTime(new Date());
        shenshu.setJlbTypes(jiangcheng.getJlbTypes());
        shenshu.setXsTypes(jiangcheng.getXsTypes());
        shenshu.setNoticeContent(jiangcheng.getNoticeContent());
        Wrapper<ShenshuEntity> queryWrapper = new EntityWrapper<ShenshuEntity>()
                .eq("jlb_types", shenshu.getJlbTypes())
                .eq("xs_types", shenshu.getXsTypes())
                .like("notice_content", shenshu.getNoticeContent()+"%")
                ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        ShenshuEntity shenshuEntity = shenshuService.selectOne(queryWrapper);
        if(shenshuEntity==null){
            shenshuService.insert(shenshu);
            return R.ok();
        }else {
            return R.error(511,"你已经申请过了,请不要重复申请");
        }
    }

    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        logger.debug("Controller:"+this.getClass().getName()+",delete");
        shenshuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

 

package com.controller;

import java.text.SimpleDateFormat;
import java.util.*;
import javax.servlet.http.HttpServletRequest;

import com.annotation.IgnoreAuth;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
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.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;

import com.entity.JulebuEntity;

import com.service.JulebuService;
import com.utils.PageUtils;
import com.utils.R;

/**
 * 俱乐部表
 * 后端接口
 * @author
 * @email
 * @date 2023-03-02
*/
@RestController
@Controller
@RequestMapping("/julebu")
public class JulebuController {
    private static final Logger logger = LoggerFactory.getLogger(JulebuController.class);

    @Autowired
    private JulebuService julebuService;

    /**
    * 后端列表
    */
    @IgnoreAuth
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params){
        logger.debug("Controller:"+this.getClass().getName()+",page方法");
        PageUtils page = julebuService.queryPage(params);
        return R.ok().put("data", page);
    }
    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        logger.debug("Controller:"+this.getClass().getName()+",info方法");
        JulebuEntity julebu = julebuService.selectById(id);
        if(julebu!=null){
            return R.ok().put("data", julebu);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody JulebuEntity julebu, HttpServletRequest request){
        logger.debug("Controller:"+this.getClass().getName()+",save");
        Wrapper<JulebuEntity> queryWrapper = new EntityWrapper<JulebuEntity>()
            .eq("name", julebu.getName())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        JulebuEntity julebuEntity = julebuService.selectOne(queryWrapper);
        if(julebuEntity==null){
            julebuService.insert(julebu);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody JulebuEntity julebu, HttpServletRequest request){
        logger.debug("Controller:"+this.getClass().getName()+",update");
        //根据字段查询是否有相同数据
        Wrapper<JulebuEntity> queryWrapper = new EntityWrapper<JulebuEntity>()
            .notIn("id",julebu.getId())
            .eq("name", julebu.getName())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        JulebuEntity julebuEntity = julebuService.selectOne(queryWrapper);
        if(julebuEntity==null){
            julebuService.updateById(julebu);//根据id更新
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }


    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        logger.debug("Controller:"+this.getClass().getName()+",delete");
        julebuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序猿毕业分享网

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值