Compare commits
No commits in common. "SAMS-R" and "v0.0" have entirely different histories.
|
|
@ -0,0 +1,2 @@
|
|||
/mvnw text eol=lf
|
||||
*.cmd text eol=crlf
|
||||
|
|
@ -1 +0,0 @@
|
|||
custom: http://doc.ruoyi.vip/ruoyi-vue/other/donate.html
|
||||
|
|
@ -1,47 +1,33 @@
|
|||
######################################################################
|
||||
# Build Tools
|
||||
|
||||
.gradle
|
||||
/build/
|
||||
!gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
######################################################################
|
||||
# IDE
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### JRebel ###
|
||||
rebel.xml
|
||||
|
||||
### NetBeans ###
|
||||
nbproject/private/
|
||||
build/*
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
.nb-gradle/
|
||||
|
||||
######################################################################
|
||||
# Others
|
||||
*.log
|
||||
*.xml.versionsBackup
|
||||
*.swp
|
||||
|
||||
!*/build/*.java
|
||||
!*/build/*.html
|
||||
!*/build/*.xml
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
wrapperVersion=3.3.2
|
||||
distributionType=only-script
|
||||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
|
||||
20
LICENSE
|
|
@ -1,20 +0,0 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 RuoYi
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
168
README.md
|
|
@ -1,168 +0,0 @@
|
|||
# SAMS校园社团活动管理系统
|
||||
|
||||
[](https://gitee.com/y_project/RuoYi-Vue) [](https://spring.io/) [](https://vuejs.org/)[](https://gitee.com/y_project/RuoYi-Vue/blob/master/LICENSE)
|
||||
|
||||
>基于SpringBoot + Vue 的校园社团活动全流程管理平台
|
||||
>
|
||||
>毕业设计项目 | 山东建筑大学 | 2025届
|
||||
|
||||
## 项目简介
|
||||
|
||||
本项目是基于 RuoYi-Vue 前后端分离版开发的校园社团活动管理系统,旨在为高校师生提供一个高效、便捷的社团活动组织与管理平台。系统支持活动的发布、审核、参与、互动等功能,提升校园社团活动的管理效率和参与体验。
|
||||
|
||||
## 技术栈
|
||||
|
||||
### 前端
|
||||
|
||||
| 技术 | 说明 | 版本信息 |
|
||||
| ---------- | --------- | -------- |
|
||||
| Vue.js | 前端框架 | 2.6.x |
|
||||
| Element UI | UI 组件库 | 2.15.x |
|
||||
| Axios | 网络请求 | 0.21.x |
|
||||
|
||||
### 后端
|
||||
|
||||
| 技术 | 说明 | 版本信息 |
|
||||
| --------------- | ------------ | -------- |
|
||||
| Java EE | Java开发环境 | 1.8+ |
|
||||
| Spring Boot | 后端开发框架 | 2.5.15 |
|
||||
| Spring Security | 安全框架 | 5.7.12 |
|
||||
| MyBatis | ORM 框架 | 3.x |
|
||||
| JWT | 身份验证机制 | 0.9.1 |
|
||||
|
||||
### 数据库
|
||||
|
||||
| 技术 | 说明 | 版本信息 |
|
||||
| ----- | ------------ | ------------ |
|
||||
| MySQL | 关系型数据库 | 5.7+ 建议8.0 |
|
||||
| Redis | 缓存数据库 | >=3 |
|
||||
|
||||
### 构建工具
|
||||
|
||||
| 技术 | 说明 | 版本信息 |
|
||||
| ------- | ------------------ | -------- |
|
||||
| Maven | 项目管理和构建工具 | 3.6.x+ |
|
||||
| Node.js | 前端构建工具 | 16.14.0 |
|
||||
|
||||
## 功能模块
|
||||
|
||||
### 1. 用户管理
|
||||
|
||||
- **角色划分**:系统将用户分为管理员、社团成员和普通参与者三种角色,分别拥有不同的权限。
|
||||
- **权限控制**:基于角色的权限控制,确保系统操作的安全性和规范性。
|
||||
|
||||
### 2. 社团管理
|
||||
|
||||
- **社团信息维护**:支持社团的基本信息管理,包括名称、简介、Logo、所属学院、社团类别、社团负责人等。
|
||||
- **成员管理**:支持社团成员的加入和退出审核,记录成员的活跃度(如发起活动次数和参与活动次数等)。
|
||||
|
||||
### 3. 活动管理
|
||||
|
||||
- **活动申请与审核**:用户可以提交活动申请,管理员进行审核,支持通过、驳回或要求修改。
|
||||
- **活动发布与展示**:活动自动分类展示,支持关键词搜索、时间筛选、社团分类浏览等功能。
|
||||
- **活动执行与监控**:组织者可实时更新活动信息,管理员可监控活动进展,发现违规可强制终止并通知参与者。
|
||||
|
||||
### 4. 互动功能
|
||||
|
||||
- **报名与签到**:用户可在线报名活动,活动当日进行签到,记录参与情况。
|
||||
- **评论与点赞**:用户可对活动发表评论和点赞,增强互动性。
|
||||
- **通知与提醒**:系统自动推送报名成功提醒、活动开始前提醒、变更通知等。
|
||||
|
||||
## 系统架构
|
||||
|
||||
系统采用前后端分离架构,前端使用 Vue.js 构建单页应用,后端基于 Spring Boot 提供 RESTful API 接口,前后端通过 JSON 进行数据交互。
|
||||
|
||||
## 安装部署
|
||||
|
||||
### 前提条件
|
||||
|
||||
- **JDK**:1.8 及以上
|
||||
- **MySQL**:5.7 及以上(建议8.0+)
|
||||
- **Redis**:3.0 及以上
|
||||
- **Node.js**:16.14.0(仅该版本,高低版本可能会有依赖冲突)
|
||||
- **Maven**:3.0 及以上
|
||||
|
||||
### 后端部署
|
||||
|
||||
1. 克隆项目代码:
|
||||
|
||||
```bash
|
||||
git clone https://git.waynews.top/BruceSun/SAMS.git
|
||||
```
|
||||
|
||||
|
||||
|
||||
1. 导入数据库:
|
||||
将 `sql` 目录下的 SQL 文件导入 MySQL 数据库。
|
||||
2. 配置数据库连接:
|
||||
修改 `application-druid.yml` 文件,配置数据库连接信息。
|
||||
3. 启动 Redis 服务。
|
||||
4. 运行后端项目:
|
||||
使用 IDE(如 IntelliJ IDEA)打开项目,运行 `RuoYiApplication` 主类启动后端服务。
|
||||
|
||||
### 前端部署
|
||||
|
||||
1.进入前端项目目录:
|
||||
|
||||
```bash
|
||||
cd ruoyi-ui
|
||||
```
|
||||
|
||||
2.安装依赖:
|
||||
|
||||
```bash
|
||||
npm install
|
||||
#注意:npm国内安装比较慢,建议使用国内镜像安装:
|
||||
npm install --registry=https://registry.npmmirror.com
|
||||
```
|
||||
|
||||
3.运行前端项目(开发环境):
|
||||
|
||||
```bash
|
||||
npm run dev
|
||||
```
|
||||
|
||||
4.访问系统:
|
||||
在浏览器中打开 `http://localhost:80`,使用默认账户登录(用户名:admin,密码:admin123)。
|
||||
|
||||
## 目录结构
|
||||
|
||||
### 后端目录结构
|
||||
|
||||
```plaintext
|
||||
ruoyi
|
||||
├── bs-sams // 业务模块
|
||||
├── ruoyi-admin // 后台管理模块
|
||||
├── ruoyi-common // 公共模块
|
||||
├── ruoyi-framework // 框架核心模块
|
||||
├── ruoyi-generator // 代码生成模块
|
||||
├── ruoyi-quartz // 定时任务模块
|
||||
├── ruoyi-system // 系统模块
|
||||
└── sql // 数据库脚本
|
||||
```
|
||||
|
||||
### 前端目录结构
|
||||
|
||||
```plaintext
|
||||
ruoyi-ui
|
||||
├── public // 公共资源
|
||||
└── src
|
||||
├── api // 接口请求
|
||||
├── assets // 静态资源
|
||||
├── components // 公共组件
|
||||
├── layout // 布局组件
|
||||
├── router // 路由配置
|
||||
├── store // 状态管理
|
||||
├── utils // 工具函数
|
||||
├── views // 页面视图
|
||||
├── App.vue // 根组件
|
||||
└── main.js // 入口文件
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 参考资料
|
||||
|
||||
- RuoYi-Vue 官方文档:https://doc.ruoyi.vip/ruoyi-vue/
|
||||
- RuoYi-Vue Gitee 仓库:https://gitee.com/y_project/RuoYi-Vue
|
||||
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 清理工程target生成路径。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean
|
||||
|
||||
pause
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 打包Web工程,生成war/jar包文件。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean package -Dmaven.test.skip=true
|
||||
|
||||
pause
|
||||
14
bin/run.bat
|
|
@ -1,14 +0,0 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo [信息] 使用Jar命令运行Web工程。
|
||||
echo.
|
||||
|
||||
cd %~dp0
|
||||
cd ../ruoyi-admin/target
|
||||
|
||||
set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
|
||||
|
||||
java -jar %JAVA_OPTS% ruoyi-admin.jar
|
||||
|
||||
cd bin
|
||||
pause
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.8.9</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>bs-sams</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
package com.ruoyi.sams.ams.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsActivity;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListGetVO;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListVO;
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.sams.ams.service.IAmsActivityService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 活动列表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ams/activity")
|
||||
public class AmsActivityController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAmsActivityService amsActivityService;
|
||||
|
||||
/**
|
||||
* 查询活动列表列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ActivityListGetVO amsActivity)
|
||||
{
|
||||
startPage();
|
||||
List<ActivityListVO> list = amsActivityService.selectAmsActivityList(amsActivity);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出活动列表列表
|
||||
*/
|
||||
@Log(title = "活动列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ActivityListGetVO amsActivity)
|
||||
{
|
||||
List<ActivityListVO> list = amsActivityService.selectAmsActivityList(amsActivity);
|
||||
ExcelUtil<ActivityListVO> util = new ExcelUtil<ActivityListVO>(ActivityListVO.class);
|
||||
util.exportExcel(response, list, "活动列表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活动列表详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{actId}")
|
||||
public AjaxResult getInfo(@PathVariable("actId") Long actId)
|
||||
{
|
||||
return success(amsActivityService.selectAmsActivityByActId(actId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增活动列表
|
||||
*/
|
||||
@Log(title = "活动列表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AmsActivity amsActivity)
|
||||
{
|
||||
return toAjax(amsActivityService.insertAmsActivity(amsActivity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改活动列表
|
||||
*/
|
||||
@Log(title = "活动列表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AmsActivity amsActivity)
|
||||
{
|
||||
return toAjax(amsActivityService.updateAmsActivity(amsActivity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除活动列表
|
||||
*/
|
||||
@Log(title = "活动列表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{actIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] actIds)
|
||||
{
|
||||
return toAjax(amsActivityService.deleteAmsActivityByActIds(actIds));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
package com.ruoyi.sams.ams.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsComment;
|
||||
import com.ruoyi.sams.ams.domain.vo.AmsCommentListVO;
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.sams.ams.service.IAmsCommentService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 活动评论Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ams/comment")
|
||||
public class AmsCommentController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAmsCommentService amsCommentService;
|
||||
|
||||
/**
|
||||
* 查询活动评论列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AmsCommentListVO amsComment)
|
||||
{
|
||||
startPage();
|
||||
List<AmsCommentListVO> list = amsCommentService.selectAmsCommentList(amsComment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出活动评论列表
|
||||
*/
|
||||
@Log(title = "活动评论", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AmsCommentListVO amsComment)
|
||||
{
|
||||
List<AmsCommentListVO> list = amsCommentService.selectAmsCommentList(amsComment);
|
||||
ExcelUtil<AmsCommentListVO> util = new ExcelUtil<AmsCommentListVO>(AmsCommentListVO.class);
|
||||
util.exportExcel(response, list, "活动评论数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活动评论详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{commentId}")
|
||||
public AjaxResult getInfo(@PathVariable("commentId") Long commentId)
|
||||
{
|
||||
return success(amsCommentService.selectAmsCommentByCommentId(commentId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增活动评论
|
||||
*/
|
||||
@Log(title = "活动评论", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AmsComment amsComment)
|
||||
{
|
||||
return toAjax(amsCommentService.insertAmsComment(amsComment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改活动评论
|
||||
*/
|
||||
@Log(title = "活动评论", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AmsComment amsComment)
|
||||
{
|
||||
return toAjax(amsCommentService.updateAmsComment(amsComment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除活动评论
|
||||
*/
|
||||
@Log(title = "活动评论", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{commentIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] commentIds)
|
||||
{
|
||||
return toAjax(amsCommentService.deleteAmsCommentByCommentIds(commentIds));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
package com.ruoyi.sams.ams.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsReaction;
|
||||
import com.ruoyi.sams.ams.domain.vo.AmsReactionVO;
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.sams.ams.service.IAmsReactionService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 点赞记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ams/reaction")
|
||||
public class AmsReactionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAmsReactionService amsReactionService;
|
||||
|
||||
/**
|
||||
* 查询点赞记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AmsReactionVO amsReaction)
|
||||
{
|
||||
startPage();
|
||||
List<AmsReactionVO> list = amsReactionService.selectAmsReactionList(amsReaction);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出点赞记录列表
|
||||
*/
|
||||
@Log(title = "点赞记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AmsReactionVO amsReaction)
|
||||
{
|
||||
List<AmsReactionVO> list = amsReactionService.selectAmsReactionList(amsReaction);
|
||||
ExcelUtil<AmsReactionVO> util = new ExcelUtil<AmsReactionVO>(AmsReactionVO.class);
|
||||
util.exportExcel(response, list, "点赞记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取点赞记录详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{reactionId}")
|
||||
public AjaxResult getInfo(@PathVariable("reactionId") Long reactionId)
|
||||
{
|
||||
return success(amsReactionService.selectAmsReactionByReactionId(reactionId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点赞记录
|
||||
*/
|
||||
@Log(title = "点赞记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AmsReaction amsReaction)
|
||||
{
|
||||
return toAjax(amsReactionService.insertAmsReaction(amsReaction));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点赞记录
|
||||
*/
|
||||
@Log(title = "点赞记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AmsReaction amsReaction)
|
||||
{
|
||||
return toAjax(amsReactionService.updateAmsReaction(amsReaction));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点赞记录
|
||||
*/
|
||||
@Log(title = "点赞记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reactionIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] reactionIds)
|
||||
{
|
||||
return toAjax(amsReactionService.deleteAmsReactionByReactionIds(reactionIds));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
package com.ruoyi.sams.ams.controller;
|
||||
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.sams.ams.domain.AmsRegistration;
|
||||
import com.ruoyi.sams.ams.service.IAmsRegistrationService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 活动报名Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ams/registration")
|
||||
public class AmsRegistrationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAmsRegistrationService amsRegistrationService;
|
||||
|
||||
/**
|
||||
* 查询活动报名列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AmsRegistration amsRegistration)
|
||||
{
|
||||
startPage();
|
||||
List<AmsRegistration> list = amsRegistrationService.selectAmsRegistrationList(amsRegistration);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出活动报名列表
|
||||
*/
|
||||
@Log(title = "活动报名", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AmsRegistration amsRegistration)
|
||||
{
|
||||
List<AmsRegistration> list = amsRegistrationService.selectAmsRegistrationList(amsRegistration);
|
||||
ExcelUtil<AmsRegistration> util = new ExcelUtil<AmsRegistration>(AmsRegistration.class);
|
||||
util.exportExcel(response, list, "活动报名数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活动报名详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{regId}")
|
||||
public AjaxResult getInfo(@PathVariable("regId") Long regId)
|
||||
{
|
||||
return success(amsRegistrationService.selectAmsRegistrationByRegId(regId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增活动报名
|
||||
*/
|
||||
@Log(title = "活动报名", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AmsRegistration amsRegistration)
|
||||
{
|
||||
return toAjax(amsRegistrationService.insertAmsRegistration(amsRegistration));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改活动报名
|
||||
*/
|
||||
@Log(title = "活动报名", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AmsRegistration amsRegistration)
|
||||
{
|
||||
return toAjax(amsRegistrationService.updateAmsRegistration(amsRegistration));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除活动报名
|
||||
*/
|
||||
@Log(title = "活动报名", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{regIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] regIds)
|
||||
{
|
||||
return toAjax(amsRegistrationService.deleteAmsRegistrationByRegIds(regIds));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,274 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 活动列表对象 ams_activity
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-07
|
||||
*/
|
||||
public class AmsActivity extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 活动ID */
|
||||
private Long actId;
|
||||
|
||||
/** 活动标题 */
|
||||
@Excel(name = "活动标题")
|
||||
private String title;
|
||||
|
||||
/** 活动描述 */
|
||||
@Excel(name = "活动描述")
|
||||
private String description;
|
||||
|
||||
/** 封面图 */
|
||||
@Excel(name = "封面图")
|
||||
private String coverImage;
|
||||
|
||||
/** 开始时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date endTime;
|
||||
|
||||
/** 活动地点 */
|
||||
@Excel(name = "活动地点")
|
||||
private String location;
|
||||
|
||||
/** 预算金额 */
|
||||
@Excel(name = "预算金额")
|
||||
private BigDecimal budget;
|
||||
|
||||
/** 最大参与人数 */
|
||||
@Excel(name = "最大参与人数")
|
||||
private Long maxParticipants;
|
||||
|
||||
/** 创建人ID(sys_user) */
|
||||
@Excel(name = "创建人ID", readConverterExp = "s=ys_user")
|
||||
private Long creatorId;
|
||||
|
||||
/** 所属社团ID(sms_club) */
|
||||
@Excel(name = "所属社团ID", readConverterExp = "s=ms_club")
|
||||
private Long clubId;
|
||||
|
||||
/** 所属院系ID(sys_dept) */
|
||||
@Excel(name = "所属院系ID", readConverterExp = "s=ys_dept")
|
||||
private Long deptId;
|
||||
|
||||
/** 活动类型 */
|
||||
@Excel(name = "活动类型")
|
||||
private String activityType;
|
||||
|
||||
/** 活动状态 */
|
||||
@Excel(name = "活动状态")
|
||||
private String status;
|
||||
|
||||
/** 是否公开 */
|
||||
@Excel(name = "是否公开")
|
||||
private String visibility;
|
||||
|
||||
/** 当前审批人ID */
|
||||
@Excel(name = "当前审批人ID")
|
||||
private Long currentApproverId;
|
||||
|
||||
public void setActId(Long actId)
|
||||
{
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public Long getActId()
|
||||
{
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setTitle(String title)
|
||||
{
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getTitle()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setCoverImage(String coverImage)
|
||||
{
|
||||
this.coverImage = coverImage;
|
||||
}
|
||||
|
||||
public String getCoverImage()
|
||||
{
|
||||
return coverImage;
|
||||
}
|
||||
|
||||
public void setStartTime(Date startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date endTime)
|
||||
{
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Date getEndTime()
|
||||
{
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setLocation(String location)
|
||||
{
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getLocation()
|
||||
{
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setBudget(BigDecimal budget)
|
||||
{
|
||||
this.budget = budget;
|
||||
}
|
||||
|
||||
public BigDecimal getBudget()
|
||||
{
|
||||
return budget;
|
||||
}
|
||||
|
||||
public void setMaxParticipants(Long maxParticipants)
|
||||
{
|
||||
this.maxParticipants = maxParticipants;
|
||||
}
|
||||
|
||||
public Long getMaxParticipants()
|
||||
{
|
||||
return maxParticipants;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId)
|
||||
{
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Long getCreatorId()
|
||||
{
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId)
|
||||
{
|
||||
this.clubId = clubId;
|
||||
}
|
||||
|
||||
public Long getClubId()
|
||||
{
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setActivityType(String activityType)
|
||||
{
|
||||
this.activityType = activityType;
|
||||
}
|
||||
|
||||
public String getActivityType()
|
||||
{
|
||||
return activityType;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setVisibility(String visibility)
|
||||
{
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
public String getVisibility()
|
||||
{
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setCurrentApproverId(Long currentApproverId)
|
||||
{
|
||||
this.currentApproverId = currentApproverId;
|
||||
}
|
||||
|
||||
public Long getCurrentApproverId()
|
||||
{
|
||||
return currentApproverId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("actId", getActId())
|
||||
.append("title", getTitle())
|
||||
.append("description", getDescription())
|
||||
.append("coverImage", getCoverImage())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("location", getLocation())
|
||||
.append("budget", getBudget())
|
||||
.append("maxParticipants", getMaxParticipants())
|
||||
.append("creatorId", getCreatorId())
|
||||
.append("clubId", getClubId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("activityType", getActivityType())
|
||||
.append("status", getStatus())
|
||||
.append("visibility", getVisibility())
|
||||
.append("currentApproverId", getCurrentApproverId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 活动评论对象 ams_comment
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public class AmsComment extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 评论ID */
|
||||
private Long commentId;
|
||||
|
||||
/** 活动ID */
|
||||
@Excel(name = "活动ID")
|
||||
private Long actId;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 父评论ID(嵌套结构) */
|
||||
@Excel(name = "父评论ID", readConverterExp = "嵌=套结构")
|
||||
private Long parentCommentId;
|
||||
|
||||
/** 评论内容 */
|
||||
@Excel(name = "评论内容")
|
||||
private String content;
|
||||
|
||||
public void setCommentId(Long commentId)
|
||||
{
|
||||
this.commentId = commentId;
|
||||
}
|
||||
|
||||
public Long getCommentId()
|
||||
{
|
||||
return commentId;
|
||||
}
|
||||
|
||||
public void setActId(Long actId)
|
||||
{
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public Long getActId()
|
||||
{
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setParentCommentId(Long parentCommentId)
|
||||
{
|
||||
this.parentCommentId = parentCommentId;
|
||||
}
|
||||
|
||||
public Long getParentCommentId()
|
||||
{
|
||||
return parentCommentId;
|
||||
}
|
||||
|
||||
public void setContent(String content)
|
||||
{
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getContent()
|
||||
{
|
||||
return content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("commentId", getCommentId())
|
||||
.append("actId", getActId())
|
||||
.append("userId", getUserId())
|
||||
.append("parentCommentId", getParentCommentId())
|
||||
.append("content", getContent())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,87 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 点赞记录对象 ams_reaction
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public class AmsReaction extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 互动ID */
|
||||
private Long reactionId;
|
||||
|
||||
/** 活动ID */
|
||||
@Excel(name = "活动ID")
|
||||
private Long actId;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 反应类型(like点赞 / dislike点踩) */
|
||||
@Excel(name = "反应类型", readConverterExp = "l=ike点赞,/=,d=islike点踩")
|
||||
private String reactionType;
|
||||
|
||||
public void setReactionId(Long reactionId)
|
||||
{
|
||||
this.reactionId = reactionId;
|
||||
}
|
||||
|
||||
public Long getReactionId()
|
||||
{
|
||||
return reactionId;
|
||||
}
|
||||
|
||||
public void setActId(Long actId)
|
||||
{
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public Long getActId()
|
||||
{
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setReactionType(String reactionType)
|
||||
{
|
||||
this.reactionType = reactionType;
|
||||
}
|
||||
|
||||
public String getReactionType()
|
||||
{
|
||||
return reactionType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("reactionId", getReactionId())
|
||||
.append("actId", getActId())
|
||||
.append("userId", getUserId())
|
||||
.append("reactionType", getReactionType())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 活动报名对象 ams_registration
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
public class AmsRegistration extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 报名ID */
|
||||
private Long regId;
|
||||
|
||||
/** 活动ID */
|
||||
@Excel(name = "活动ID")
|
||||
private Long actId;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 角色 */
|
||||
@Excel(name = "角色")
|
||||
private String role;
|
||||
|
||||
/** 报名状态 */
|
||||
@Excel(name = "报名状态")
|
||||
private String status;
|
||||
|
||||
/** 报名时间 */
|
||||
private Date registerTime;
|
||||
|
||||
/** 签到时间 */
|
||||
private Date attendTime;
|
||||
|
||||
public void setRegId(Long regId)
|
||||
{
|
||||
this.regId = regId;
|
||||
}
|
||||
|
||||
public Long getRegId()
|
||||
{
|
||||
return regId;
|
||||
}
|
||||
|
||||
public void setActId(Long actId)
|
||||
{
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public Long getActId()
|
||||
{
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setRole(String role)
|
||||
{
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getRole()
|
||||
{
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setRegisterTime(Date registerTime)
|
||||
{
|
||||
this.registerTime = registerTime;
|
||||
}
|
||||
|
||||
public Date getRegisterTime()
|
||||
{
|
||||
return registerTime;
|
||||
}
|
||||
|
||||
public void setAttendTime(Date attendTime)
|
||||
{
|
||||
this.attendTime = attendTime;
|
||||
}
|
||||
|
||||
public Date getAttendTime()
|
||||
{
|
||||
return attendTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("regId", getRegId())
|
||||
.append("actId", getActId())
|
||||
.append("userId", getUserId())
|
||||
.append("role", getRole())
|
||||
.append("status", getStatus())
|
||||
.append("registerTime", getRegisterTime())
|
||||
.append("attendTime", getAttendTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain.vo;
|
||||
|
||||
/**
|
||||
* 活动列表查询参数封装
|
||||
*/
|
||||
|
||||
public class ActivityListGetVO {
|
||||
private String title; // 活动标题(模糊查询)
|
||||
private String status; // 状态筛选
|
||||
private Long clubId; // 所属社团
|
||||
private Long creatorId; // 创建人ID
|
||||
|
||||
/**
|
||||
* 是否排除他人草稿(管理员筛选使用)
|
||||
*/
|
||||
private Boolean excludeOtherDraft;
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getClubId() {
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId) {
|
||||
this.clubId = clubId;
|
||||
}
|
||||
|
||||
public Long getCreatorId() {
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId) {
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public Boolean getExcludeOtherDraft() {
|
||||
return excludeOtherDraft;
|
||||
}
|
||||
|
||||
public void setExcludeOtherDraft(Boolean excludeOtherDraft) {
|
||||
this.excludeOtherDraft = excludeOtherDraft;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,231 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class ActivityListVO {
|
||||
@Excel(name = "活动ID")
|
||||
private Long actId;
|
||||
|
||||
@Excel(name = "活动标题")
|
||||
private String title;
|
||||
|
||||
@Excel(name = "活动描述")
|
||||
private String description;
|
||||
|
||||
/** 封面图 */
|
||||
@Excel(name = "封面图")
|
||||
private String coverImage;
|
||||
|
||||
@Excel(name = "预算")
|
||||
private BigDecimal budget;
|
||||
|
||||
@Excel(name = "创建人ID")
|
||||
private Long creatorId;
|
||||
|
||||
@Excel(name = "创建人姓名")
|
||||
private String creatorName;
|
||||
|
||||
@Excel(name = "所属社团ID")
|
||||
private Long clubId;
|
||||
|
||||
@Excel(name = "社团名称")
|
||||
private String clubName;
|
||||
|
||||
@Excel(name = "所属院系ID")
|
||||
private Long deptId;
|
||||
|
||||
@Excel(name = "院系名称")
|
||||
private String deptName;
|
||||
|
||||
@Excel(name = "活动地点")
|
||||
private String location;
|
||||
|
||||
@Excel(name = "活动类型")
|
||||
private String activityType;
|
||||
|
||||
@Excel(name = "活动状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "可见性")
|
||||
private String visibility;
|
||||
|
||||
@Excel(name = "开始时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date startTime;
|
||||
|
||||
@Excel(name = "结束时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
public Long getActId() {
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setActId(Long actId) {
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCoverImage() {
|
||||
return coverImage;
|
||||
}
|
||||
|
||||
public void setCoverImage(String coverImage) {
|
||||
this.coverImage = coverImage;
|
||||
}
|
||||
|
||||
public BigDecimal getBudget() {
|
||||
return budget;
|
||||
}
|
||||
|
||||
public void setBudget(BigDecimal budget) {
|
||||
this.budget = budget;
|
||||
}
|
||||
|
||||
public Long getCreatorId() {
|
||||
return creatorId;
|
||||
}
|
||||
|
||||
public void setCreatorId(Long creatorId) {
|
||||
this.creatorId = creatorId;
|
||||
}
|
||||
|
||||
public String getCreatorName() {
|
||||
return creatorName;
|
||||
}
|
||||
|
||||
public void setCreatorName(String creatorName) {
|
||||
this.creatorName = creatorName;
|
||||
}
|
||||
|
||||
public Long getClubId() {
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId) {
|
||||
this.clubId = clubId;
|
||||
}
|
||||
|
||||
public String getClubName() {
|
||||
return clubName;
|
||||
}
|
||||
|
||||
public void setClubName(String clubName) {
|
||||
this.clubName = clubName;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public String getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(String location) {
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getActivityType() {
|
||||
return activityType;
|
||||
}
|
||||
|
||||
public void setActivityType(String activityType) {
|
||||
this.activityType = activityType;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getVisibility() {
|
||||
return visibility;
|
||||
}
|
||||
|
||||
public void setVisibility(String visibility) {
|
||||
this.visibility = visibility;
|
||||
}
|
||||
|
||||
public Date getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Date startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Date getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ActivityListVO{" +
|
||||
"actId=" + actId +
|
||||
", title='" + title + '\'' +
|
||||
", description='" + description + '\'' +
|
||||
", coverImage='" + coverImage + '\'' +
|
||||
", budget=" + budget +
|
||||
", creatorId=" + creatorId +
|
||||
", creatorName='" + creatorName + '\'' +
|
||||
", clubId=" + clubId +
|
||||
", clubName='" + clubName + '\'' +
|
||||
", deptId=" + deptId +
|
||||
", deptName='" + deptName + '\'' +
|
||||
", location='" + location + '\'' +
|
||||
", activityType='" + activityType + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", visibility='" + visibility + '\'' +
|
||||
", startTime=" + startTime +
|
||||
", endTime=" + endTime +
|
||||
", remark='" + remark + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,106 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import java.util.Date;
|
||||
|
||||
public class AmsCommentListVO {
|
||||
|
||||
@Excel(name = "评论ID")
|
||||
private Long commentId;
|
||||
|
||||
@Excel(name = "活动ID")
|
||||
private Long actId;
|
||||
|
||||
@Excel(name = "活动名称")
|
||||
private String activityName;
|
||||
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "父评论ID")
|
||||
private Long parentCommentId;
|
||||
|
||||
@Excel(name = "评论内容")
|
||||
private String content;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
public Long getCommentId() {
|
||||
return commentId;
|
||||
}
|
||||
|
||||
public void setCommentId(Long commentId) {
|
||||
this.commentId = commentId;
|
||||
}
|
||||
|
||||
public Long getActId() {
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setActId(Long actId) {
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public String getActivityName() {
|
||||
return activityName;
|
||||
}
|
||||
|
||||
public void setActivityName(String activityName) {
|
||||
this.activityName = activityName;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public Long getParentCommentId() {
|
||||
return parentCommentId;
|
||||
}
|
||||
|
||||
public void setParentCommentId(Long parentCommentId) {
|
||||
this.parentCommentId = parentCommentId;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
/**
|
||||
* 点赞记录视图对象 AmsReactionVO
|
||||
*/
|
||||
public class AmsReactionVO {
|
||||
|
||||
@Excel(name = "互动ID")
|
||||
private Long reactionId;
|
||||
|
||||
@Excel(name = "活动ID")
|
||||
private Long actId;
|
||||
|
||||
@Excel(name = "活动名称")
|
||||
private String actTitle;
|
||||
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "反应类型", dictType = "ams_reaction_type")
|
||||
private String reactionType;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private String createTime;
|
||||
|
||||
public Long getReactionId() {
|
||||
return reactionId;
|
||||
}
|
||||
|
||||
public void setReactionId(Long reactionId) {
|
||||
this.reactionId = reactionId;
|
||||
}
|
||||
|
||||
public Long getActId() {
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setActId(Long actId) {
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public String getActTitle() {
|
||||
return actTitle;
|
||||
}
|
||||
|
||||
public void setActTitle(String actTitle) {
|
||||
this.actTitle = actTitle;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getReactionType() {
|
||||
return reactionType;
|
||||
}
|
||||
|
||||
public void setReactionType(String reactionType) {
|
||||
this.reactionType = reactionType;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain.vo;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class AmsRegistrationGetVO {
|
||||
private Long actId;
|
||||
private Long userId;
|
||||
private String role;
|
||||
private String activityName; // 活动名称(模糊查询)
|
||||
private String userName; // 用户名(模糊查询)
|
||||
private Date registerTime;
|
||||
private Date attendTime;
|
||||
|
||||
public Long getActId() {
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setActId(Long actId) {
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getActivityName() {
|
||||
return activityName;
|
||||
}
|
||||
|
||||
public void setActivityName(String activityName) {
|
||||
this.activityName = activityName;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public Date getRegisterTime() {
|
||||
return registerTime;
|
||||
}
|
||||
|
||||
public void setRegisterTime(Date registerTime) {
|
||||
this.registerTime = registerTime;
|
||||
}
|
||||
|
||||
public Date getAttendTime() {
|
||||
return attendTime;
|
||||
}
|
||||
|
||||
public void setAttendTime(Date attendTime) {
|
||||
this.attendTime = attendTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,162 +0,0 @@
|
|||
package com.ruoyi.sams.ams.domain.vo;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class AmsRegistrationVO {
|
||||
@Excel(name = "报名ID")
|
||||
private Long regId;
|
||||
|
||||
@Excel(name = "活动ID")
|
||||
private Long actId;
|
||||
|
||||
@Excel(name = "活动名称")
|
||||
private String activityName;
|
||||
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "用户姓名")
|
||||
private String userName;
|
||||
|
||||
@Excel(name = "报名角色")
|
||||
private String role;
|
||||
|
||||
@Excel(name = "报名状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "报名时间", dateFormat = "yyyy-MM-dd")
|
||||
private LocalDate registerTime;
|
||||
|
||||
@Excel(name = "签到时间", dateFormat = "yyyy-MM-dd")
|
||||
private LocalDate attendTime;
|
||||
|
||||
@Excel(name = "创建人")
|
||||
private String createBy;
|
||||
|
||||
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Excel(name = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
@Excel(name = "更新时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@Excel(name = "备注")
|
||||
private String remark;
|
||||
|
||||
public Long getRegId() {
|
||||
return regId;
|
||||
}
|
||||
|
||||
public void setRegId(Long regId) {
|
||||
this.regId = regId;
|
||||
}
|
||||
|
||||
public Long getActId() {
|
||||
return actId;
|
||||
}
|
||||
|
||||
public void setActId(Long actId) {
|
||||
this.actId = actId;
|
||||
}
|
||||
|
||||
public String getActivityName() {
|
||||
return activityName;
|
||||
}
|
||||
|
||||
public void setActivityName(String activityName) {
|
||||
this.activityName = activityName;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public LocalDate getRegisterTime() {
|
||||
return registerTime;
|
||||
}
|
||||
|
||||
public void setRegisterTime(LocalDate registerTime) {
|
||||
this.registerTime = registerTime;
|
||||
}
|
||||
|
||||
public LocalDate getAttendTime() {
|
||||
return attendTime;
|
||||
}
|
||||
|
||||
public void setAttendTime(LocalDate attendTime) {
|
||||
this.attendTime = attendTime;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(LocalDateTime createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public LocalDateTime getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
package com.ruoyi.sams.ams.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListVO;
|
||||
import com.ruoyi.sams.ams.domain.AmsActivity;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListGetVO;
|
||||
import com.ruoyi.sams.ui.domain.vo.ActivityQueryDTO;
|
||||
import com.ruoyi.sams.ui.domain.vo.HotClubVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 活动列表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface AmsActivityMapper
|
||||
{
|
||||
/**
|
||||
* 查询活动列表
|
||||
*
|
||||
* @param actId 活动列表主键
|
||||
* @return 活动列表
|
||||
*/
|
||||
public ActivityListVO selectAmsActivityByActId(Long actId);
|
||||
|
||||
/**
|
||||
* 查询活动列表列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 活动列表集合
|
||||
*/
|
||||
public List<ActivityListVO> selectAmsActivityList(ActivityListGetVO amsActivity);
|
||||
|
||||
/**
|
||||
* 新增活动列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsActivity(AmsActivity amsActivity);
|
||||
|
||||
/**
|
||||
* 修改活动列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsActivity(AmsActivity amsActivity);
|
||||
|
||||
/**
|
||||
* 删除活动列表
|
||||
*
|
||||
* @param actId 活动列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsActivityByActId(Long actId);
|
||||
|
||||
/**
|
||||
* 批量删除活动列表
|
||||
*
|
||||
* @param actIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsActivityByActIds(Long[] actIds);
|
||||
|
||||
List<ActivityListVO> selectBannerActivities();
|
||||
|
||||
List<ActivityListVO> selectApprovedActivities();
|
||||
|
||||
List<HotClubVO> selectTopClubsByActivityCount(@Param("limit") int limit);
|
||||
|
||||
List<ActivityListVO> selectMyRegisteredActivities(@Param("userId") Long userId);
|
||||
}
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
package com.ruoyi.sams.ams.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sams.ams.domain.AmsComment;
|
||||
import com.ruoyi.sams.ams.domain.vo.AmsCommentListVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 活动评论Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface AmsCommentMapper
|
||||
{
|
||||
/**
|
||||
* 查询活动评论
|
||||
*
|
||||
* @param commentId 活动评论主键
|
||||
* @return 活动评论
|
||||
*/
|
||||
public AmsComment selectAmsCommentByCommentId(Long commentId);
|
||||
|
||||
/**
|
||||
* 查询活动评论列表
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 活动评论集合
|
||||
*/
|
||||
public List<AmsCommentListVO> selectAmsCommentList(AmsCommentListVO amsComment);
|
||||
|
||||
/**
|
||||
* 新增活动评论
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsComment(AmsComment amsComment);
|
||||
|
||||
/**
|
||||
* 修改活动评论
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsComment(AmsComment amsComment);
|
||||
|
||||
/**
|
||||
* 删除活动评论
|
||||
*
|
||||
* @param commentId 活动评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsCommentByCommentId(Long commentId);
|
||||
|
||||
/**
|
||||
* 批量删除活动评论
|
||||
*
|
||||
* @param commentIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsCommentByCommentIds(Long[] commentIds);
|
||||
|
||||
/**
|
||||
* 查询某个活动下的评论(分页用)
|
||||
* @param actId 活动ID
|
||||
* @return 评论列表
|
||||
*/
|
||||
List<AmsComment> selectCommentListByActId(@Param("actId") Long actId);
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
package com.ruoyi.sams.ams.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsReaction;
|
||||
import com.ruoyi.sams.ams.domain.vo.AmsReactionVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 点赞记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@Mapper
|
||||
public interface AmsReactionMapper
|
||||
{
|
||||
/**
|
||||
* 查询点赞记录
|
||||
*
|
||||
* @param reactionId 点赞记录主键
|
||||
* @return 点赞记录
|
||||
*/
|
||||
public AmsReaction selectAmsReactionByReactionId(Long reactionId);
|
||||
|
||||
/**
|
||||
* 查询点赞记录列表
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 点赞记录集合
|
||||
*/
|
||||
public List<AmsReactionVO> selectAmsReactionList(AmsReactionVO amsReaction);
|
||||
|
||||
/**
|
||||
* 新增点赞记录
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsReaction(AmsReaction amsReaction);
|
||||
|
||||
/**
|
||||
* 修改点赞记录
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsReaction(AmsReaction amsReaction);
|
||||
|
||||
/**
|
||||
* 删除点赞记录
|
||||
*
|
||||
* @param reactionId 点赞记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsReactionByReactionId(Long reactionId);
|
||||
|
||||
/**
|
||||
* 批量删除点赞记录
|
||||
*
|
||||
* @param reactionIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsReactionByReactionIds(Long[] reactionIds);
|
||||
|
||||
/**
|
||||
* 查询某活动的点赞/点踩统计
|
||||
* @param actId 活动ID
|
||||
* @return 每种类型和数量
|
||||
*/
|
||||
List<Map<String, Object>> countReactionByType(@Param("actId") Long actId);
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
package com.ruoyi.sams.ams.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sams.ams.domain.AmsRegistration;
|
||||
|
||||
/**
|
||||
* 活动报名Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
public interface AmsRegistrationMapper
|
||||
{
|
||||
/**
|
||||
* 查询活动报名
|
||||
*
|
||||
* @param regId 活动报名主键
|
||||
* @return 活动报名
|
||||
*/
|
||||
public AmsRegistration selectAmsRegistrationByRegId(Long regId);
|
||||
|
||||
/**
|
||||
* 查询活动报名列表
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 活动报名集合
|
||||
*/
|
||||
public List<AmsRegistration> selectAmsRegistrationList(AmsRegistration amsRegistration);
|
||||
|
||||
/**
|
||||
* 新增活动报名
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsRegistration(AmsRegistration amsRegistration);
|
||||
|
||||
/**
|
||||
* 修改活动报名
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsRegistration(AmsRegistration amsRegistration);
|
||||
|
||||
/**
|
||||
* 删除活动报名
|
||||
*
|
||||
* @param regId 活动报名主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsRegistrationByRegId(Long regId);
|
||||
|
||||
/**
|
||||
* 批量删除活动报名
|
||||
*
|
||||
* @param regIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsRegistrationByRegIds(Long[] regIds);
|
||||
}
|
||||
|
|
@ -1,84 +0,0 @@
|
|||
package com.ruoyi.sams.ams.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsActivity;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListGetVO;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListVO;
|
||||
import com.ruoyi.sams.ui.domain.vo.ActivityQueryDTO;
|
||||
import com.ruoyi.sams.ui.domain.vo.HotClubVO;
|
||||
|
||||
/**
|
||||
* 活动列表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface IAmsActivityService
|
||||
{
|
||||
/**
|
||||
* 查询活动列表
|
||||
*
|
||||
* @param actId 活动列表主键
|
||||
* @return 活动列表
|
||||
*/
|
||||
public ActivityListVO selectAmsActivityByActId(Long actId);
|
||||
|
||||
/**
|
||||
* 查询活动列表列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 活动列表集合
|
||||
*/
|
||||
public List<ActivityListVO> selectAmsActivityList(ActivityListGetVO amsActivity);
|
||||
|
||||
/**
|
||||
* 新增活动列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsActivity(AmsActivity amsActivity);
|
||||
|
||||
/**
|
||||
* 修改活动列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsActivity(AmsActivity amsActivity);
|
||||
|
||||
/**
|
||||
* 批量删除活动列表
|
||||
*
|
||||
* @param actIds 需要删除的活动列表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsActivityByActIds(Long[] actIds);
|
||||
|
||||
/**
|
||||
* 删除活动列表信息
|
||||
*
|
||||
* @param actId 活动列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsActivityByActId(Long actId);
|
||||
|
||||
/**
|
||||
* 获取轮播图活动(最多4条)
|
||||
*/
|
||||
List<ActivityListVO> listBannerActivities();
|
||||
|
||||
/**
|
||||
* 获取分页活动列表(已审批通过,按开始时间排序)
|
||||
*/
|
||||
List<ActivityListVO> listApprovedActivities();
|
||||
|
||||
/**
|
||||
* 获取活动最多的前4个社团
|
||||
*/
|
||||
List<HotClubVO> listTop4ByActivityCount();
|
||||
|
||||
List<ActivityListVO> selectMyRegisteredActivities(Long userId);
|
||||
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package com.ruoyi.sams.ams.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsComment;
|
||||
import com.ruoyi.sams.ams.domain.vo.AmsCommentListVO;
|
||||
|
||||
/**
|
||||
* 活动评论Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface IAmsCommentService
|
||||
{
|
||||
/**
|
||||
* 查询活动评论
|
||||
*
|
||||
* @param commentId 活动评论主键
|
||||
* @return 活动评论
|
||||
*/
|
||||
public AmsComment selectAmsCommentByCommentId(Long commentId);
|
||||
|
||||
/**
|
||||
* 查询活动评论列表
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 活动评论集合
|
||||
*/
|
||||
public List<AmsCommentListVO> selectAmsCommentList(AmsCommentListVO amsComment);
|
||||
|
||||
/**
|
||||
* 新增活动评论
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsComment(AmsComment amsComment);
|
||||
|
||||
/**
|
||||
* 修改活动评论
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsComment(AmsComment amsComment);
|
||||
|
||||
/**
|
||||
* 批量删除活动评论
|
||||
*
|
||||
* @param commentIds 需要删除的活动评论主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsCommentByCommentIds(Long[] commentIds);
|
||||
|
||||
/**
|
||||
* 删除活动评论信息
|
||||
*
|
||||
* @param commentId 活动评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsCommentByCommentId(Long commentId);
|
||||
|
||||
/**
|
||||
* 分页查询指定活动下的评论列表
|
||||
* @param actId 活动ID
|
||||
* @return 评论列表
|
||||
*/
|
||||
List<AmsComment> selectCommentListByActId(Long actId);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
package com.ruoyi.sams.ams.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsReaction;
|
||||
import com.ruoyi.sams.ams.domain.vo.AmsReactionVO;
|
||||
|
||||
/**
|
||||
* 点赞记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface IAmsReactionService
|
||||
{
|
||||
/**
|
||||
* 查询点赞记录
|
||||
*
|
||||
* @param reactionId 点赞记录主键
|
||||
* @return 点赞记录
|
||||
*/
|
||||
public AmsReaction selectAmsReactionByReactionId(Long reactionId);
|
||||
|
||||
/**
|
||||
* 查询点赞记录列表
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 点赞记录集合
|
||||
*/
|
||||
public List<AmsReactionVO> selectAmsReactionList(AmsReactionVO amsReaction);
|
||||
|
||||
/**
|
||||
* 新增点赞记录
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsReaction(AmsReaction amsReaction);
|
||||
|
||||
/**
|
||||
* 修改点赞记录
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsReaction(AmsReaction amsReaction);
|
||||
|
||||
/**
|
||||
* 批量删除点赞记录
|
||||
*
|
||||
* @param reactionIds 需要删除的点赞记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsReactionByReactionIds(Long[] reactionIds);
|
||||
|
||||
/**
|
||||
* 删除点赞记录信息
|
||||
*
|
||||
* @param reactionId 点赞记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsReactionByReactionId(Long reactionId);
|
||||
|
||||
/**
|
||||
* 获取活动点赞统计(like/dislike 数量)
|
||||
* @param actId 活动ID
|
||||
* @return Map:{"like": 12, "dislike": 3}
|
||||
*/
|
||||
Map<String, Integer> getReactionStats(Long actId);
|
||||
}
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
package com.ruoyi.sams.ams.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sams.ams.domain.AmsRegistration;
|
||||
|
||||
/**
|
||||
* 活动报名Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
public interface IAmsRegistrationService
|
||||
{
|
||||
/**
|
||||
* 查询活动报名
|
||||
*
|
||||
* @param regId 活动报名主键
|
||||
* @return 活动报名
|
||||
*/
|
||||
public AmsRegistration selectAmsRegistrationByRegId(Long regId);
|
||||
|
||||
/**
|
||||
* 查询活动报名列表
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 活动报名集合
|
||||
*/
|
||||
public List<AmsRegistration> selectAmsRegistrationList(AmsRegistration amsRegistration);
|
||||
|
||||
/**
|
||||
* 新增活动报名
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAmsRegistration(AmsRegistration amsRegistration);
|
||||
|
||||
/**
|
||||
* 修改活动报名
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAmsRegistration(AmsRegistration amsRegistration);
|
||||
|
||||
/**
|
||||
* 批量删除活动报名
|
||||
*
|
||||
* @param regIds 需要删除的活动报名主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsRegistrationByRegIds(Long[] regIds);
|
||||
|
||||
/**
|
||||
* 删除活动报名信息
|
||||
*
|
||||
* @param regId 活动报名主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAmsRegistrationByRegId(Long regId);
|
||||
}
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
package com.ruoyi.sams.ams.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsActivity;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListGetVO;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListVO;
|
||||
import com.ruoyi.sams.ams.mapper.AmsActivityMapper;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.sams.ui.domain.vo.ActivityQueryDTO;
|
||||
import com.ruoyi.sams.ui.domain.vo.HotClubVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sams.ams.service.IAmsActivityService;
|
||||
|
||||
/**
|
||||
* 活动列表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@Service
|
||||
public class AmsActivityServiceImpl implements IAmsActivityService
|
||||
{
|
||||
@Autowired
|
||||
private AmsActivityMapper amsActivityMapper;
|
||||
|
||||
/**
|
||||
* 查询活动列表
|
||||
*
|
||||
* @param actId 活动列表主键
|
||||
* @return 活动列表
|
||||
*/
|
||||
@Override
|
||||
public ActivityListVO selectAmsActivityByActId(Long actId)
|
||||
{
|
||||
return amsActivityMapper.selectAmsActivityByActId(actId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询活动列表列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 活动列表
|
||||
*/
|
||||
@Override
|
||||
public List<ActivityListVO> selectAmsActivityList(ActivityListGetVO amsActivity)
|
||||
{
|
||||
return amsActivityMapper.selectAmsActivityList(amsActivity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增活动列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAmsActivity(AmsActivity amsActivity)
|
||||
{
|
||||
amsActivity.setCreateTime(DateUtils.getNowDate());
|
||||
return amsActivityMapper.insertAmsActivity(amsActivity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改活动列表
|
||||
*
|
||||
* @param amsActivity 活动列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAmsActivity(AmsActivity amsActivity)
|
||||
{
|
||||
amsActivity.setUpdateTime(DateUtils.getNowDate());
|
||||
return amsActivityMapper.updateAmsActivity(amsActivity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除活动列表
|
||||
*
|
||||
* @param actIds 需要删除的活动列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAmsActivityByActIds(Long[] actIds)
|
||||
{
|
||||
return amsActivityMapper.deleteAmsActivityByActIds(actIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除活动列表信息
|
||||
*
|
||||
* @param actId 活动列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAmsActivityByActId(Long actId)
|
||||
{
|
||||
return amsActivityMapper.deleteAmsActivityByActId(actId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActivityListVO> listBannerActivities() {
|
||||
System.out.println(amsActivityMapper.selectBannerActivities());
|
||||
return amsActivityMapper.selectBannerActivities();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActivityListVO> listApprovedActivities() {
|
||||
System.out.println(amsActivityMapper.selectApprovedActivities());
|
||||
return amsActivityMapper.selectApprovedActivities();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HotClubVO> listTop4ByActivityCount() {
|
||||
System.out.println(amsActivityMapper.selectTopClubsByActivityCount(4));
|
||||
return amsActivityMapper.selectTopClubsByActivityCount(4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ActivityListVO> selectMyRegisteredActivities(Long userId ) {
|
||||
return amsActivityMapper.selectMyRegisteredActivities(userId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
package com.ruoyi.sams.ams.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsComment;
|
||||
import com.ruoyi.sams.ams.domain.vo.AmsCommentListVO;
|
||||
import com.ruoyi.sams.ams.mapper.AmsCommentMapper;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sams.ams.service.IAmsCommentService;
|
||||
|
||||
/**
|
||||
* 活动评论Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@Service
|
||||
public class AmsCommentServiceImpl implements IAmsCommentService
|
||||
{
|
||||
@Autowired
|
||||
private AmsCommentMapper amsCommentMapper;
|
||||
|
||||
/**
|
||||
* 查询活动评论
|
||||
*
|
||||
* @param commentId 活动评论主键
|
||||
* @return 活动评论
|
||||
*/
|
||||
@Override
|
||||
public AmsComment selectAmsCommentByCommentId(Long commentId)
|
||||
{
|
||||
return amsCommentMapper.selectAmsCommentByCommentId(commentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询活动评论列表
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 活动评论
|
||||
*/
|
||||
@Override
|
||||
public List<AmsCommentListVO> selectAmsCommentList(AmsCommentListVO amsComment)
|
||||
{
|
||||
return amsCommentMapper.selectAmsCommentList(amsComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增活动评论
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAmsComment(AmsComment amsComment)
|
||||
{
|
||||
amsComment.setCreateTime(DateUtils.getNowDate());
|
||||
return amsCommentMapper.insertAmsComment(amsComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改活动评论
|
||||
*
|
||||
* @param amsComment 活动评论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAmsComment(AmsComment amsComment)
|
||||
{
|
||||
amsComment.setUpdateTime(DateUtils.getNowDate());
|
||||
return amsCommentMapper.updateAmsComment(amsComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除活动评论
|
||||
*
|
||||
* @param commentIds 需要删除的活动评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAmsCommentByCommentIds(Long[] commentIds)
|
||||
{
|
||||
return amsCommentMapper.deleteAmsCommentByCommentIds(commentIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除活动评论信息
|
||||
*
|
||||
* @param commentId 活动评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAmsCommentByCommentId(Long commentId)
|
||||
{
|
||||
return amsCommentMapper.deleteAmsCommentByCommentId(commentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AmsComment> selectCommentListByActId(Long actId) {
|
||||
return amsCommentMapper.selectCommentListByActId(actId);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,116 +0,0 @@
|
|||
package com.ruoyi.sams.ams.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.sams.ams.domain.AmsReaction;
|
||||
import com.ruoyi.sams.ams.mapper.AmsReactionMapper;
|
||||
import com.ruoyi.sams.ams.domain.vo.AmsReactionVO;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sams.ams.service.IAmsReactionService;
|
||||
|
||||
/**
|
||||
* 点赞记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@Service
|
||||
public class AmsReactionServiceImpl implements IAmsReactionService
|
||||
{
|
||||
@Autowired
|
||||
private AmsReactionMapper amsReactionMapper;
|
||||
|
||||
/**
|
||||
* 查询点赞记录
|
||||
*
|
||||
* @param reactionId 点赞记录主键
|
||||
* @return 点赞记录
|
||||
*/
|
||||
@Override
|
||||
public AmsReaction selectAmsReactionByReactionId(Long reactionId)
|
||||
{
|
||||
return amsReactionMapper.selectAmsReactionByReactionId(reactionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询点赞记录列表
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 点赞记录
|
||||
*/
|
||||
@Override
|
||||
public List<AmsReactionVO> selectAmsReactionList(AmsReactionVO amsReaction)
|
||||
{
|
||||
return amsReactionMapper.selectAmsReactionList(amsReaction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增点赞记录
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAmsReaction(AmsReaction amsReaction)
|
||||
{
|
||||
amsReaction.setCreateTime(DateUtils.getNowDate());
|
||||
return amsReactionMapper.insertAmsReaction(amsReaction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改点赞记录
|
||||
*
|
||||
* @param amsReaction 点赞记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAmsReaction(AmsReaction amsReaction)
|
||||
{
|
||||
amsReaction.setUpdateTime(DateUtils.getNowDate());
|
||||
return amsReactionMapper.updateAmsReaction(amsReaction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除点赞记录
|
||||
*
|
||||
* @param reactionIds 需要删除的点赞记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAmsReactionByReactionIds(Long[] reactionIds)
|
||||
{
|
||||
return amsReactionMapper.deleteAmsReactionByReactionIds(reactionIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除点赞记录信息
|
||||
*
|
||||
* @param reactionId 点赞记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAmsReactionByReactionId(Long reactionId)
|
||||
{
|
||||
return amsReactionMapper.deleteAmsReactionByReactionId(reactionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Integer> getReactionStats(Long actId) {
|
||||
List<Map<String, Object>> rawStats = amsReactionMapper.countReactionByType(actId);
|
||||
Map<String, Integer> result = new HashMap<>();
|
||||
result.put("like", 0);
|
||||
result.put("dislike", 0);
|
||||
|
||||
for (Map<String, Object> row : rawStats) {
|
||||
String type = (String) row.get("reaction_type");
|
||||
Long count = (Long) row.get("cnt");
|
||||
result.put(type, count.intValue());
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
package com.ruoyi.sams.ams.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sams.ams.mapper.AmsRegistrationMapper;
|
||||
import com.ruoyi.sams.ams.domain.AmsRegistration;
|
||||
import com.ruoyi.sams.ams.service.IAmsRegistrationService;
|
||||
|
||||
/**
|
||||
* 活动报名Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-08
|
||||
*/
|
||||
@Service
|
||||
public class AmsRegistrationServiceImpl implements IAmsRegistrationService
|
||||
{
|
||||
@Autowired
|
||||
private AmsRegistrationMapper amsRegistrationMapper;
|
||||
|
||||
/**
|
||||
* 查询活动报名
|
||||
*
|
||||
* @param regId 活动报名主键
|
||||
* @return 活动报名
|
||||
*/
|
||||
@Override
|
||||
public AmsRegistration selectAmsRegistrationByRegId(Long regId)
|
||||
{
|
||||
return amsRegistrationMapper.selectAmsRegistrationByRegId(regId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询活动报名列表
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 活动报名
|
||||
*/
|
||||
@Override
|
||||
public List<AmsRegistration> selectAmsRegistrationList(AmsRegistration amsRegistration)
|
||||
{
|
||||
return amsRegistrationMapper.selectAmsRegistrationList(amsRegistration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增活动报名
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertAmsRegistration(AmsRegistration amsRegistration)
|
||||
{
|
||||
amsRegistration.setCreateTime(DateUtils.getNowDate());
|
||||
return amsRegistrationMapper.insertAmsRegistration(amsRegistration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改活动报名
|
||||
*
|
||||
* @param amsRegistration 活动报名
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateAmsRegistration(AmsRegistration amsRegistration)
|
||||
{
|
||||
amsRegistration.setUpdateTime(DateUtils.getNowDate());
|
||||
return amsRegistrationMapper.updateAmsRegistration(amsRegistration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除活动报名
|
||||
*
|
||||
* @param regIds 需要删除的活动报名主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAmsRegistrationByRegIds(Long[] regIds)
|
||||
{
|
||||
return amsRegistrationMapper.deleteAmsRegistrationByRegIds(regIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除活动报名信息
|
||||
*
|
||||
* @param regId 活动报名主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteAmsRegistrationByRegId(Long regId)
|
||||
{
|
||||
return amsRegistrationMapper.deleteAmsRegistrationByRegId(regId);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,100 +0,0 @@
|
|||
package com.ruoyi.sams.sms.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.sams.sms.domain.SmsClub;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubReturnVO;
|
||||
import com.ruoyi.sams.sms.service.ISmsClubService;
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 社团信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sms/club")
|
||||
public class SmsClubController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISmsClubService smsClubService;
|
||||
|
||||
/**
|
||||
* 查询社团信息列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SmsClub smsClub)
|
||||
{
|
||||
startPage();
|
||||
List<ClubReturnVO> list = smsClubService.selectSmsClubList(smsClub);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出社团信息列表
|
||||
*/
|
||||
@Log(title = "社团信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SmsClub smsClub)
|
||||
{
|
||||
List<ClubReturnVO> list = smsClubService.selectSmsClubList(smsClub);
|
||||
ExcelUtil<ClubReturnVO> util = new ExcelUtil<>(ClubReturnVO.class);
|
||||
util.exportExcel(response, list, "社团信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取社团信息详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{clubId}")
|
||||
public AjaxResult getInfo(@PathVariable("clubId") Long clubId)
|
||||
{
|
||||
return success(smsClubService.selectSmsClubByClubId(clubId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社团信息
|
||||
*/
|
||||
@Log(title = "社团信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SmsClub smsClub)
|
||||
{
|
||||
return toAjax(smsClubService.insertSmsClub(smsClub));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社团信息
|
||||
*/
|
||||
@Log(title = "社团信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SmsClub smsClub)
|
||||
{
|
||||
return toAjax(smsClubService.updateSmsClub(smsClub));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社团信息
|
||||
*/
|
||||
@Log(title = "社团信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{clubIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] clubIds)
|
||||
{
|
||||
return toAjax(smsClubService.deleteSmsClubByClubIds(clubIds));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
package com.ruoyi.sams.sms.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.sams.sms.domain.SmsClubUser;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubUserReturnVO;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubUserSelectVO;
|
||||
import com.ruoyi.sams.sms.service.ISmsClubUserService;
|
||||
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.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 成员管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sms/user")
|
||||
public class SmsClubUserController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISmsClubUserService smsClubUserService;
|
||||
|
||||
/**
|
||||
* 查询成员管理列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ClubUserSelectVO smsClubUser)
|
||||
{
|
||||
startPage();
|
||||
List<ClubUserReturnVO> list = smsClubUserService.selectSmsClubUserList(smsClubUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出成员管理列表
|
||||
*/
|
||||
@Log(title = "成员管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ClubUserSelectVO smsClubUser)
|
||||
{
|
||||
List<ClubUserReturnVO> list = smsClubUserService.selectSmsClubUserList(smsClubUser);
|
||||
ExcelUtil<ClubUserReturnVO> util = new ExcelUtil<ClubUserReturnVO>(ClubUserReturnVO.class);
|
||||
util.exportExcel(response, list, "成员管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取成员管理详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(smsClubUserService.selectSmsClubUserById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成员管理
|
||||
*/
|
||||
@Log(title = "成员管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SmsClubUser smsClubUser)
|
||||
{
|
||||
return toAjax(smsClubUserService.insertSmsClubUser(smsClubUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成员管理
|
||||
*/
|
||||
@Log(title = "成员管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SmsClubUser smsClubUser)
|
||||
{
|
||||
return toAjax(smsClubUserService.updateSmsClubUser(smsClubUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成员管理
|
||||
*/
|
||||
@Log(title = "成员管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(smsClubUserService.deleteSmsClubUserByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,146 +0,0 @@
|
|||
package com.ruoyi.sams.sms.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 社团信息对象 sms_club
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public class SmsClub extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 社团ID */
|
||||
private Long clubId;
|
||||
|
||||
/** 社团名称 */
|
||||
@Excel(name = "社团名称")
|
||||
private String clubName;
|
||||
|
||||
/** 社团简介 */
|
||||
private String description;
|
||||
|
||||
/** 社团类型 */
|
||||
@Excel(name = "社团类型")
|
||||
private String category;
|
||||
|
||||
/** 所属院系ID(sys_dept) */
|
||||
@Excel(name = "所属院系ID", readConverterExp = "s=ys_dept")
|
||||
private Long deptId;
|
||||
|
||||
/** 负责人ID(sys_user) */
|
||||
@Excel(name = "负责人ID", readConverterExp = "s=ys_user")
|
||||
private Long leaderId;
|
||||
|
||||
/** logo */
|
||||
@Excel(name = "logo")
|
||||
private String logo;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
public void setClubId(Long clubId)
|
||||
{
|
||||
this.clubId = clubId;
|
||||
}
|
||||
|
||||
public Long getClubId()
|
||||
{
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setClubName(String clubName)
|
||||
{
|
||||
this.clubName = clubName;
|
||||
}
|
||||
|
||||
public String getClubName()
|
||||
{
|
||||
return clubName;
|
||||
}
|
||||
|
||||
public void setDescription(String description)
|
||||
{
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setCategory(String category)
|
||||
{
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getCategory()
|
||||
{
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId)
|
||||
{
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public Long getDeptId()
|
||||
{
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setLeaderId(Long leaderId)
|
||||
{
|
||||
this.leaderId = leaderId;
|
||||
}
|
||||
|
||||
public Long getLeaderId()
|
||||
{
|
||||
return leaderId;
|
||||
}
|
||||
|
||||
public void setLogo(String logo)
|
||||
{
|
||||
this.logo = logo;
|
||||
}
|
||||
|
||||
public String getLogo()
|
||||
{
|
||||
return logo;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("clubId", getClubId())
|
||||
.append("clubName", getClubName())
|
||||
.append("description", getDescription())
|
||||
.append("category", getCategory())
|
||||
.append("deptId", getDeptId())
|
||||
.append("leaderId", getLeaderId())
|
||||
.append("logo", getLogo())
|
||||
.append("status", getStatus())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
package com.ruoyi.sams.sms.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 成员管理对象 sms_club_user
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public class SmsClubUser extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 用户ID */
|
||||
@Excel(name = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
/** 社团ID */
|
||||
@Excel(name = "社团ID")
|
||||
private Long clubId;
|
||||
|
||||
/** 是否活跃 */
|
||||
@Excel(name = "是否活跃")
|
||||
private Integer isActive;
|
||||
|
||||
/** 加入社团时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "加入社团时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date joinDate;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId)
|
||||
{
|
||||
this.clubId = clubId;
|
||||
}
|
||||
|
||||
public Long getClubId()
|
||||
{
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setIsActive(Integer isActive)
|
||||
{
|
||||
this.isActive = isActive;
|
||||
}
|
||||
|
||||
public Integer getIsActive()
|
||||
{
|
||||
return isActive;
|
||||
}
|
||||
|
||||
public void setJoinDate(Date joinDate)
|
||||
{
|
||||
this.joinDate = joinDate;
|
||||
}
|
||||
|
||||
public Date getJoinDate()
|
||||
{
|
||||
return joinDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("clubId", getClubId())
|
||||
.append("isActive", getIsActive())
|
||||
.append("joinDate", getJoinDate())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
package com.ruoyi.sams.sms.domain.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ClubReturnVO implements Serializable {
|
||||
private Long clubId;
|
||||
private String clubName;
|
||||
private String description;
|
||||
private String category;
|
||||
private Long deptId;
|
||||
private String deptName; // 院系名称
|
||||
private Long leaderId;
|
||||
private String leaderName; // 负责人名称
|
||||
private String logo;
|
||||
private String status;
|
||||
private String remark;
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
private String createTime;
|
||||
private String updateTime;
|
||||
|
||||
public Long getClubId() {
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId) {
|
||||
this.clubId = clubId;
|
||||
}
|
||||
|
||||
public String getClubName() {
|
||||
return clubName;
|
||||
}
|
||||
|
||||
public void setClubName(String clubName) {
|
||||
this.clubName = clubName;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public Long getLeaderId() {
|
||||
return leaderId;
|
||||
}
|
||||
|
||||
public void setLeaderId(Long leaderId) {
|
||||
this.leaderId = leaderId;
|
||||
}
|
||||
|
||||
public String getLeaderName() {
|
||||
return leaderName;
|
||||
}
|
||||
|
||||
public void setLeaderName(String leaderName) {
|
||||
this.leaderName = leaderName;
|
||||
}
|
||||
|
||||
public String getLogo() {
|
||||
return logo;
|
||||
}
|
||||
|
||||
public void setLogo(String logo) {
|
||||
this.logo = logo;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getCreateBy() {
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy) {
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public String getUpdateBy() {
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy) {
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public String getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(String createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(String updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
package com.ruoyi.sams.sms.domain.vo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
public class ClubUserReturnVO extends BaseEntity {
|
||||
private Long id;
|
||||
private Long userId;
|
||||
private String userName;
|
||||
private Long clubId;
|
||||
private String clubName;
|
||||
private Integer isActive;
|
||||
private LocalDateTime joinDate;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public Long getClubId() {
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId) {
|
||||
this.clubId = clubId;
|
||||
}
|
||||
|
||||
public String getClubName() {
|
||||
return clubName;
|
||||
}
|
||||
|
||||
public void setClubName(String clubName) {
|
||||
this.clubName = clubName;
|
||||
}
|
||||
|
||||
public Integer getIsActive() {
|
||||
return isActive;
|
||||
}
|
||||
|
||||
public void setIsActive(Integer isActive) {
|
||||
this.isActive = isActive;
|
||||
}
|
||||
|
||||
public LocalDateTime getJoinDate() {
|
||||
return joinDate;
|
||||
}
|
||||
|
||||
public void setJoinDate(LocalDateTime joinDate) {
|
||||
this.joinDate = joinDate;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,72 +0,0 @@
|
|||
package com.ruoyi.sams.sms.domain.vo;
|
||||
|
||||
/**
|
||||
* 查询条件封装:社团成员查询 VO
|
||||
*/
|
||||
public class ClubUserSelectVO {
|
||||
/**
|
||||
* 用户名(模糊查询)
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 社团名称(模糊查询)
|
||||
*/
|
||||
private String clubName;
|
||||
|
||||
/**
|
||||
* 是否活跃
|
||||
*/
|
||||
private Integer isActive;
|
||||
|
||||
/**
|
||||
* 用户ID(精确查询)
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 社团ID(精确查询)
|
||||
*/
|
||||
private Long clubId;
|
||||
|
||||
// ---------- Getters & Setters ----------
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getClubName() {
|
||||
return clubName;
|
||||
}
|
||||
|
||||
public void setClubName(String clubName) {
|
||||
this.clubName = clubName;
|
||||
}
|
||||
|
||||
public Integer getIsActive() {
|
||||
return isActive;
|
||||
}
|
||||
|
||||
public void setIsActive(Integer isActive) {
|
||||
this.isActive = isActive;
|
||||
}
|
||||
|
||||
public Long getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Long userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getClubId() {
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId) {
|
||||
this.clubId = clubId;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,63 +0,0 @@
|
|||
package com.ruoyi.sams.sms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sams.sms.domain.SmsClub;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubReturnVO;
|
||||
|
||||
/**
|
||||
* 社团信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface SmsClubMapper
|
||||
{
|
||||
/**
|
||||
* 查询社团信息
|
||||
*
|
||||
* @param clubId 社团信息主键
|
||||
* @return 社团信息
|
||||
*/
|
||||
public ClubReturnVO selectSmsClubByClubId(Long clubId);
|
||||
|
||||
/**
|
||||
* 查询社团信息列表
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 社团信息集合
|
||||
*/
|
||||
public List<ClubReturnVO> selectSmsClubList(SmsClub smsClub);
|
||||
|
||||
/**
|
||||
* 新增社团信息
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSmsClub(SmsClub smsClub);
|
||||
|
||||
/**
|
||||
* 修改社团信息
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSmsClub(SmsClub smsClub);
|
||||
|
||||
/**
|
||||
* 删除社团信息
|
||||
*
|
||||
* @param clubId 社团信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSmsClubByClubId(Long clubId);
|
||||
|
||||
/**
|
||||
* 批量删除社团信息
|
||||
*
|
||||
* @param clubIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSmsClubByClubIds(Long[] clubIds);
|
||||
}
|
||||
|
|
@ -1,65 +0,0 @@
|
|||
package com.ruoyi.sams.sms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubUserReturnVO;
|
||||
import com.ruoyi.sams.sms.domain.SmsClubUser;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubUserSelectVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 成员管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface SmsClubUserMapper
|
||||
{
|
||||
/**
|
||||
* 查询成员管理
|
||||
*
|
||||
* @param id 成员管理主键
|
||||
* @return 成员管理
|
||||
*/
|
||||
public ClubUserReturnVO selectSmsClubUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询成员管理列表
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 成员管理集合
|
||||
*/
|
||||
public List<ClubUserReturnVO> selectSmsClubUserList(@Param("vo") ClubUserSelectVO smsClubUser);
|
||||
|
||||
/**
|
||||
* 新增成员管理
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSmsClubUser(SmsClubUser smsClubUser);
|
||||
|
||||
/**
|
||||
* 修改成员管理
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSmsClubUser(SmsClubUser smsClubUser);
|
||||
|
||||
/**
|
||||
* 删除成员管理
|
||||
*
|
||||
* @param id 成员管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSmsClubUserById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除成员管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSmsClubUserByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
package com.ruoyi.sams.sms.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sams.sms.domain.SmsClub;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubReturnVO;
|
||||
import com.ruoyi.sams.ui.domain.vo.HotClubVO;
|
||||
|
||||
/**
|
||||
* 社团信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface ISmsClubService
|
||||
{
|
||||
/**
|
||||
* 查询社团信息
|
||||
*
|
||||
* @param clubId 社团信息主键
|
||||
* @return 社团信息
|
||||
*/
|
||||
public ClubReturnVO selectSmsClubByClubId(Long clubId);
|
||||
|
||||
/**
|
||||
* 查询社团信息列表
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 社团信息集合
|
||||
*/
|
||||
public List<ClubReturnVO> selectSmsClubList(SmsClub smsClub);
|
||||
|
||||
/**
|
||||
* 新增社团信息
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSmsClub(SmsClub smsClub);
|
||||
|
||||
/**
|
||||
* 修改社团信息
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSmsClub(SmsClub smsClub);
|
||||
|
||||
/**
|
||||
* 批量删除社团信息
|
||||
*
|
||||
* @param clubIds 需要删除的社团信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSmsClubByClubIds(Long[] clubIds);
|
||||
|
||||
/**
|
||||
* 删除社团信息信息
|
||||
*
|
||||
* @param clubId 社团信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSmsClubByClubId(Long clubId);
|
||||
|
||||
}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
package com.ruoyi.sams.sms.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubUserReturnVO;
|
||||
import com.ruoyi.sams.sms.domain.SmsClubUser;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubUserSelectVO;
|
||||
|
||||
/**
|
||||
* 成员管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
public interface ISmsClubUserService
|
||||
{
|
||||
/**
|
||||
* 查询成员管理
|
||||
*
|
||||
* @param id 成员管理主键
|
||||
* @return 成员管理
|
||||
*/
|
||||
public ClubUserReturnVO selectSmsClubUserById(Long id);
|
||||
|
||||
/**
|
||||
* 查询成员管理列表
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 成员管理集合
|
||||
*/
|
||||
public List<ClubUserReturnVO> selectSmsClubUserList(ClubUserSelectVO smsClubUser);
|
||||
|
||||
/**
|
||||
* 新增成员管理
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSmsClubUser(SmsClubUser smsClubUser);
|
||||
|
||||
/**
|
||||
* 修改成员管理
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSmsClubUser(SmsClubUser smsClubUser);
|
||||
|
||||
/**
|
||||
* 批量删除成员管理
|
||||
*
|
||||
* @param ids 需要删除的成员管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSmsClubUserByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除成员管理信息
|
||||
*
|
||||
* @param id 成员管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSmsClubUserById(Long id);
|
||||
}
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
package com.ruoyi.sams.sms.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.sams.sms.domain.SmsClub;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubReturnVO;
|
||||
import com.ruoyi.sams.sms.mapper.SmsClubMapper;
|
||||
import com.ruoyi.sams.sms.service.ISmsClubService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 社团信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@Service
|
||||
public class SmsClubServiceImpl implements ISmsClubService
|
||||
{
|
||||
@Autowired
|
||||
private SmsClubMapper smsClubMapper;
|
||||
|
||||
/**
|
||||
* 查询社团信息
|
||||
*
|
||||
* @param clubId 社团信息主键
|
||||
* @return 社团信息
|
||||
*/
|
||||
@Override
|
||||
public ClubReturnVO selectSmsClubByClubId(Long clubId)
|
||||
{
|
||||
return smsClubMapper.selectSmsClubByClubId(clubId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询社团信息列表
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 社团信息
|
||||
*/
|
||||
@Override
|
||||
public List<ClubReturnVO> selectSmsClubList(SmsClub smsClub)
|
||||
{
|
||||
return smsClubMapper.selectSmsClubList(smsClub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增社团信息
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSmsClub(SmsClub smsClub)
|
||||
{
|
||||
smsClub.setCreateTime(DateUtils.getNowDate());
|
||||
return smsClubMapper.insertSmsClub(smsClub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改社团信息
|
||||
*
|
||||
* @param smsClub 社团信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSmsClub(SmsClub smsClub)
|
||||
{
|
||||
smsClub.setUpdateTime(DateUtils.getNowDate());
|
||||
return smsClubMapper.updateSmsClub(smsClub);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除社团信息
|
||||
*
|
||||
* @param clubIds 需要删除的社团信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSmsClubByClubIds(Long[] clubIds)
|
||||
{
|
||||
return smsClubMapper.deleteSmsClubByClubIds(clubIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除社团信息信息
|
||||
*
|
||||
* @param clubId 社团信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSmsClubByClubId(Long clubId)
|
||||
{
|
||||
return smsClubMapper.deleteSmsClubByClubId(clubId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
package com.ruoyi.sams.sms.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.sams.sms.domain.SmsClubUser;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubUserReturnVO;
|
||||
import com.ruoyi.sams.sms.domain.vo.ClubUserSelectVO;
|
||||
import com.ruoyi.sams.sms.mapper.SmsClubUserMapper;
|
||||
import com.ruoyi.sams.sms.service.ISmsClubUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 成员管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-05-06
|
||||
*/
|
||||
@Service
|
||||
public class SmsClubUserServiceImpl implements ISmsClubUserService
|
||||
{
|
||||
@Autowired
|
||||
private SmsClubUserMapper smsClubUserMapper;
|
||||
|
||||
/**
|
||||
* 查询成员管理
|
||||
*
|
||||
* @param id 成员管理主键
|
||||
* @return 成员管理
|
||||
*/
|
||||
@Override
|
||||
public ClubUserReturnVO selectSmsClubUserById(Long id)
|
||||
{
|
||||
return smsClubUserMapper.selectSmsClubUserById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询成员管理列表
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 成员管理
|
||||
*/
|
||||
@Override
|
||||
public List<ClubUserReturnVO> selectSmsClubUserList(ClubUserSelectVO smsClubUser)
|
||||
{
|
||||
return smsClubUserMapper.selectSmsClubUserList(smsClubUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增成员管理
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSmsClubUser(SmsClubUser smsClubUser)
|
||||
{
|
||||
smsClubUser.setCreateTime(DateUtils.getNowDate());
|
||||
return smsClubUserMapper.insertSmsClubUser(smsClubUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改成员管理
|
||||
*
|
||||
* @param smsClubUser 成员管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSmsClubUser(SmsClubUser smsClubUser)
|
||||
{
|
||||
smsClubUser.setUpdateTime(DateUtils.getNowDate());
|
||||
return smsClubUserMapper.updateSmsClubUser(smsClubUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除成员管理
|
||||
*
|
||||
* @param ids 需要删除的成员管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSmsClubUserByIds(Long[] ids)
|
||||
{
|
||||
return smsClubUserMapper.deleteSmsClubUserByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除成员管理信息
|
||||
*
|
||||
* @param id 成员管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSmsClubUserById(Long id)
|
||||
{
|
||||
return smsClubUserMapper.deleteSmsClubUserById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
package com.ruoyi.sams.ui.controller;
|
||||
|
||||
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListGetVO;
|
||||
import com.ruoyi.sams.ams.service.IAmsActivityService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.sams.sms.domain.SmsClub;
|
||||
import com.ruoyi.sams.sms.service.ISmsClubService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 首页统计控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sams/dashboard")
|
||||
public class DashboardController {
|
||||
|
||||
@Autowired
|
||||
private IAmsActivityService activityService;
|
||||
|
||||
@Autowired
|
||||
private ISmsClubService clubService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public AjaxResult getDashboardStats() {
|
||||
int activityCount = activityService.selectAmsActivityList(new ActivityListGetVO()).size();
|
||||
ActivityListGetVO pendingVO = new ActivityListGetVO();
|
||||
pendingVO.setStatus("pending");
|
||||
int pendingCount = activityService.selectAmsActivityList(pendingVO).size();
|
||||
int clubCount = clubService.selectSmsClubList(new SmsClub()).size();
|
||||
int userCount = userService.selectUserList(new SysUser()).size();
|
||||
Map<String, Integer> data =new HashMap<>();
|
||||
data.put("activityCount", activityCount);
|
||||
data.put("pendingCount", pendingCount);
|
||||
data.put("clubCount", clubCount);
|
||||
data.put("userCount", userCount);
|
||||
AjaxResult result = AjaxResult.success();
|
||||
result.put("data", data);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,86 +0,0 @@
|
|||
package com.ruoyi.sams.ui.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.sams.ams.domain.AmsComment;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListGetVO;
|
||||
import com.ruoyi.sams.ams.domain.vo.ActivityListVO;
|
||||
import com.ruoyi.sams.ams.service.IAmsActivityService;
|
||||
import com.ruoyi.sams.ams.service.IAmsCommentService;
|
||||
import com.ruoyi.sams.ams.service.IAmsReactionService;
|
||||
import com.ruoyi.sams.ui.domain.vo.ActivityQueryDTO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/front/activity")
|
||||
public class FrontActivityController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IAmsActivityService activityService;
|
||||
|
||||
@Autowired
|
||||
private IAmsReactionService reactionService;
|
||||
|
||||
@Autowired
|
||||
private IAmsCommentService commentService;
|
||||
|
||||
/**
|
||||
* 获取轮播图活动(最多4条)
|
||||
*/
|
||||
@GetMapping("/banner")
|
||||
public AjaxResult listBannerActivities() {
|
||||
|
||||
return AjaxResult.success(activityService.listBannerActivities());
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取活动列表(已审批通过,按开始时间升序)
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult listActivities() {
|
||||
return AjaxResult.success(activityService.listApprovedActivities());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活动最多的前4个社团
|
||||
*/
|
||||
@GetMapping("/hot")
|
||||
public AjaxResult listHotClubs() {
|
||||
return AjaxResult.success(activityService.listTop4ByActivityCount());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取活动点赞/点踩统计(不分页)
|
||||
*/
|
||||
@GetMapping("/reaction")
|
||||
public AjaxResult getReactionStats(Long actId) {
|
||||
return AjaxResult.success(reactionService.getReactionStats(actId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页获取活动评论列表
|
||||
*/
|
||||
@GetMapping("/comment")
|
||||
public TableDataInfo listComments(Long actId) {
|
||||
startPage(); // 启用分页
|
||||
List<AmsComment> list = commentService.selectCommentListByActId(actId);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前用户报名的活动(分页)
|
||||
*/
|
||||
@GetMapping("/my-regist")
|
||||
public TableDataInfo listMyRegisteredActivities(Long userId) {
|
||||
startPage();
|
||||
List<ActivityListVO> list = activityService.selectMyRegisteredActivities(userId);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.ruoyi.sams.ui.controller;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.sams.sms.service.ISmsClubService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/front/club")
|
||||
public class FrontClubController {
|
||||
|
||||
@Autowired
|
||||
private ISmsClubService clubService;
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
package com.ruoyi.sams.ui.domain.vo;
|
||||
|
||||
public class ActivityQueryDTO {
|
||||
private String title;
|
||||
private Long clubId;
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public Long getClubId() {
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId) {
|
||||
this.clubId = clubId;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
package com.ruoyi.sams.ui.domain.vo;
|
||||
|
||||
public class HotClubVO {
|
||||
private Long clubId;
|
||||
private String clubName;
|
||||
private String logo;
|
||||
private Integer activityCount;
|
||||
|
||||
public Long getClubId() {
|
||||
return clubId;
|
||||
}
|
||||
|
||||
public void setClubId(Long clubId) {
|
||||
this.clubId = clubId;
|
||||
}
|
||||
|
||||
public String getClubName() {
|
||||
return clubName;
|
||||
}
|
||||
|
||||
public void setClubName(String clubName) {
|
||||
this.clubName = clubName;
|
||||
}
|
||||
|
||||
public String getLogo() {
|
||||
return logo;
|
||||
}
|
||||
|
||||
public void setLogo(String logo) {
|
||||
this.logo = logo;
|
||||
}
|
||||
|
||||
public Integer getActivityCount() {
|
||||
return activityCount;
|
||||
}
|
||||
|
||||
public void setActivityCount(Integer activityCount) {
|
||||
this.activityCount = activityCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "HotClubVO{" +
|
||||
"clubId=" + clubId +
|
||||
", clubName='" + clubName + '\'' +
|
||||
", activityCount=" + activityCount +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
|
@ -1,205 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sams.ams.mapper.AmsActivityMapper">
|
||||
|
||||
<resultMap id="ActivityListResult" type="com.ruoyi.sams.ams.domain.vo.ActivityListVO">
|
||||
<id column="act_id" property="actId"/>
|
||||
<result column="title" property="title"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="budget" property="budget"/>
|
||||
<result column="cover_image" property="coverImage"/>
|
||||
<result column="creator_id" property="creatorId"/>
|
||||
<result column="creator_name" property="creatorName"/>
|
||||
<result column="club_id" property="clubId"/>
|
||||
<result column="club_name" property="clubName"/>
|
||||
<result column="dept_id" property="deptId"/>
|
||||
<result column="dept_name" property="deptName"/>
|
||||
<result column="location" property="location"/>
|
||||
<result column="activity_type" property="activityType"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="visibility" property="visibility"/>
|
||||
<result column="start_time" property="startTime"/>
|
||||
<result column="end_time" property="endTime"/>
|
||||
<result column="remark" property="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAmsActivityVo">
|
||||
SELECT
|
||||
a.act_id, a.title, a.description ,a.cover_image,
|
||||
a.budget, a.creator_id, u.nick_name AS creator_name,
|
||||
a.club_id, c.club_name, a.dept_id, d.dept_name,
|
||||
a.location, a.activity_type, a.status, a.visibility,
|
||||
a.start_time, a.end_time, a.remark
|
||||
FROM ams_activity a
|
||||
LEFT JOIN sys_user u ON a.creator_id = u.user_id
|
||||
LEFT JOIN sms_club c ON a.club_id = c.club_id
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectAmsActivityList" resultMap="ActivityListResult">
|
||||
<if test="excludeOtherDraft != null and excludeOtherDraft">
|
||||
AND (a.status != 'draft' OR a.creator_id = #{creatorId})
|
||||
</if>
|
||||
<include refid="selectAmsActivityVo"/>
|
||||
WHERE 1 = 1
|
||||
<if test="title != null and title != ''">
|
||||
AND a.title LIKE CONCAT('%', #{title}, '%')
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND a.status = #{status}
|
||||
</if>
|
||||
<if test="clubId != null">
|
||||
AND a.club_id = #{clubId}
|
||||
</if>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAmsActivityByActId" parameterType="Long" resultMap="ActivityListResult">
|
||||
<include refid="selectAmsActivityVo"/>
|
||||
where act_id = #{actId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAmsActivity" parameterType="AmsActivity" useGeneratedKeys="true" keyProperty="actId">
|
||||
insert into ams_activity
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="coverImage != null">cover_image,</if>
|
||||
<if test="startTime != null">start_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
<if test="location != null">location,</if>
|
||||
<if test="budget != null">budget,</if>
|
||||
<if test="maxParticipants != null">max_participants,</if>
|
||||
<if test="creatorId != null">creator_id,</if>
|
||||
<if test="clubId != null">club_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="activityType != null">activity_type,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="visibility != null">visibility,</if>
|
||||
<if test="currentApproverId != null">current_approver_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">#{title},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="coverImage != null">#{coverImage},</if>
|
||||
<if test="startTime != null">#{startTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
<if test="location != null">#{location},</if>
|
||||
<if test="budget != null">#{budget},</if>
|
||||
<if test="maxParticipants != null">#{maxParticipants},</if>
|
||||
<if test="creatorId != null">#{creatorId},</if>
|
||||
<if test="clubId != null">#{clubId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="activityType != null">#{activityType},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="visibility != null">#{visibility},</if>
|
||||
<if test="currentApproverId != null">#{currentApproverId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAmsActivity" parameterType="AmsActivity">
|
||||
update ams_activity
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="title != null and title != ''">title = #{title},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="coverImage != null">cover_image = #{coverImage},</if>
|
||||
<if test="startTime != null">start_time = #{startTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
<if test="location != null">location = #{location},</if>
|
||||
<if test="budget != null">budget = #{budget},</if>
|
||||
<if test="maxParticipants != null">max_participants = #{maxParticipants},</if>
|
||||
<if test="creatorId != null">creator_id = #{creatorId},</if>
|
||||
<if test="clubId != null">club_id = #{clubId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="activityType != null">activity_type = #{activityType},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="visibility != null">visibility = #{visibility},</if>
|
||||
<if test="currentApproverId != null">current_approver_id = #{currentApproverId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where act_id = #{actId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAmsActivityByActId" parameterType="Long">
|
||||
delete from ams_activity where act_id = #{actId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAmsActivityByActIds" parameterType="String">
|
||||
delete from ams_activity where act_id in
|
||||
<foreach item="actId" collection="array" open="(" separator="," close=")">
|
||||
#{actId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<!-- 获取轮播图活动(最多4条) -->
|
||||
<select id="selectBannerActivities" resultMap="ActivityListResult">
|
||||
SELECT * FROM ams_activity
|
||||
WHERE status = 'approved'
|
||||
ORDER BY start_time DESC
|
||||
LIMIT 4
|
||||
</select>
|
||||
|
||||
<!-- 分页+条件筛选:活动列表(已审批通过) -->
|
||||
<select id="selectApprovedActivities" resultMap="ActivityListResult">
|
||||
SELECT * FROM ams_activity
|
||||
WHERE status = 'approved'
|
||||
ORDER BY net_likes ASC
|
||||
LIMIT 8
|
||||
</select>
|
||||
|
||||
<resultMap id="HotClubVOMap" type="com.ruoyi.sams.ui.domain.vo.HotClubVO">
|
||||
<result column="club_id" property="clubId"/>
|
||||
<result column="club_name" property="clubName"/>
|
||||
<result column="logo" property="logo"/>
|
||||
<result column="activityCount" property="activityCount"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 活动最多的前4个社团 -->
|
||||
<select id="selectTopClubsByActivityCount" resultMap="HotClubVOMap">
|
||||
SELECT c.club_id, c.club_name, c.logo , COUNT(a.act_id) AS activityCount
|
||||
FROM sms_club c
|
||||
JOIN ams_activity a ON c.club_id = a.club_id
|
||||
WHERE a.status = 'approved'
|
||||
GROUP BY c.club_id, c.club_name
|
||||
ORDER BY activityCount DESC
|
||||
LIMIT #{limit}
|
||||
</select>
|
||||
|
||||
<select id="selectMyRegisteredActivities"
|
||||
resultMap="ActivityListResult"
|
||||
parameterType="java.lang.Long">
|
||||
SELECT
|
||||
a.act_id, a.title, a.description ,a.cover_image,
|
||||
a.budget, a.creator_id, u.nick_name AS creator_name,
|
||||
a.club_id, c.club_name, a.dept_id, d.dept_name,
|
||||
a.location, a.activity_type, a.status, a.visibility,
|
||||
a.start_time, a.end_time, a.remark
|
||||
FROM ams_activity a
|
||||
INNER JOIN ams_registration r ON a.act_id = r.act_id
|
||||
LEFT JOIN sys_user u ON a.creator_id = u.user_id
|
||||
LEFT JOIN sms_club c ON a.club_id = c.club_id
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
WHERE r.user_id = #{userId}
|
||||
AND a.status = 'approved'
|
||||
ORDER BY a.start_time ASC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sams.ams.mapper.AmsCommentMapper">
|
||||
|
||||
<resultMap id="AmsCommentListVOResult" type="com.ruoyi.sams.ams.domain.vo.AmsCommentListVO">
|
||||
<result property="commentId" column="comment_id"/>
|
||||
<result property="actId" column="act_id"/>
|
||||
<result property="activityName" column="title"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="parentCommentId" column="parent_comment_id"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAmsCommentVo">
|
||||
SELECT c.comment_id,
|
||||
c.act_id,
|
||||
a.title,
|
||||
c.user_id,
|
||||
u.user_name,
|
||||
c.parent_comment_id,
|
||||
c.content,
|
||||
c.remark,
|
||||
c.create_time
|
||||
FROM ams_comment c
|
||||
LEFT JOIN ams_activity a ON c.act_id = a.act_id
|
||||
LEFT JOIN sys_user u ON c.user_id = u.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectAmsCommentList" parameterType="com.ruoyi.sams.ams.domain.AmsComment"
|
||||
resultMap="AmsCommentListVOResult">
|
||||
<include refid="selectAmsCommentVo"/>
|
||||
WHERE 1=1
|
||||
<if test="activityName != null and activityName != ''">
|
||||
AND a.title LIKE CONCAT('%', #{activityName}, '%')
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND u.user_name LIKE CONCAT('%', #{userName}, '%')
|
||||
</if>
|
||||
ORDER BY c.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAmsCommentByCommentId" parameterType="Long" resultMap="AmsCommentListVOResult">
|
||||
<include refid="selectAmsCommentVo"/>
|
||||
where comment_id = #{commentId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAmsComment" parameterType="AmsComment" useGeneratedKeys="true" keyProperty="commentId">
|
||||
insert into ams_comment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="actId != null">act_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="parentCommentId != null">parent_comment_id,</if>
|
||||
<if test="content != null and content != ''">content,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="actId != null">#{actId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="parentCommentId != null">#{parentCommentId},</if>
|
||||
<if test="content != null and content != ''">#{content},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAmsComment" parameterType="AmsComment">
|
||||
update ams_comment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="actId != null">act_id = #{actId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="parentCommentId != null">parent_comment_id = #{parentCommentId},</if>
|
||||
<if test="content != null and content != ''">content = #{content},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where comment_id = #{commentId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAmsCommentByCommentId" parameterType="Long">
|
||||
delete
|
||||
from ams_comment
|
||||
where comment_id = #{commentId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAmsCommentByCommentIds" parameterType="String">
|
||||
delete from ams_comment where comment_id in
|
||||
<foreach item="commentId" collection="array" open="(" separator="," close=")">
|
||||
#{commentId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectCommentListByActId" resultType="com.ruoyi.sams.ams.domain.AmsComment">
|
||||
SELECT c.comment_id AS commentId,
|
||||
c.act_id AS actId,
|
||||
c.user_id AS userId,
|
||||
c.content AS content,
|
||||
c.parent_comment_id AS parentCommentId,
|
||||
c.create_by AS createBy,
|
||||
c.create_time AS createTime,
|
||||
c.update_by AS updateBy,
|
||||
c.update_time AS updateTime,
|
||||
c.remark AS remark
|
||||
FROM ams_comment c
|
||||
WHERE c.act_id = #{actId}
|
||||
ORDER BY c.create_time ASC
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,105 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sams.ams.mapper.AmsReactionMapper">
|
||||
|
||||
<resultMap id="AmsReactionVOResult" type="com.ruoyi.sams.ams.domain.vo.AmsReactionVO">
|
||||
<id property="reactionId" column="reaction_id" />
|
||||
<result property="actId" column="act_id"/>
|
||||
<result property="actTitle" column="title"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="reactionType" column="reaction_type"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createTime" column="created_at"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAmsReactionJoinVo">
|
||||
SELECT
|
||||
r.reaction_id,
|
||||
r.act_id,
|
||||
a.title,
|
||||
r.user_id,
|
||||
u.user_name,
|
||||
r.reaction_type,
|
||||
r.remark,
|
||||
r.create_time
|
||||
FROM ams_reaction r
|
||||
LEFT JOIN ams_activity a ON r.act_id = a.act_id
|
||||
LEFT JOIN sys_user u ON r.user_id = u.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectAmsReactionList" resultMap="AmsReactionVOResult" parameterType="AmsReaction">
|
||||
<include refid="selectAmsReactionJoinVo"/>
|
||||
<where>
|
||||
<if test="actId != null">AND r.act_id = #{actId}</if>
|
||||
<if test="userId != null">AND r.user_id = #{userId}</if>
|
||||
<if test="reactionType != null and reactionType != ''">AND r.reaction_type = #{reactionType}</if>
|
||||
</where>
|
||||
ORDER BY r.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectAmsReactionByReactionId" resultMap="AmsReactionVOResult" parameterType="Long">
|
||||
<include refid="selectAmsReactionJoinVo"/>
|
||||
WHERE r.reaction_id = #{reactionId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAmsReaction" parameterType="AmsReaction" useGeneratedKeys="true" keyProperty="reactionId">
|
||||
insert into ams_reaction
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="actId != null">act_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="reactionType != null and reactionType != ''">reaction_type,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="actId != null">#{actId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="reactionType != null and reactionType != ''">#{reactionType},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAmsReaction" parameterType="AmsReaction">
|
||||
update ams_reaction
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="actId != null">act_id = #{actId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="reactionType != null and reactionType != ''">reaction_type = #{reactionType},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where reaction_id = #{reactionId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAmsReactionByReactionId" parameterType="Long">
|
||||
delete from ams_reaction where reaction_id = #{reactionId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAmsReactionByReactionIds" parameterType="String">
|
||||
delete from ams_reaction where reaction_id in
|
||||
<foreach item="reactionId" collection="array" open="(" separator="," close=")">
|
||||
#{reactionId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="countReactionByType" parameterType="long" resultType="map">
|
||||
SELECT reaction_type, COUNT(*) AS cnt
|
||||
FROM ams_reaction
|
||||
WHERE act_id = #{actId}
|
||||
GROUP BY reaction_type
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sams.ams.mapper.AmsRegistrationMapper">
|
||||
|
||||
<resultMap type="AmsRegistration" id="AmsRegistrationResult">
|
||||
<result property="regId" column="reg_id" />
|
||||
<result property="actId" column="act_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="role" column="role" />
|
||||
<result property="status" column="status" />
|
||||
<result property="registerTime" column="register_time" />
|
||||
<result property="attendTime" column="attend_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAmsRegistrationVo">
|
||||
select reg_id, act_id, user_id, role, status, register_time, attend_time, create_by, create_time, update_by, update_time, remark from ams_registration
|
||||
</sql>
|
||||
|
||||
<select id="selectAmsRegistrationList" parameterType="AmsRegistration" resultMap="AmsRegistrationResult">
|
||||
<include refid="selectAmsRegistrationVo"/>
|
||||
<where>
|
||||
<if test="actId != null "> and act_id = #{actId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="role != null and role != ''"> and role = #{role}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectAmsRegistrationByRegId" parameterType="Long" resultMap="AmsRegistrationResult">
|
||||
<include refid="selectAmsRegistrationVo"/>
|
||||
where reg_id = #{regId}
|
||||
</select>
|
||||
|
||||
<insert id="insertAmsRegistration" parameterType="AmsRegistration" useGeneratedKeys="true" keyProperty="regId">
|
||||
insert into ams_registration
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="actId != null">act_id,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="role != null">role,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="registerTime != null">register_time,</if>
|
||||
<if test="attendTime != null">attend_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="actId != null">#{actId},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="role != null">#{role},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="registerTime != null">#{registerTime},</if>
|
||||
<if test="attendTime != null">#{attendTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateAmsRegistration" parameterType="AmsRegistration">
|
||||
update ams_registration
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="actId != null">act_id = #{actId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="role != null">role = #{role},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="registerTime != null">register_time = #{registerTime},</if>
|
||||
<if test="attendTime != null">attend_time = #{attendTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where reg_id = #{regId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteAmsRegistrationByRegId" parameterType="Long">
|
||||
delete from ams_registration where reg_id = #{regId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteAmsRegistrationByRegIds" parameterType="String">
|
||||
delete from ams_registration where reg_id in
|
||||
<foreach item="regId" collection="array" open="(" separator="," close=")">
|
||||
#{regId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sams.sms.mapper.SmsClubMapper">
|
||||
|
||||
<resultMap id="ClubReturnVOResult" type="com.ruoyi.sams.sms.domain.vo.ClubReturnVO">
|
||||
<result column="club_id" property="clubId" />
|
||||
<result column="club_name" property="clubName" />
|
||||
<result column="description" property="description" />
|
||||
<result column="category" property="category" />
|
||||
<result column="dept_id" property="deptId" />
|
||||
<result column="dept_name" property="deptName" />
|
||||
<result column="leader_id" property="leaderId" />
|
||||
<result column="leader_name" property="leaderName" />
|
||||
<result column="logo" property="logo" />
|
||||
<result column="status" property="status" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="create_by" property="createBy" />
|
||||
<result column="update_by" property="updateBy" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSmsClubVO">
|
||||
SELECT
|
||||
c.club_id,c.club_name,c.description,c.category,c.dept_id,
|
||||
d.dept_name,c.leader_id,u.nick_name AS leader_name,
|
||||
c.logo,c.status,c.remark,c.create_by,c.update_by,
|
||||
c.create_time,c.update_time
|
||||
FROM sms_club c
|
||||
LEFT JOIN sys_dept d ON c.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user u ON c.leader_id = u.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSmsClubList" parameterType="com.ruoyi.sams.sms.domain.SmsClub" resultMap="ClubReturnVOResult">
|
||||
<include refid="selectSmsClubVO"/>
|
||||
<where>
|
||||
<if test="clubName != null and clubName != ''">
|
||||
AND c.club_name LIKE CONCAT('%', #{clubName}, '%')
|
||||
</if>
|
||||
<if test="category != null and category != ''">
|
||||
AND c.category = #{category}
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
AND c.dept_id = #{deptId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSmsClubByClubId" parameterType="Long" resultMap="ClubReturnVOResult">
|
||||
<include refid="selectSmsClubVO"/>
|
||||
where club_id = #{clubId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSmsClub" parameterType="SmsClub" useGeneratedKeys="true" keyProperty="clubId">
|
||||
insert into sms_club
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="clubName != null and clubName != ''">club_name,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="category != null and category != ''">category,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="leaderId != null">leader_id,</if>
|
||||
<if test="logo != null">logo,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="clubName != null and clubName != ''">#{clubName},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="category != null and category != ''">#{category},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="leaderId != null">#{leaderId},</if>
|
||||
<if test="logo != null">#{logo},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSmsClub" parameterType="SmsClub">
|
||||
update sms_club
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="clubName != null and clubName != ''">club_name = #{clubName},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="category != null and category != ''">category = #{category},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="leaderId != null">leader_id = #{leaderId},</if>
|
||||
<if test="logo != null">logo = #{logo},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where club_id = #{clubId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSmsClubByClubId" parameterType="Long">
|
||||
delete from sms_club where club_id = #{clubId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSmsClubByClubIds" parameterType="String">
|
||||
delete from sms_club where club_id in
|
||||
<foreach item="clubId" collection="array" open="(" separator="," close=")">
|
||||
#{clubId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -1,110 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sams.sms.mapper.SmsClubUserMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.sams.sms.domain.vo.ClubUserReturnVO" id="SmsClubUserResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="clubId" column="club_id"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="clubName" column="club_name"/>
|
||||
<result property="isActive" column="is_active"/>
|
||||
<result property="joinDate" column="join_date"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSmsClubUserVo">
|
||||
SELECT
|
||||
scu.id,scu.user_id,scu.club_id,u.nick_name AS user_name,
|
||||
c.club_name,scu.is_active,scu.join_date,
|
||||
scu.create_by,scu.create_time,scu.update_by,scu.update_time,scu.remark
|
||||
FROM sms_club_user scu
|
||||
LEFT JOIN sys_user u ON scu.user_id = u.user_id
|
||||
LEFT JOIN sms_club c ON scu.club_id = c.club_id
|
||||
</sql>
|
||||
|
||||
<select id="selectSmsClubUserList" parameterType="com.ruoyi.sams.sms.domain.vo.ClubUserSelectVO" resultMap="SmsClubUserResult">
|
||||
<include refid="selectSmsClubUserVo"/>
|
||||
<where>
|
||||
<if test="vo.userName != null and vo.userName != ''">
|
||||
AND u.nick_name LIKE CONCAT('%', #{vo.userName}, '%')
|
||||
</if>
|
||||
<if test="vo.clubName != null and vo.clubName != ''">
|
||||
AND c.club_name LIKE CONCAT('%', #{vo.clubName}, '%')
|
||||
</if>
|
||||
<if test="vo.isActive != null">
|
||||
AND scu.is_active = #{vo.isActive}
|
||||
</if>
|
||||
<if test="vo.userId != null">
|
||||
AND scu.user_id = #{vo.userId}
|
||||
</if>
|
||||
<if test="vo.clubId != null">
|
||||
AND scu.club_id = #{vo.clubId}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSmsClubUserById" parameterType="Long" resultMap="SmsClubUserResult">
|
||||
<include refid="selectSmsClubUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSmsClubUser" parameterType="SmsClubUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into sms_club_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="clubId != null">club_id,</if>
|
||||
<if test="isActive != null">is_active,</if>
|
||||
<if test="joinDate != null">join_date,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="clubId != null">#{clubId},</if>
|
||||
<if test="isActive != null">#{isActive},</if>
|
||||
<if test="joinDate != null">#{joinDate},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSmsClubUser" parameterType="SmsClubUser">
|
||||
update sms_club_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="clubId != null">club_id = #{clubId},</if>
|
||||
<if test="isActive != null">is_active = #{isActive},</if>
|
||||
<if test="joinDate != null">join_date = #{joinDate},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSmsClubUserById" parameterType="Long">
|
||||
delete from sms_club_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSmsClubUserByIds" parameterType="String">
|
||||
delete from sms_club_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
Before Width: | Height: | Size: 87 KiB |
|
|
@ -1,83 +0,0 @@
|
|||
@startuml
|
||||
|
||||
entity "社团 (sms_club)" as Club {
|
||||
* club_id : bigint <<PK>>
|
||||
--
|
||||
club_name : varchar
|
||||
description : text
|
||||
category : varchar
|
||||
dept_id : bigint
|
||||
leader_id : bigint
|
||||
logo : varchar
|
||||
status : enum
|
||||
}
|
||||
|
||||
entity "社团成员关系 (sms_club_user)" as ClubUser {
|
||||
* id : bigint <<PK>>
|
||||
--
|
||||
user_id : bigint
|
||||
club_id : bigint
|
||||
join_date : datetime
|
||||
is_active : boolean
|
||||
}
|
||||
|
||||
entity "活动 (ams_activity)" as Activity {
|
||||
* act_id : bigint <<PK>>
|
||||
--
|
||||
title : varchar
|
||||
description : text
|
||||
cover_image : varchar
|
||||
start_time : datetime
|
||||
end_time : datetime
|
||||
location : varchar
|
||||
budget : decimal
|
||||
max_participants : int
|
||||
creator_id : bigint
|
||||
club_id : bigint
|
||||
dept_id : bigint
|
||||
activity_type : enum
|
||||
status : enum
|
||||
visibility : enum
|
||||
current_approver_id : bigint
|
||||
net_likes : int
|
||||
}
|
||||
|
||||
entity "活动报名 (ams_registration)" as Registration {
|
||||
* reg_id : bigint <<PK>>
|
||||
--
|
||||
act_id : bigint
|
||||
user_id : bigint
|
||||
register_time : datetime
|
||||
status : enum
|
||||
attend_time : datetime
|
||||
role : enum
|
||||
}
|
||||
|
||||
entity "活动评论 (ams_comment)" as Comment {
|
||||
* comment_id : bigint <<PK>>
|
||||
--
|
||||
act_id : bigint
|
||||
user_id : bigint
|
||||
parent_comment_id : bigint
|
||||
content : text
|
||||
}
|
||||
|
||||
entity "活动点赞/点踩 (ams_reaction)" as Reaction {
|
||||
* reaction_id : bigint <<PK>>
|
||||
--
|
||||
act_id : bigint
|
||||
user_id : bigint
|
||||
reaction_type : enum
|
||||
}
|
||||
|
||||
' 关系线
|
||||
|
||||
Club ||--o{ ClubUser : 包含
|
||||
|
||||
Activity ||--o{ Registration : 对应
|
||||
Activity ||--o{ Comment : 被评论
|
||||
Activity ||--o{ Reaction : 被点赞
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
@startuml
|
||||
title 图 2.4 校园社团活动管理系统总体结构图
|
||||
|
||||
' 顶层模块
|
||||
object "校园社团活动管理系统" as System {
|
||||
}
|
||||
object "登录注册" as Login {
|
||||
}
|
||||
object "管理员界面" as Admin {
|
||||
}
|
||||
object "学生界面" as Student {
|
||||
}
|
||||
|
||||
System --> Login
|
||||
Login --> Admin
|
||||
Login --> Student
|
||||
|
||||
Admin --> "用户管理"
|
||||
Admin --> "社团管理"
|
||||
Admin --> "成员管理"
|
||||
Admin --> "活动管理"
|
||||
Admin --> "审批管理"
|
||||
Admin --> "统计总览"
|
||||
Admin --> "修改密码"
|
||||
|
||||
Student --> "浏览社团"
|
||||
Student --> "加入社团"
|
||||
Student --> "活动报名"
|
||||
Student --> "活动签到"
|
||||
Student --> "评论互动"
|
||||
Student --> "通知查看"
|
||||
Student --> "个人资料修改"
|
||||
Student --> "修改密码"
|
||||
|
||||
@enduml
|
||||
|
Before Width: | Height: | Size: 23 KiB |
|
|
@ -1,24 +0,0 @@
|
|||
@startuml
|
||||
start
|
||||
|
||||
:审批通过的活动对用户可见;
|
||||
:用户查看活动详情;
|
||||
|
||||
|
||||
:提交报名;
|
||||
:等待发起人/管理员审批;
|
||||
|
||||
:活动开始,签到开放;
|
||||
:用户签到;
|
||||
|
||||
if (活动结束时间已到?) then (是)
|
||||
:签到关闭;
|
||||
else (否)
|
||||
:继续签到;
|
||||
endif
|
||||
|
||||
:系统统计报名与签到情况;
|
||||
|
||||
stop
|
||||
|
||||
@enduml
|
||||
|
Before Width: | Height: | Size: 38 KiB |
|
|
@ -1,33 +0,0 @@
|
|||
@startuml
|
||||
start
|
||||
|
||||
:发起活动申请;
|
||||
:选择活动类型(社团/院级/校级);
|
||||
:提交活动信息;
|
||||
|
||||
if (是否为社团内部活动?) then (是)
|
||||
:社团管理员审批;
|
||||
if (审批通过?) then (是)
|
||||
:活动发布;
|
||||
else (否)
|
||||
:退回修改;
|
||||
:提交活动信息;
|
||||
endif
|
||||
else (否)
|
||||
:社团管理员初审;
|
||||
if (初审通过?) then (是)
|
||||
:提交至对应上级审批;
|
||||
:院级/校级管理员终审;
|
||||
if (终审通过?) then (是)
|
||||
:活动发布;
|
||||
else (否)
|
||||
:退回修改;
|
||||
:提交活动信息;
|
||||
endif
|
||||
else (否)
|
||||
:退回修改;
|
||||
endif
|
||||
endif
|
||||
|
||||
stop
|
||||
@enduml
|
||||
|
Before Width: | Height: | Size: 21 KiB |
|
|
@ -1,19 +0,0 @@
|
|||
@startuml
|
||||
start
|
||||
|
||||
:管理员进入活动报名管理页面;
|
||||
:系统加载所有待审核报名记录;
|
||||
|
||||
:点击“审核”按钮;
|
||||
|
||||
if (是否通过报名?) then (是)
|
||||
:更新报名状态为“已报名”;
|
||||
else (否)
|
||||
:更新报名状态为“未通过”;
|
||||
:可填写驳回原因;
|
||||
endif
|
||||
|
||||
:刷新报名列表;
|
||||
|
||||
stop
|
||||
@enduml
|
||||
|
Before Width: | Height: | Size: 40 KiB |
|
|
@ -1,36 +0,0 @@
|
|||
@startuml
|
||||
start
|
||||
|
||||
:进入社团总览页面;
|
||||
|
||||
split
|
||||
:点击“新增社团”按钮;
|
||||
:弹出社团表单;
|
||||
:填写名称、类型、负责人、Logo 等;
|
||||
if (信息是否完整?) then (是)
|
||||
:提交表单;
|
||||
:新增社团成功;
|
||||
:刷新社团列表;
|
||||
else (否)
|
||||
:提示信息不完整;
|
||||
endif
|
||||
split again
|
||||
:点击“编辑社团”按钮;
|
||||
:弹出社团信息表单;
|
||||
:修改社团简介、负责人、状态等;
|
||||
if (信息是否合法?) then (是)
|
||||
:提交修改;
|
||||
:修改成功;
|
||||
:刷新社团列表;
|
||||
else (否)
|
||||
:提示修改失败;
|
||||
endif
|
||||
split again
|
||||
:设置查询条件;
|
||||
:输入关键词或选择筛选项;
|
||||
:点击“查询”按钮;
|
||||
:刷新社团分页列表;
|
||||
endsplit
|
||||
|
||||
stop
|
||||
@enduml
|
||||
|
Before Width: | Height: | Size: 44 KiB |
|
|
@ -1,28 +0,0 @@
|
|||
@startuml
|
||||
start
|
||||
:管理员进入社团成员管理页面;
|
||||
split
|
||||
:管理员处理入团申请;
|
||||
:点击“审核”按钮;
|
||||
if (是否通过?) then (通过)
|
||||
:设置成员状态为“活跃”;
|
||||
:写入审核备注;
|
||||
else (拒绝)
|
||||
:设置状态为“已拒绝”;
|
||||
endif
|
||||
split again
|
||||
:管理员点击“筛选/查询”按钮;
|
||||
:输入社团名、成员名或学号等条件;
|
||||
:系统刷新并展示匹配成员数据;
|
||||
split again
|
||||
:管理员点击“移除成员”或“设为非活跃”按钮;
|
||||
:弹出确认提示;
|
||||
if (确认操作?) then (是)
|
||||
:更新成员状态为“已退出”或“非活跃”;
|
||||
else
|
||||
:取消操作;
|
||||
endif
|
||||
endsplit
|
||||
|
||||
stop
|
||||
@enduml
|
||||
|
Before Width: | Height: | Size: 36 KiB |
|
|
@ -1,26 +0,0 @@
|
|||
@startuml
|
||||
left to right direction
|
||||
|
||||
actor 学生用户
|
||||
|
||||
usecase "浏览社团信息" as UC1
|
||||
usecase "申请加入社团" as UC2
|
||||
usecase "退出社团申请" as UC3
|
||||
usecase "报名参加活动" as UC4
|
||||
usecase "活动签到" as UC5
|
||||
usecase "发布评论/点赞" as UC6
|
||||
usecase "修改个人信息" as UC7
|
||||
usecase "修改密码" as UC8
|
||||
usecase "查看系统通知" as UC9
|
||||
|
||||
学生用户 --> UC1
|
||||
学生用户 --> UC2
|
||||
学生用户 --> UC3
|
||||
学生用户 --> UC4
|
||||
学生用户 --> UC5
|
||||
学生用户 --> UC6
|
||||
学生用户 --> UC7
|
||||
学生用户 --> UC8
|
||||
学生用户 --> UC9
|
||||
|
||||
@enduml
|
||||
|
Before Width: | Height: | Size: 22 KiB |
|
|
@ -1,22 +0,0 @@
|
|||
@startuml
|
||||
left to right direction
|
||||
|
||||
actor 系统管理员
|
||||
|
||||
usecase "用户管理" as UC1
|
||||
usecase "社团管理" as UC2
|
||||
usecase "成员管理" as UC3
|
||||
usecase "活动管理" as UC4
|
||||
usecase "审批管理" as UC5
|
||||
usecase "统计总览" as UC6
|
||||
usecase "账户管理" as UC7
|
||||
|
||||
系统管理员 --> UC1
|
||||
系统管理员 --> UC2
|
||||
系统管理员 --> UC3
|
||||
系统管理员 --> UC4
|
||||
系统管理员 --> UC5
|
||||
系统管理员 --> UC6
|
||||
系统管理员 --> UC7
|
||||
|
||||
@enduml
|
||||
|
Before Width: | Height: | Size: 207 KiB |
|
Before Width: | Height: | Size: 438 KiB |
|
Before Width: | Height: | Size: 362 KiB |
|
Before Width: | Height: | Size: 274 KiB |
|
Before Width: | Height: | Size: 613 KiB |
BIN
pic/登录@1x.jpg
|
Before Width: | Height: | Size: 334 KiB |
|
Before Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 188 KiB |
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 213 KiB |
|
Before Width: | Height: | Size: 212 KiB |
421
pom.xml
|
|
@ -1,287 +1,134 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>3.8.9</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依管理系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>3.8.9</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<spring-boot.version>2.5.15</spring-boot.version>
|
||||
<druid.version>1.2.23</druid.version>
|
||||
<bitwalker.version>1.21</bitwalker.version>
|
||||
<swagger.version>3.0.0</swagger.version>
|
||||
<kaptcha.version>2.3.3</kaptcha.version>
|
||||
<pagehelper.boot.version>1.4.7</pagehelper.boot.version>
|
||||
<fastjson.version>2.0.53</fastjson.version>
|
||||
<oshi.version>6.6.5</oshi.version>
|
||||
<commons.io.version>2.13.0</commons.io.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
<velocity.version>2.3</velocity.version>
|
||||
<jwt.version>0.9.1</jwt.version>
|
||||
<!-- override dependency version -->
|
||||
<tomcat.version>9.0.102</tomcat.version>
|
||||
<logback.version>1.2.13</logback.version>
|
||||
<spring-security.version>5.7.12</spring-security.version>
|
||||
<spring-framework.version>5.3.39</spring-framework.version>
|
||||
</properties>
|
||||
|
||||
<!-- 依赖声明 -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
|
||||
<!-- 覆盖SpringFramework的依赖配置-->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>${spring-framework.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 覆盖SpringSecurity的依赖配置-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-bom</artifactId>
|
||||
<version>${spring-security.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot的依赖配置-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-dependencies</artifactId>
|
||||
<version>${spring-boot.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 覆盖logback的依赖配置-->
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-core</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 覆盖tomcat的依赖配置-->
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-core</artifactId>
|
||||
<version>${tomcat.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-el</artifactId>
|
||||
<version>${tomcat.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.tomcat.embed</groupId>
|
||||
<artifactId>tomcat-embed-websocket</artifactId>
|
||||
<version>${tomcat.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里数据库连接池 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>${druid.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 解析客户端操作系统、浏览器等 -->
|
||||
<dependency>
|
||||
<groupId>eu.bitwalker</groupId>
|
||||
<artifactId>UserAgentUtils</artifactId>
|
||||
<version>${bitwalker.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pagehelper 分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>${pagehelper.boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 获取系统信息 -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
<version>${oshi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Swagger3依赖 -->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-boot-starter</artifactId>
|
||||
<version>${swagger.version}</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- io常用工具类 -->
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons.io.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- excel工具 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- velocity代码生成使用模板 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
<artifactId>velocity-engine-core</artifactId>
|
||||
<version>${velocity.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里JSON解析器 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Token生成与解析-->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>${jwt.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 验证码 -->
|
||||
<dependency>
|
||||
<groupId>pro.fessional</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<version>${kaptcha.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 定时任务-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-quartz</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 系统模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>bs-sms</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>bs-sams</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<modules>
|
||||
<module>ruoyi-admin</module>
|
||||
<module>ruoyi-framework</module>
|
||||
<module>ruoyi-system</module>
|
||||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
<module>ruoyi-common</module>
|
||||
<module>bs-sams</module>
|
||||
</modules>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>${java.version}</source>
|
||||
<target>${java.version}</target>
|
||||
<encoding>${project.build.sourceEncoding}</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>public</id>
|
||||
<name>aliyun nexus</name>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
</project>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.4.2</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.bruce</groupId>
|
||||
<artifactId>SAMS_O</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>SAMS</name>
|
||||
<description>SAMS</description>
|
||||
<url/>
|
||||
<licenses>
|
||||
<license/>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer/>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection/>
|
||||
<developerConnection/>
|
||||
<tag/>
|
||||
<url/>
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.security</groupId>
|
||||
<artifactId>spring-security-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- boot 日志依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</dependency>
|
||||
|
||||
<!--MyBatis PLUS3-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
<version>3.5.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<!--MySQL驱动-->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.36</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<!--validation 依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- jwt 依赖 -->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.12.5</version>
|
||||
</dependency>
|
||||
|
||||
<!--fastjson-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.fastjson2</groupId>
|
||||
<artifactId>fastjson2</artifactId>
|
||||
<version>2.0.53</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<annotationProcessorPaths>
|
||||
<path>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.36</version>
|
||||
</path>
|
||||
</annotationProcessorPaths>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,141 @@
|
|||
# 校园社团活动管理系统
|
||||
Society Activity Management System (SAMS)
|
||||
|
||||
[](https://spring.io/)
|
||||
[](https://vuejs.org/)
|
||||
[](LICENSE)
|
||||
|
||||
> 基于SpringBoot + Vue的校园社团活动全流程管理平台
|
||||
> 毕业设计项目 | 山东建筑大学 | 2025届
|
||||
|
||||
---
|
||||
|
||||
## 项目简介
|
||||
本系统旨在解决传统校园社团活动管理的痛点,提供数字化全流程解决方案:
|
||||
- **角色分层管理**:支持管理员、组织者、参与者三级权限体系
|
||||
- **活动全生命周期管理**:覆盖活动申请、审核、执行到归档全流程
|
||||
- **数据可视化**:实时统计活动参与度与社团活跃度
|
||||
- **安全可靠**:采用JWT鉴权+BCrypt加密+操作日志审计
|
||||
|
||||
[👉 **在线演示**](https://demo.club-manager.com) | [📚 需求文档](/docs/需求分析说明书1.4.docx)
|
||||
|
||||
---
|
||||
|
||||
## 功能特性
|
||||
|
||||
### 🎯 核心功能
|
||||
| 模块 | 功能描述 |
|
||||
|--------------|--------------------------------------------------------------------------|
|
||||
| **社团管理** | 社团信息维护/成员审核/权限分级/数据统计 |
|
||||
| **活动管理** | 在线申请-审核-发布全流程/扫码签到/评论互动/实时通知推送 |
|
||||
| **用户中心** | 多角色视图切换/我的活动追踪/消息通知中心 |
|
||||
|
||||
### 🚀 特色功能
|
||||
- **智能推荐**:基于用户兴趣的活动推送
|
||||
- **扫码签到**:动态二维码防作弊机制
|
||||
- **数据看板**:社团活跃度排行榜
|
||||
|
||||
---
|
||||
|
||||
## 技术栈
|
||||
|
||||
### 前端技术
|
||||
| 技术 | 说明 | 版本 |
|
||||
|------------------|--------------------------------|--------|
|
||||
| Vue.js | 渐进式JavaScript框架 | 3.2.0 |
|
||||
| Element-Plus | UI组件库 | 2.2.0 |
|
||||
| Axios | HTTP客户端 | 1.1.3 |
|
||||
| ECharts | 数据可视化 | 5.4.0 |
|
||||
|
||||
### 后端技术
|
||||
| 技术 | 说明 | 版本 |
|
||||
|------------------|--------------------------------|--------|
|
||||
| Spring Boot | Java开发框架 | 2.7.0 |
|
||||
| MyBatis-Plus | ORM框架 | 3.5.2 |
|
||||
| JWT | 身份认证 | 0.11.2 |
|
||||
| Redis | 缓存管理 | 6.2.6 |
|
||||
| Swagger | API文档生成 | 3.0.0 |
|
||||
|
||||
### 基础设施
|
||||
| 组件 | 用途 |
|
||||
|--------------|--------------------------------|
|
||||
| MySQL 8.0 | 主数据库 |
|
||||
| Nginx | 反向代理/负载均衡 |
|
||||
| Docker | 容器化部署 |
|
||||
|
||||
---
|
||||
|
||||
## 快速开始
|
||||
|
||||
### 环境要求
|
||||
- JDK 17+
|
||||
- Node.js 16.x
|
||||
- MySQL 8.0+
|
||||
- Redis 6.x
|
||||
|
||||
### 本地部署
|
||||
todo
|
||||
|
||||
4. **初始化数据库**
|
||||
执行 [/sql/init.sql](/sql/init.sql) 脚本
|
||||
|
||||
---
|
||||
|
||||
## 项目结构
|
||||
```text
|
||||
campus-club-system/
|
||||
├── server/ # 后端服务
|
||||
│ ├── src/
|
||||
│ │ ├── main/
|
||||
│ │ │ ├── java/com/bruce/sams/
|
||||
│ │ │ │ ├── controller # API接口层
|
||||
│ │ │ │ ├── service # 业务逻辑层
|
||||
│ │ │ │ ├── mapper # 数据访问层
|
||||
│ │ │ │ └── config # 安全/缓存配置
|
||||
│ │ │ └── resources/ # 配置文件
|
||||
│ └── pom.xml
|
||||
│
|
||||
├── client/ # 前端应用
|
||||
│ ├── src/
|
||||
│ │ ├── api/ # 接口封装
|
||||
│ │ ├── router/ # 路由配置
|
||||
│ │ ├── views/ # 页面组件
|
||||
│ │ └── store/ # 状态管理
|
||||
│ └── package.json
|
||||
│
|
||||
├── docs/ # 文档资料
|
||||
│ ├── 需求分析说明书.docx
|
||||
│ └── 数据库设计.md
|
||||
│
|
||||
└── sql/ # 数据库脚本
|
||||
├── init.sql # 初始化脚本
|
||||
└── sample_data.sql # 测试数据
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 数据库设计
|
||||

|
||||
|
||||
关键数据表说明:
|
||||
- **用户表(user)**:存储用户基础信息与角色权限
|
||||
- **活动表(activity)**:记录活动全生命周期状态
|
||||
- **报名表(signup_record)**:管理用户报名与签到信息
|
||||
- **操作日志(admin_log)**:审计所有管理操作
|
||||
|
||||
[🔍 查看完整数据库设计](/docs/数据库设计.md)
|
||||
|
||||
---
|
||||
|
||||
## 贡献指南
|
||||
欢迎通过Issue或PR参与改进!
|
||||
1. Fork本仓库
|
||||
2. 创建特性分支 (`git checkout -b feature/your-feature`)
|
||||
3. 提交修改 (`git commit -m 'Add some feature'`)
|
||||
4. 推送到分支 (`git push origin feature/your-feature`)
|
||||
5. 创建Pull Request
|
||||
|
||||
---
|
||||
|
||||
## 许可证
|
||||
[MIT License](LICENSE) © 2025 孙之烨 | 山东建筑大学
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>3.8.9</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
<artifactId>ruoyi-admin</artifactId>
|
||||
|
||||
<description>
|
||||
web服务入口
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- spring-boot-devtools -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-devtools</artifactId>
|
||||
<optional>true</optional> <!-- 表示依赖不会传递 -->
|
||||
</dependency>
|
||||
|
||||
<!-- swagger3-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-models</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 核心模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-framework</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 定时任务-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-quartz</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 代码生成-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>bs-sams</artifactId>
|
||||
<version>3.8.9</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package com.ruoyi;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||
|
||||
/**
|
||||
* 启动程序
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
||||
public class RuoYiApplication
|
||||
{
|
||||
public static void main(String[] args)
|
||||
{
|
||||
// System.setProperty("spring.devtools.restart.enabled", "false");
|
||||
SpringApplication.run(RuoYiApplication.class, args);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 若依启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
" | ( ' ) | \\ _. / ' \n" +
|
||||
" |(_ o _) / _( )_ .' \n" +
|
||||
" | (_,_).' __ ___(_ o _)' \n" +
|
||||
" | |\\ \\ | || |(_,_)' \n" +
|
||||
" | | \\ `' /| `-' / \n" +
|
||||
" | | \\ / \\ / \n" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
package com.ruoyi;
|
||||
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
|
||||
/**
|
||||
* web容器中进行部署
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class RuoYiServletInitializer extends SpringBootServletInitializer
|
||||
{
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
|
||||
{
|
||||
return application.sources(RuoYiApplication.class);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
package com.ruoyi.web.controller.common;
|
||||
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Resource;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.FastByteArrayOutputStream;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.google.code.kaptcha.Producer;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.sign.Base64;
|
||||
import com.ruoyi.common.utils.uuid.IdUtils;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
||||
/**
|
||||
* 验证码操作处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
public class CaptchaController
|
||||
{
|
||||
@Resource(name = "captchaProducer")
|
||||
private Producer captchaProducer;
|
||||
|
||||
@Resource(name = "captchaProducerMath")
|
||||
private Producer captchaProducerMath;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
/**
|
||||
* 生成验证码
|
||||
*/
|
||||
@GetMapping("/captchaImage")
|
||||
public AjaxResult getCode(HttpServletResponse response) throws IOException
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
boolean captchaEnabled = configService.selectCaptchaEnabled();
|
||||
ajax.put("captchaEnabled", captchaEnabled);
|
||||
if (!captchaEnabled)
|
||||
{
|
||||
return ajax;
|
||||
}
|
||||
|
||||
// 保存验证码信息
|
||||
String uuid = IdUtils.simpleUUID();
|
||||
String verifyKey = CacheConstants.CAPTCHA_CODE_KEY + uuid;
|
||||
|
||||
String capStr = null, code = null;
|
||||
BufferedImage image = null;
|
||||
|
||||
// 生成验证码
|
||||
String captchaType = RuoYiConfig.getCaptchaType();
|
||||
if ("math".equals(captchaType))
|
||||
{
|
||||
String capText = captchaProducerMath.createText();
|
||||
capStr = capText.substring(0, capText.lastIndexOf("@"));
|
||||
code = capText.substring(capText.lastIndexOf("@") + 1);
|
||||
image = captchaProducerMath.createImage(capStr);
|
||||
}
|
||||
else if ("char".equals(captchaType))
|
||||
{
|
||||
capStr = code = captchaProducer.createText();
|
||||
image = captchaProducer.createImage(capStr);
|
||||
}
|
||||
|
||||
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
||||
// 转换流信息写出
|
||||
FastByteArrayOutputStream os = new FastByteArrayOutputStream();
|
||||
try
|
||||
{
|
||||
ImageIO.write(image, "jpg", os);
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
|
||||
ajax.put("uuid", uuid);
|
||||
ajax.put("img", Base64.encode(os.toByteArray()));
|
||||
return ajax;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
package com.ruoyi.web.controller.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.framework.config.ServerConfig;
|
||||
|
||||
/**
|
||||
* 通用请求处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/common")
|
||||
public class CommonController
|
||||
{
|
||||
private static final Logger log = LoggerFactory.getLogger(CommonController.class);
|
||||
|
||||
@Autowired
|
||||
private ServerConfig serverConfig;
|
||||
|
||||
private static final String FILE_DELIMETER = ",";
|
||||
|
||||
/**
|
||||
* 通用下载请求
|
||||
*
|
||||
* @param fileName 文件名称
|
||||
* @param delete 是否删除
|
||||
*/
|
||||
@GetMapping("/download")
|
||||
public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!FileUtils.checkAllowDownload(fileName))
|
||||
{
|
||||
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
|
||||
}
|
||||
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
|
||||
String filePath = RuoYiConfig.getDownloadPath() + fileName;
|
||||
|
||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||
FileUtils.setAttachmentResponseHeader(response, realFileName);
|
||||
FileUtils.writeBytes(filePath, response.getOutputStream());
|
||||
if (delete)
|
||||
{
|
||||
FileUtils.deleteFile(filePath);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.error("下载文件失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用上传请求(单个)
|
||||
*/
|
||||
@PostMapping("/upload")
|
||||
public AjaxResult uploadFile(MultipartFile file) throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("url", url);
|
||||
ajax.put("fileName", fileName);
|
||||
ajax.put("newFileName", FileUtils.getName(fileName));
|
||||
ajax.put("originalFilename", file.getOriginalFilename());
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用上传请求(多个)
|
||||
*/
|
||||
@PostMapping("/uploads")
|
||||
public AjaxResult uploadFiles(List<MultipartFile> files) throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
// 上传文件路径
|
||||
String filePath = RuoYiConfig.getUploadPath();
|
||||
List<String> urls = new ArrayList<String>();
|
||||
List<String> fileNames = new ArrayList<String>();
|
||||
List<String> newFileNames = new ArrayList<String>();
|
||||
List<String> originalFilenames = new ArrayList<String>();
|
||||
for (MultipartFile file : files)
|
||||
{
|
||||
// 上传并返回新文件名称
|
||||
String fileName = FileUploadUtils.upload(filePath, file);
|
||||
String url = serverConfig.getUrl() + fileName;
|
||||
urls.add(url);
|
||||
fileNames.add(fileName);
|
||||
newFileNames.add(FileUtils.getName(fileName));
|
||||
originalFilenames.add(file.getOriginalFilename());
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
|
||||
ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
|
||||
ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
|
||||
ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
|
||||
return ajax;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
return AjaxResult.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 本地资源通用下载
|
||||
*/
|
||||
@GetMapping("/download/resource")
|
||||
public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response)
|
||||
throws Exception
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!FileUtils.checkAllowDownload(resource))
|
||||
{
|
||||
throw new Exception(StringUtils.format("资源文件({})非法,不允许下载。 ", resource));
|
||||
}
|
||||
// 本地资源路径
|
||||
String localPath = RuoYiConfig.getProfile();
|
||||
// 数据库资源地址
|
||||
String downloadPath = localPath + StringUtils.substringAfter(resource, Constants.RESOURCE_PREFIX);
|
||||
// 下载名称
|
||||
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
|
||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||
FileUtils.setAttachmentResponseHeader(response, downloadName);
|
||||
FileUtils.writeBytes(downloadPath, response.getOutputStream());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
log.error("下载文件失败", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,121 +0,0 @@
|
|||
package com.ruoyi.web.controller.monitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisCallback;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysCache;
|
||||
|
||||
/**
|
||||
* 缓存监控
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitor/cache")
|
||||
public class CacheController
|
||||
{
|
||||
@Autowired
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
|
||||
private final static List<SysCache> caches = new ArrayList<SysCache>();
|
||||
{
|
||||
caches.add(new SysCache(CacheConstants.LOGIN_TOKEN_KEY, "用户信息"));
|
||||
caches.add(new SysCache(CacheConstants.SYS_CONFIG_KEY, "配置信息"));
|
||||
caches.add(new SysCache(CacheConstants.SYS_DICT_KEY, "数据字典"));
|
||||
caches.add(new SysCache(CacheConstants.CAPTCHA_CODE_KEY, "验证码"));
|
||||
caches.add(new SysCache(CacheConstants.REPEAT_SUBMIT_KEY, "防重提交"));
|
||||
caches.add(new SysCache(CacheConstants.RATE_LIMIT_KEY, "限流处理"));
|
||||
caches.add(new SysCache(CacheConstants.PWD_ERR_CNT_KEY, "密码错误次数"));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
||||
@GetMapping()
|
||||
public AjaxResult getInfo() throws Exception
|
||||
{
|
||||
Properties info = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info());
|
||||
Properties commandStats = (Properties) redisTemplate.execute((RedisCallback<Object>) connection -> connection.info("commandstats"));
|
||||
Object dbSize = redisTemplate.execute((RedisCallback<Object>) connection -> connection.dbSize());
|
||||
|
||||
Map<String, Object> result = new HashMap<>(3);
|
||||
result.put("info", info);
|
||||
result.put("dbSize", dbSize);
|
||||
|
||||
List<Map<String, String>> pieList = new ArrayList<>();
|
||||
commandStats.stringPropertyNames().forEach(key -> {
|
||||
Map<String, String> data = new HashMap<>(2);
|
||||
String property = commandStats.getProperty(key);
|
||||
data.put("name", StringUtils.removeStart(key, "cmdstat_"));
|
||||
data.put("value", StringUtils.substringBetween(property, "calls=", ",usec"));
|
||||
pieList.add(data);
|
||||
});
|
||||
result.put("commandStats", pieList);
|
||||
return AjaxResult.success(result);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
||||
@GetMapping("/getNames")
|
||||
public AjaxResult cache()
|
||||
{
|
||||
return AjaxResult.success(caches);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
||||
@GetMapping("/getKeys/{cacheName}")
|
||||
public AjaxResult getCacheKeys(@PathVariable String cacheName)
|
||||
{
|
||||
Set<String> cacheKeys = redisTemplate.keys(cacheName + "*");
|
||||
return AjaxResult.success(new TreeSet<>(cacheKeys));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
||||
@GetMapping("/getValue/{cacheName}/{cacheKey}")
|
||||
public AjaxResult getCacheValue(@PathVariable String cacheName, @PathVariable String cacheKey)
|
||||
{
|
||||
String cacheValue = redisTemplate.opsForValue().get(cacheKey);
|
||||
SysCache sysCache = new SysCache(cacheName, cacheKey, cacheValue);
|
||||
return AjaxResult.success(sysCache);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
||||
@DeleteMapping("/clearCacheName/{cacheName}")
|
||||
public AjaxResult clearCacheName(@PathVariable String cacheName)
|
||||
{
|
||||
Collection<String> cacheKeys = redisTemplate.keys(cacheName + "*");
|
||||
redisTemplate.delete(cacheKeys);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
||||
@DeleteMapping("/clearCacheKey/{cacheKey}")
|
||||
public AjaxResult clearCacheKey(@PathVariable String cacheKey)
|
||||
{
|
||||
redisTemplate.delete(cacheKey);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:cache:list')")
|
||||
@DeleteMapping("/clearCacheAll")
|
||||
public AjaxResult clearCacheAll()
|
||||
{
|
||||
Collection<String> cacheKeys = redisTemplate.keys("*");
|
||||
redisTemplate.delete(cacheKeys);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
package com.ruoyi.web.controller.monitor;
|
||||
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.domain.Server;
|
||||
|
||||
/**
|
||||
* 服务器监控
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitor/server")
|
||||
public class ServerController
|
||||
{
|
||||
@PreAuthorize("@ss.hasPermi('monitor:server:list')")
|
||||
@GetMapping()
|
||||
public AjaxResult getInfo() throws Exception
|
||||
{
|
||||
Server server = new Server();
|
||||
server.copyTo();
|
||||
return AjaxResult.success(server);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,82 +0,0 @@
|
|||
package com.ruoyi.web.controller.monitor;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.service.SysPasswordService;
|
||||
import com.ruoyi.system.domain.SysLogininfor;
|
||||
import com.ruoyi.system.service.ISysLogininforService;
|
||||
|
||||
/**
|
||||
* 系统访问记录
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitor/logininfor")
|
||||
public class SysLogininforController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysLogininforService logininforService;
|
||||
|
||||
@Autowired
|
||||
private SysPasswordService passwordService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysLogininfor logininfor)
|
||||
{
|
||||
startPage();
|
||||
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "登录日志", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysLogininfor logininfor)
|
||||
{
|
||||
List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
|
||||
ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
|
||||
util.exportExcel(response, list, "登录日志");
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
|
||||
@Log(title = "登录日志", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{infoIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] infoIds)
|
||||
{
|
||||
return toAjax(logininforService.deleteLogininforByIds(infoIds));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:remove')")
|
||||
@Log(title = "登录日志", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/clean")
|
||||
public AjaxResult clean()
|
||||
{
|
||||
logininforService.cleanLogininfor();
|
||||
return success();
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:logininfor:unlock')")
|
||||
@Log(title = "账户解锁", businessType = BusinessType.OTHER)
|
||||
@GetMapping("/unlock/{userName}")
|
||||
public AjaxResult unlock(@PathVariable("userName") String userName)
|
||||
{
|
||||
passwordService.clearLoginRecordCache(userName);
|
||||
return success();
|
||||
}
|
||||
}
|
||||