Java项目-基于springboot框架的广场舞团系统项目实战(附源码+文档)

作者:计算机学长阿伟

开发技术:SpringBoot、SSM、Vue、MySQL、ElementUI等,"文末源码"。

开发运行环境

  • 开发语言:Java
  • 数据库:MySQL
  • 技术:SpringBoot、Vue、Mybaits Plus、ELementUI
  • 工具:IDEA/Ecilpse、Navicat、Maven

源码下载地址:

download.csdn.net/download/weixin_53180424/89905382

文档目录

【如需全文请按文末获取联系】

一、项目简介

本项目是一个综合性的社团管理系统,旨在方便社团内部的管理和成员之间的交流。系统涵盖了多个部门和功能模块,包括社团、个人中心、后台管理和首页等。通过这些模块,社团可以轻松管理成员信息、组织活动、发布公告资讯,并促进成员之间的交流。同时,个人中心提供了个性化的设置和管理功能,让成员能够方便地查看和管理自己的信息。整个系统结构清晰,模块之间相互作用,为社团的运营和管理提供了有力的支持。

二、系统设计

2.1软件功能模块设计

2.2数据库设计

社团E-R图,如图4-2所示:

社团管理E-R图,如图4-3所示:

社团活动管理E-R图如图4-4所示。

三、系统项目部分截图

3.1后台系统部分页面效果

登录,用户通过填写注册时输入的用户名、密码、选择角色等信息进行登录操作。

3.1.1管理员功能模块

管理员登陆系统后,可以查看首页,个人中心,地区管理,舞团类型管理,社团管理,用户管理,成员信息管理,社团活动管理,交流中心,系统管理等功能等功能,还能对每个功能逐一进行相应操作,如图5-5所示。

地区管理;在地区管理页面中可以对索引、地区、等内容进行查看,修改和删除操作;

舞团类型管理;在舞团类型管理页面中可以对索引、舞团类型等内容进行查看,修改和删除操作

社团管理;在社团管理页面中可以对索引、社团编号、地区、社团名称、社团图片、社团类型、负责人、联系电话等内容进行查看,修改和删除操作

用户管理;在用户管理页面中可以对索引、用户名、姓名性别、头像、手机等内容进行查看,修改和删除操作;

社团活动管理;在社团活动管理页面中可以对索引、活动名称、活动流程、活动图片、舞蹈曲目、视频内容、发布日期、社团编号、社团名称等内容进行查看,修改和删除操作;

交流中心;在交流中心页面中可以对索引、帖子标题、用户名、状态、等内容进行修改和删除操作;

3.1.2社团功能模块

社团登录系统后可以查看首页、个人中心、成员信息管理、社团活动管理等功能并进行详细的操作;

成员信息管理;在成员信息管理页面中可以对索引、社团编号、社团名称、申请内容、申请日期、用户名、手机、审核回复、审核状态、审核等内容进行查看,修改和删除操作;

社团活动管理;在社团活动管理页面中可以对索引、活动名称、活动类型、活动图片、舞蹈曲目、视频内容、发布日期、社团编号、社团名称等内容进行查看,修改和删除操作;

用户功能模块

用户登录系统后可以查看首页、个人中心、成员信息管理、我的收藏管理等功能并进行详细的操作;

成员信息管理;在成员信息管理页面中可以对索引、社团编号、社团名称、申请内容、申请日期、用户名、手机、审核回复、审核状态、等内容进行查看,修改和删除操作;如图5-16所示。

我的收藏管理;在我的收藏管理页面中可以查看索引、收藏名称、收藏图片、推荐类型等内容,并进行查看详情和删除操作;

3.2前台系统部分页面效果

广场舞团,在系统首页可以查看首页,社团,社团活动,交流中心,公告资讯,个人中心,后台管理等功能并进行详细操作。

社团,在社团页面可以查看社团编号,地区,社团名称,舞团类型等功能并进行搜索等操作。

社团活动,在社团活动页面可以查看活动名称,活动类型等功能并进行搜索等操作。

四、部分核心代码

java 复制代码
package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
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.annotation.IgnoreAuth;

import com.entity.YonghuEntity;
import com.entity.view.YonghuView;

