赞
踩
作者简介:Java领域优质创作者、CSDN博客专家 、CSDN内容合伙人、掘金特邀作者、阿里云博客专家、51CTO特邀作者、多年架构师设计经验、腾讯课堂常驻讲师
主要内容:Java项目、Python项目、前端项目、人工智能与大数据、简历模板、学习资料、面试题库、技术互助
收藏点赞不迷路 关注作者有好处
文末获取源码
语言环境:Java: jdk1.8
数据库:Mysql: mysql5.7
应用服务器:Tomcat: tomcat8.5.31
开发工具:IDEA或eclipse
基于SpringBoot+Vue实现的社团管理系统是为高校学生打造的一款在线管理平台,它可以实时完成信息处理,还缩短社团信息信息管理流程,使其系统化和规范化。
系统功能说明
1、系统共有管理员、社团社长、学生三个角色,管理员拥有所有系统最高权限。
2、社团社长可以审核入团申请、发布社团活动、发起社团收费、发布并管理社团通知、管理社团成员
3、用户可以申请社团、查看系统、社团通知,查看并修改个人信息
-
-
- @Service("teamsService")
- public class TeamsServiceImpl implements TeamsService {
-
- @Autowired
- private UsersDao usersDao;
-
- @Autowired
- private TeamTypesDao teamTypesDao;
-
- @Autowired
- private TeamsDao teamsDao;
-
- @Autowired
- private MembersDao membersDao;
-
- @Autowired
- private NoticesDao noticesDao;
-
- @Autowired
- private ActivitiesDao activitiesDao;
-
- @Autowired
- private ActiveLogsDao activeLogsDao;
-
- @Autowired
- private ApplyLogsDao applyLogsDao;
-
- @Autowired
- private PayLogsDao payLogsDao;
-
-
- @Override
- @Transactional
- public void add(Teams teams) {
-
- teamsDao.insert(teams);
-
- Members member = new Members();
- member.setId(IDUtils.makeIDByCurrent());
- member.setUserId(teams.getManager());
- member.setTeamId(teams.getId());
- member.setCreateTime(DateUtils.getNowDate());
- membersDao.insert(member);
-
- Users user = usersDao.selectById(teams.getManager());
- user.setType(1);
- usersDao.updateById(user);
- }
-
- @Override
- @Transactional
- public void update(Teams teams) {
-
- teamsDao.updateById(teams);
- }
-
- @Override
- @Transactional
- public void delete(Teams teams) {
-
- QueryWrapper<Notices> qw_notice = new QueryWrapper<Notices>();
- qw_notice.eq("team_id", teams.getId());
- noticesDao.delete(qw_notice);
-
- QueryWrapper<PayLogs> qw_pay = new QueryWrapper<PayLogs>();
- qw_pay.eq("team_id", teams.getId());
- payLogsDao.delete(qw_pay);
-
- QueryWrapper<ApplyLogs> qw_apply = new QueryWrapper<ApplyLogs>();
- qw_apply.eq("team_id", teams.getId());
- applyLogsDao.delete(qw_apply);
-
- QueryWrapper<Members> qw_members = new QueryWrapper<Members>();
- qw_members.eq("team_id", teams.getId());
- membersDao.delete(qw_members);
-
- QueryWrapper<Activities> qw_active = new QueryWrapper<Activities>();
- qw_active.eq("team_id", teams.getId());
- for(Activities activitie : activitiesDao.selectList(qw_active)){
-
- QueryWrapper<ActiveLogs> qw_active_log = new QueryWrapper<ActiveLogs>();
- qw_active_log.eq("active_id", activitie.getId());
- activeLogsDao.delete(qw_active_log);
- }
- activitiesDao.delete(qw_active);
-
- teamsDao.deleteById(teams);
-
- QueryWrapper<Teams> qw_team = new QueryWrapper<Teams>();
- qw_team.eq("manager", teams.getManager());
- if(teamsDao.selectCount(qw_team) <= 0){
-
- Users user = usersDao.selectById(teams.getManager());
- user.setType(2);
- usersDao.updateById(user);
- }
- }
-
- @Override
- @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
- public Teams getOne(String id) {
-
- Teams teams = teamsDao.selectById(id);
- return teams;
- }
-
- @Override
- @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
- public List<Teams> getAll(){
-
- QueryWrapper<Teams> qw = new QueryWrapper<Teams>();
- qw.orderByDesc("create_time");
-
- List<Teams> list = teamsDao.selectList(qw);
- return list;
- }
-
- @Override
- @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
- public List<Teams> getListByManId(String manId){
-
- QueryWrapper<Teams> qw = new QueryWrapper<Teams>();
- qw.eq("manager", manId);
- qw.orderByDesc("create_time");
-
- List<Teams> list = teamsDao.selectList(qw);
- return list;
- }
-
- @Override
- @Transactional(readOnly = true, propagation = Propagation.SUPPORTS)
- public PageData getPageInfo(Long pageIndex, Long pageSize, Teams teams) {
-
- QueryWrapper<Teams> qw = new QueryWrapper<Teams>();
-
- if(StringUtils.isNotNullOrEmpty(teams.getName())){
- qw.like("name", teams.getName());
- }
- if(StringUtils.isNotNullOrEmpty(teams.getTypeId())){
- qw.eq("type_id", teams.getTypeId());
- }
- if(StringUtils.isNotNullOrEmpty(teams.getManager())){
- qw.eq("manager", teams.getManager());
- }
- qw.orderByDesc("create_time");
- Page<Teams> page =
- teamsDao.selectPage(new Page<Teams>(pageIndex, pageSize), qw);
- return parsePage(page);
- }
-
- /**
- * 转化分页查询的结果
- */
- public PageData parsePage(Page<Teams> p) {
-
- List<Map<String, Object>> resl = new ArrayList<Map<String, Object>>();
- for (Teams teams : p.getRecords()) {
- Map<String, Object> temp = new HashMap<String, Object>();
- temp.put("id", teams.getId());
- temp.put("name", teams.getName());
- temp.put("createTime", teams.getCreateTime());
- temp.put("total", teams.getTotal());
-
- Users user = usersDao.selectById(teams.getManager());
- temp.put("manager", teams.getManager());
- temp.put("managerName", user.getName());
- temp.put("managerPhone", user.getPhone());
- temp.put("managerAddress", user.getAddress());
-
- TeamTypes teamType = teamTypesDao.selectById(teams.getTypeId());
- temp.put("typeId", teams.getTypeId());
- temp.put("typeName", teamType.getName());
- resl.add(temp);
- }
-
- PageData pageData = new PageData(p.getCurrent(), p.getSize(), p.getTotal(), resl);
- return pageData;
- }
- }
基于Java开发、Python开发、PHP开发、C#开发等相关语言开发的实战项目
基于Nodejs、Vue等前端技术开发的前端实战项目
基于微信小程序和安卓APP应用开发的相关作品
基于51单片机等嵌入式物联网开发应用
基于各类算法实现的AI智能应用
基于大数据实现的各类数据管理和推荐系统
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。