import com.service.YonghuService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;

/**
 * 用户
 * 后端接口
 */
@RestController
@RequestMapping("/yonghu")
public class YonghuController {
    @Autowired
    private YonghuService yonghuService;


    
	@Autowired
	private TokenService tokenService;
	
	/**
	 * 登录
	 */
	@IgnoreAuth
	@RequestMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
		YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username));
		if(user==null || !user.getMima().equals(password)) {
			return R.error("账号或密码不正确");
		}
		
		String token = tokenService.generateToken(user.getId(), username,"yonghu",  "用户" );
		return R.ok().put("token", token);
	}
	
	/**
     * 注册
     */
	@IgnoreAuth
    @RequestMapping("/register")
    public R register(@RequestBody YonghuEntity yonghu){
    	//ValidatorUtils.validateEntity(yonghu);
    	YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
		if(user!=null) {
			return R.error("注册用户已存在");
		}
		Long uId = new Date().getTime();
		yonghu.setId(uId);
        yonghuService.insert(yonghu);
        return R.ok();
    }

	
	/**
	 * 退出
	 */
	@RequestMapping("/logout")
	public R logout(HttpServletRequest request) {
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    	Long id = (Long)request.getSession().getAttribute("userId");
        YonghuEntity user = yonghuService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    	YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", username));
    	if(user==null) {
    		return R.error("账号不存在");
    	}
        user.setMima("123456");
        yonghuService.updateById(user);
        return R.ok("密码已重置为:123456");
    }


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,YonghuEntity yonghu,
		HttpServletRequest request){
        EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
		PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,YonghuEntity yonghu, 
		HttpServletRequest request){
        EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
		PageUtils page = yonghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yonghu), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( YonghuEntity yonghu){
       	EntityWrapper<YonghuEntity> ew = new EntityWrapper<YonghuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu")); 
        return R.ok().put("data", yonghuService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(YonghuEntity yonghu){
        EntityWrapper< YonghuEntity> ew = new EntityWrapper< YonghuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( yonghu, "yonghu")); 
		YonghuView yonghuView =  yonghuService.selectView(ew);
		return R.ok("查询用户成功").put("data", yonghuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        YonghuEntity yonghu = yonghuService.selectById(id);
        return R.ok().put("data", yonghu);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        YonghuEntity yonghu = yonghuService.selectById(id);
        return R.ok().put("data", yonghu);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
    	yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(yonghu);
    	YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
		if(user!=null) {
			return R.error("用户已存在");
		}
		yonghu.setId(new Date().getTime());
        yonghuService.insert(yonghu);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
    	yonghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(yonghu);
    	YonghuEntity user = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("yonghuming", yonghu.getYonghuming()));
		if(user!=null) {
			return R.error("用户已存在");
		}
		yonghu.setId(new Date().getTime());
        yonghuService.insert(yonghu);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
        //ValidatorUtils.validateEntity(yonghu);
        yonghuService.updateById(yonghu);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        yonghuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<YonghuEntity> wrapper = new EntityWrapper<YonghuEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = yonghuService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	

}

获取源码或文档

如需对应的论文或文档,以及其他定制需求,也可以下方添加联系我。

相关推荐
考虑考虑10 小时前
Jpa使用union all
java·spring boot·后端
用户37215742613511 小时前
Java 实现 Excel 与 TXT 文本高效互转
java
浮游本尊12 小时前
Java学习第22天 - 云原生与容器化
java
渣哥13 小时前
原来 Java 里线程安全集合有这么多种
java
间彧13 小时前
Spring Boot集成Spring Security完整指南
java
间彧14 小时前
Spring Secutiy基本原理及工作流程
java
Java水解15 小时前
JAVA经典面试题附答案(持续更新版)
java·后端·面试
洛小豆17 小时前
在Java中,Integer.parseInt和Integer.valueOf有什么区别
java·后端·面试
前端小张同学17 小时前
服务器上如何搭建jenkins 服务CI/CD😎😎
java·后端
ytadpole17 小时前
Spring Cloud Gateway:一次不规范 URL 引发的路由转发404问题排查
java·后端