Compare commits
5 Commits
main
...
yangshuail
| Author | SHA1 | Date |
|---|---|---|
|
|
e3699a5bfb | 1 month ago |
|
|
27a7377c94 | 1 month ago |
|
|
0c9cb322e5 | 1 month ago |
|
|
b266b6dfc9 | 3 months ago |
|
|
db0cba4270 | 3 months ago |
@ -0,0 +1 @@
|
||||
custom: http://doc.ruoyi.vip/ruoyi-vue/other/donate.html
|
||||
@ -0,0 +1,47 @@
|
||||
######################################################################
|
||||
# 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
|
||||
@ -0,0 +1,20 @@
|
||||
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.
|
||||
@ -0,0 +1,12 @@
|
||||
@echo off
|
||||
echo.
|
||||
echo [信息] 清理工程target生成路径。
|
||||
echo.
|
||||
|
||||
%~d0
|
||||
cd %~dp0
|
||||
|
||||
cd ..
|
||||
call mvn clean
|
||||
|
||||
pause
|
||||
@ -0,0 +1,14 @@
|
||||
@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
|
||||
Binary file not shown.
@ -0,0 +1,274 @@
|
||||
<?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.9.0</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依管理系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>3.9.0</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.58</fastjson.version>
|
||||
<oshi.version>6.8.3</oshi.version>
|
||||
<commons.io.version>2.19.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.108</tomcat.version>
|
||||
<logback.version>1.2.13</logback.version>
|
||||
<spring-security.version>5.7.14</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>
|
||||
|
||||
</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>
|
||||
</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>
|
||||
@ -0,0 +1,30 @@
|
||||
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" +
|
||||
" ''-' `'-' `-..-' ");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.ruoyi.test;
|
||||
|
||||
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
||||
|
||||
public class BCryptTest {
|
||||
public static void main(String[] args) {
|
||||
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
|
||||
String encode = encoder.encode("lcx123456");
|
||||
System.out.println(encode);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.config.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.water.config.domain.WaterConfig;
|
||||
import com.ruoyi.water.config.service.IWaterConfigService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 系统配置管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/系统配置")
|
||||
public class WaterConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterConfigService waterConfigService;
|
||||
|
||||
/**
|
||||
* 查询系统配置管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统配置:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterConfig waterConfig)
|
||||
{
|
||||
startPage();
|
||||
List<WaterConfig> list = waterConfigService.selectWaterConfigList(waterConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出系统配置管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统配置:export')")
|
||||
@Log(title = "系统配置管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterConfig waterConfig)
|
||||
{
|
||||
List<WaterConfig> list = waterConfigService.selectWaterConfigList(waterConfig);
|
||||
ExcelUtil<WaterConfig> util = new ExcelUtil<WaterConfig>(WaterConfig.class);
|
||||
util.exportExcel(response, list, "系统配置管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统配置管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统配置:query')")
|
||||
@GetMapping(value = "/{configId}")
|
||||
public AjaxResult getInfo(@PathVariable("configId") Long configId)
|
||||
{
|
||||
return success(waterConfigService.selectWaterConfigByConfigId(configId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统配置管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统配置:add')")
|
||||
@Log(title = "系统配置管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterConfig waterConfig)
|
||||
{
|
||||
return toAjax(waterConfigService.insertWaterConfig(waterConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统配置管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统配置:edit')")
|
||||
@Log(title = "系统配置管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterConfig waterConfig)
|
||||
{
|
||||
return toAjax(waterConfigService.updateWaterConfig(waterConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统配置管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统配置:remove')")
|
||||
@Log(title = "系统配置管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{configIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] configIds)
|
||||
{
|
||||
return toAjax(waterConfigService.deleteWaterConfigByConfigIds(configIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.config.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.config.domain.WaterConfig;
|
||||
|
||||
/**
|
||||
* 系统配置管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WaterConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询系统配置管理
|
||||
*
|
||||
* @param configId 系统配置管理主键
|
||||
* @return 系统配置管理
|
||||
*/
|
||||
public WaterConfig selectWaterConfigByConfigId(Long configId);
|
||||
|
||||
/**
|
||||
* 查询系统配置管理列表
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 系统配置管理集合
|
||||
*/
|
||||
public List<WaterConfig> selectWaterConfigList(WaterConfig waterConfig);
|
||||
|
||||
/**
|
||||
* 新增系统配置管理
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterConfig(WaterConfig waterConfig);
|
||||
|
||||
/**
|
||||
* 修改系统配置管理
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterConfig(WaterConfig waterConfig);
|
||||
|
||||
/**
|
||||
* 删除系统配置管理
|
||||
*
|
||||
* @param configId 系统配置管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterConfigByConfigId(Long configId);
|
||||
|
||||
/**
|
||||
* 批量删除系统配置管理
|
||||
*
|
||||
* @param configIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterConfigByConfigIds(Long[] configIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.config.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.config.domain.WaterConfig;
|
||||
|
||||
/**
|
||||
* 系统配置管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWaterConfigService
|
||||
{
|
||||
/**
|
||||
* 查询系统配置管理
|
||||
*
|
||||
* @param configId 系统配置管理主键
|
||||
* @return 系统配置管理
|
||||
*/
|
||||
public WaterConfig selectWaterConfigByConfigId(Long configId);
|
||||
|
||||
/**
|
||||
* 查询系统配置管理列表
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 系统配置管理集合
|
||||
*/
|
||||
public List<WaterConfig> selectWaterConfigList(WaterConfig waterConfig);
|
||||
|
||||
/**
|
||||
* 新增系统配置管理
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterConfig(WaterConfig waterConfig);
|
||||
|
||||
/**
|
||||
* 修改系统配置管理
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterConfig(WaterConfig waterConfig);
|
||||
|
||||
/**
|
||||
* 批量删除系统配置管理
|
||||
*
|
||||
* @param configIds 需要删除的系统配置管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterConfigByConfigIds(Long[] configIds);
|
||||
|
||||
/**
|
||||
* 删除系统配置管理信息
|
||||
*
|
||||
* @param configId 系统配置管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterConfigByConfigId(Long configId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.config.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.water.config.mapper.WaterConfigMapper;
|
||||
import com.ruoyi.water.config.domain.WaterConfig;
|
||||
import com.ruoyi.water.config.service.IWaterConfigService;
|
||||
|
||||
/**
|
||||
* 系统配置管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class WaterConfigServiceImpl implements IWaterConfigService
|
||||
{
|
||||
@Autowired
|
||||
private WaterConfigMapper waterConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询系统配置管理
|
||||
*
|
||||
* @param configId 系统配置管理主键
|
||||
* @return 系统配置管理
|
||||
*/
|
||||
@Override
|
||||
public WaterConfig selectWaterConfigByConfigId(Long configId)
|
||||
{
|
||||
return waterConfigMapper.selectWaterConfigByConfigId(configId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统配置管理列表
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 系统配置管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterConfig> selectWaterConfigList(WaterConfig waterConfig)
|
||||
{
|
||||
return waterConfigMapper.selectWaterConfigList(waterConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统配置管理
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterConfig(WaterConfig waterConfig)
|
||||
{
|
||||
waterConfig.setCreateTime(DateUtils.getNowDate());
|
||||
return waterConfigMapper.insertWaterConfig(waterConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统配置管理
|
||||
*
|
||||
* @param waterConfig 系统配置管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterConfig(WaterConfig waterConfig)
|
||||
{
|
||||
waterConfig.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterConfigMapper.updateWaterConfig(waterConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除系统配置管理
|
||||
*
|
||||
* @param configIds 需要删除的系统配置管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterConfigByConfigIds(Long[] configIds)
|
||||
{
|
||||
return waterConfigMapper.deleteWaterConfigByConfigIds(configIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统配置管理信息
|
||||
*
|
||||
* @param configId 系统配置管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterConfigByConfigId(Long configId)
|
||||
{
|
||||
return waterConfigMapper.deleteWaterConfigByConfigId(configId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.device.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.water.device.domain.WaterDevice;
|
||||
import com.ruoyi.water.device.service.IWaterDeviceService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/设备")
|
||||
public class WaterDeviceController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterDeviceService waterDeviceService;
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:设备:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterDevice waterDevice)
|
||||
{
|
||||
startPage();
|
||||
List<WaterDevice> list = waterDeviceService.selectWaterDeviceList(waterDevice);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:设备:export')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterDevice waterDevice)
|
||||
{
|
||||
List<WaterDevice> list = waterDeviceService.selectWaterDeviceList(waterDevice);
|
||||
ExcelUtil<WaterDevice> util = new ExcelUtil<WaterDevice>(WaterDevice.class);
|
||||
util.exportExcel(response, list, "设备管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:设备:query')")
|
||||
@GetMapping(value = "/{deviceId}")
|
||||
public AjaxResult getInfo(@PathVariable("deviceId") Long deviceId)
|
||||
{
|
||||
return success(waterDeviceService.selectWaterDeviceByDeviceId(deviceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:设备:add')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterDevice waterDevice)
|
||||
{
|
||||
return toAjax(waterDeviceService.insertWaterDevice(waterDevice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:设备:edit')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterDevice waterDevice)
|
||||
{
|
||||
return toAjax(waterDeviceService.updateWaterDevice(waterDevice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:设备:remove')")
|
||||
@Log(title = "设备管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{deviceIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] deviceIds)
|
||||
{
|
||||
return toAjax(waterDeviceService.deleteWaterDeviceByDeviceIds(deviceIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.device.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.device.domain.WaterDevice;
|
||||
|
||||
/**
|
||||
* 设备管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface WaterDeviceMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param deviceId 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
public WaterDevice selectWaterDeviceByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 设备管理集合
|
||||
*/
|
||||
public List<WaterDevice> selectWaterDeviceList(WaterDevice waterDevice);
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterDevice(WaterDevice waterDevice);
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterDevice(WaterDevice waterDevice);
|
||||
|
||||
/**
|
||||
* 删除设备管理
|
||||
*
|
||||
* @param deviceId 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterDeviceByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param deviceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterDeviceByDeviceIds(Long[] deviceIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.device.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.device.domain.WaterDevice;
|
||||
|
||||
/**
|
||||
* 设备管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface IWaterDeviceService
|
||||
{
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param deviceId 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
public WaterDevice selectWaterDeviceByDeviceId(Long deviceId);
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 设备管理集合
|
||||
*/
|
||||
public List<WaterDevice> selectWaterDeviceList(WaterDevice waterDevice);
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterDevice(WaterDevice waterDevice);
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterDevice(WaterDevice waterDevice);
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param deviceIds 需要删除的设备管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterDeviceByDeviceIds(Long[] deviceIds);
|
||||
|
||||
/**
|
||||
* 删除设备管理信息
|
||||
*
|
||||
* @param deviceId 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterDeviceByDeviceId(Long deviceId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.device.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.water.device.mapper.WaterDeviceMapper;
|
||||
import com.ruoyi.water.device.domain.WaterDevice;
|
||||
import com.ruoyi.water.device.service.IWaterDeviceService;
|
||||
|
||||
/**
|
||||
* 设备管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@Service
|
||||
public class WaterDeviceServiceImpl implements IWaterDeviceService
|
||||
{
|
||||
@Autowired
|
||||
private WaterDeviceMapper waterDeviceMapper;
|
||||
|
||||
/**
|
||||
* 查询设备管理
|
||||
*
|
||||
* @param deviceId 设备管理主键
|
||||
* @return 设备管理
|
||||
*/
|
||||
@Override
|
||||
public WaterDevice selectWaterDeviceByDeviceId(Long deviceId)
|
||||
{
|
||||
return waterDeviceMapper.selectWaterDeviceByDeviceId(deviceId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备管理列表
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 设备管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterDevice> selectWaterDeviceList(WaterDevice waterDevice)
|
||||
{
|
||||
return waterDeviceMapper.selectWaterDeviceList(waterDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备管理
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterDevice(WaterDevice waterDevice)
|
||||
{
|
||||
waterDevice.setCreateTime(DateUtils.getNowDate());
|
||||
return waterDeviceMapper.insertWaterDevice(waterDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备管理
|
||||
*
|
||||
* @param waterDevice 设备管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterDevice(WaterDevice waterDevice)
|
||||
{
|
||||
waterDevice.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterDeviceMapper.updateWaterDevice(waterDevice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备管理
|
||||
*
|
||||
* @param deviceIds 需要删除的设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterDeviceByDeviceIds(Long[] deviceIds)
|
||||
{
|
||||
return waterDeviceMapper.deleteWaterDeviceByDeviceIds(deviceIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备管理信息
|
||||
*
|
||||
* @param deviceId 设备管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterDeviceByDeviceId(Long deviceId)
|
||||
{
|
||||
return waterDeviceMapper.deleteWaterDeviceByDeviceId(deviceId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.evaluation.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.water.evaluation.domain.WaterEvaluation;
|
||||
import com.ruoyi.water.evaluation.service.IWaterEvaluationService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 订单评价管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/订单评价")
|
||||
public class WaterEvaluationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterEvaluationService waterEvaluationService;
|
||||
|
||||
/**
|
||||
* 查询订单评价管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单评价:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterEvaluation waterEvaluation)
|
||||
{
|
||||
startPage();
|
||||
List<WaterEvaluation> list = waterEvaluationService.selectWaterEvaluationList(waterEvaluation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单评价管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单评价:export')")
|
||||
@Log(title = "订单评价管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterEvaluation waterEvaluation)
|
||||
{
|
||||
List<WaterEvaluation> list = waterEvaluationService.selectWaterEvaluationList(waterEvaluation);
|
||||
ExcelUtil<WaterEvaluation> util = new ExcelUtil<WaterEvaluation>(WaterEvaluation.class);
|
||||
util.exportExcel(response, list, "订单评价管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单评价管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单评价:query')")
|
||||
@GetMapping(value = "/{evaluationId}")
|
||||
public AjaxResult getInfo(@PathVariable("evaluationId") Long evaluationId)
|
||||
{
|
||||
return success(waterEvaluationService.selectWaterEvaluationByEvaluationId(evaluationId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单评价管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单评价:add')")
|
||||
@Log(title = "订单评价管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterEvaluation waterEvaluation)
|
||||
{
|
||||
return toAjax(waterEvaluationService.insertWaterEvaluation(waterEvaluation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单评价管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单评价:edit')")
|
||||
@Log(title = "订单评价管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterEvaluation waterEvaluation)
|
||||
{
|
||||
return toAjax(waterEvaluationService.updateWaterEvaluation(waterEvaluation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单评价管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单评价:remove')")
|
||||
@Log(title = "订单评价管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{evaluationIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] evaluationIds)
|
||||
{
|
||||
return toAjax(waterEvaluationService.deleteWaterEvaluationByEvaluationIds(evaluationIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.evaluation.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.evaluation.domain.WaterEvaluation;
|
||||
|
||||
/**
|
||||
* 订单评价管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WaterEvaluationMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单评价管理
|
||||
*
|
||||
* @param evaluationId 订单评价管理主键
|
||||
* @return 订单评价管理
|
||||
*/
|
||||
public WaterEvaluation selectWaterEvaluationByEvaluationId(Long evaluationId);
|
||||
|
||||
/**
|
||||
* 查询订单评价管理列表
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 订单评价管理集合
|
||||
*/
|
||||
public List<WaterEvaluation> selectWaterEvaluationList(WaterEvaluation waterEvaluation);
|
||||
|
||||
/**
|
||||
* 新增订单评价管理
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterEvaluation(WaterEvaluation waterEvaluation);
|
||||
|
||||
/**
|
||||
* 修改订单评价管理
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterEvaluation(WaterEvaluation waterEvaluation);
|
||||
|
||||
/**
|
||||
* 删除订单评价管理
|
||||
*
|
||||
* @param evaluationId 订单评价管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterEvaluationByEvaluationId(Long evaluationId);
|
||||
|
||||
/**
|
||||
* 批量删除订单评价管理
|
||||
*
|
||||
* @param evaluationIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterEvaluationByEvaluationIds(Long[] evaluationIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.evaluation.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.evaluation.domain.WaterEvaluation;
|
||||
|
||||
/**
|
||||
* 订单评价管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWaterEvaluationService
|
||||
{
|
||||
/**
|
||||
* 查询订单评价管理
|
||||
*
|
||||
* @param evaluationId 订单评价管理主键
|
||||
* @return 订单评价管理
|
||||
*/
|
||||
public WaterEvaluation selectWaterEvaluationByEvaluationId(Long evaluationId);
|
||||
|
||||
/**
|
||||
* 查询订单评价管理列表
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 订单评价管理集合
|
||||
*/
|
||||
public List<WaterEvaluation> selectWaterEvaluationList(WaterEvaluation waterEvaluation);
|
||||
|
||||
/**
|
||||
* 新增订单评价管理
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterEvaluation(WaterEvaluation waterEvaluation);
|
||||
|
||||
/**
|
||||
* 修改订单评价管理
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterEvaluation(WaterEvaluation waterEvaluation);
|
||||
|
||||
/**
|
||||
* 批量删除订单评价管理
|
||||
*
|
||||
* @param evaluationIds 需要删除的订单评价管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterEvaluationByEvaluationIds(Long[] evaluationIds);
|
||||
|
||||
/**
|
||||
* 删除订单评价管理信息
|
||||
*
|
||||
* @param evaluationId 订单评价管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterEvaluationByEvaluationId(Long evaluationId);
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package com.ruoyi.water.evaluation.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.water.evaluation.mapper.WaterEvaluationMapper;
|
||||
import com.ruoyi.water.evaluation.domain.WaterEvaluation;
|
||||
import com.ruoyi.water.evaluation.service.IWaterEvaluationService;
|
||||
|
||||
/**
|
||||
* 订单评价管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class WaterEvaluationServiceImpl implements IWaterEvaluationService
|
||||
{
|
||||
@Autowired
|
||||
private WaterEvaluationMapper waterEvaluationMapper;
|
||||
|
||||
/**
|
||||
* 查询订单评价管理
|
||||
*
|
||||
* @param evaluationId 订单评价管理主键
|
||||
* @return 订单评价管理
|
||||
*/
|
||||
@Override
|
||||
public WaterEvaluation selectWaterEvaluationByEvaluationId(Long evaluationId)
|
||||
{
|
||||
return waterEvaluationMapper.selectWaterEvaluationByEvaluationId(evaluationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单评价管理列表
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 订单评价管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterEvaluation> selectWaterEvaluationList(WaterEvaluation waterEvaluation)
|
||||
{
|
||||
return waterEvaluationMapper.selectWaterEvaluationList(waterEvaluation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单评价管理
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterEvaluation(WaterEvaluation waterEvaluation)
|
||||
{
|
||||
waterEvaluation.setCreateTime(DateUtils.getNowDate());
|
||||
return waterEvaluationMapper.insertWaterEvaluation(waterEvaluation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单评价管理
|
||||
*
|
||||
* @param waterEvaluation 订单评价管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterEvaluation(WaterEvaluation waterEvaluation)
|
||||
{
|
||||
return waterEvaluationMapper.updateWaterEvaluation(waterEvaluation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单评价管理
|
||||
*
|
||||
* @param evaluationIds 需要删除的订单评价管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterEvaluationByEvaluationIds(Long[] evaluationIds)
|
||||
{
|
||||
return waterEvaluationMapper.deleteWaterEvaluationByEvaluationIds(evaluationIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单评价管理信息
|
||||
*
|
||||
* @param evaluationId 订单评价管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterEvaluationByEvaluationId(Long evaluationId)
|
||||
{
|
||||
return waterEvaluationMapper.deleteWaterEvaluationByEvaluationId(evaluationId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.filter.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.water.filter.domain.WaterFilter;
|
||||
import com.ruoyi.water.filter.service.IWaterFilterService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 滤芯管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/滤芯")
|
||||
public class WaterFilterController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterFilterService waterFilterService;
|
||||
|
||||
/**
|
||||
* 查询滤芯管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:滤芯:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterFilter waterFilter)
|
||||
{
|
||||
startPage();
|
||||
List<WaterFilter> list = waterFilterService.selectWaterFilterList(waterFilter);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出滤芯管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:滤芯:export')")
|
||||
@Log(title = "滤芯管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterFilter waterFilter)
|
||||
{
|
||||
List<WaterFilter> list = waterFilterService.selectWaterFilterList(waterFilter);
|
||||
ExcelUtil<WaterFilter> util = new ExcelUtil<WaterFilter>(WaterFilter.class);
|
||||
util.exportExcel(response, list, "滤芯管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取滤芯管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:滤芯:query')")
|
||||
@GetMapping(value = "/{filterId}")
|
||||
public AjaxResult getInfo(@PathVariable("filterId") Long filterId)
|
||||
{
|
||||
return success(waterFilterService.selectWaterFilterByFilterId(filterId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增滤芯管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:滤芯:add')")
|
||||
@Log(title = "滤芯管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterFilter waterFilter)
|
||||
{
|
||||
return toAjax(waterFilterService.insertWaterFilter(waterFilter));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改滤芯管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:滤芯:edit')")
|
||||
@Log(title = "滤芯管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterFilter waterFilter)
|
||||
{
|
||||
return toAjax(waterFilterService.updateWaterFilter(waterFilter));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除滤芯管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:滤芯:remove')")
|
||||
@Log(title = "滤芯管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{filterIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] filterIds)
|
||||
{
|
||||
return toAjax(waterFilterService.deleteWaterFilterByFilterIds(filterIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.filter.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.filter.domain.WaterFilter;
|
||||
|
||||
/**
|
||||
* 滤芯管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface WaterFilterMapper
|
||||
{
|
||||
/**
|
||||
* 查询滤芯管理
|
||||
*
|
||||
* @param filterId 滤芯管理主键
|
||||
* @return 滤芯管理
|
||||
*/
|
||||
public WaterFilter selectWaterFilterByFilterId(Long filterId);
|
||||
|
||||
/**
|
||||
* 查询滤芯管理列表
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 滤芯管理集合
|
||||
*/
|
||||
public List<WaterFilter> selectWaterFilterList(WaterFilter waterFilter);
|
||||
|
||||
/**
|
||||
* 新增滤芯管理
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterFilter(WaterFilter waterFilter);
|
||||
|
||||
/**
|
||||
* 修改滤芯管理
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterFilter(WaterFilter waterFilter);
|
||||
|
||||
/**
|
||||
* 删除滤芯管理
|
||||
*
|
||||
* @param filterId 滤芯管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterFilterByFilterId(Long filterId);
|
||||
|
||||
/**
|
||||
* 批量删除滤芯管理
|
||||
*
|
||||
* @param filterIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterFilterByFilterIds(Long[] filterIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.filter.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.filter.domain.WaterFilter;
|
||||
|
||||
/**
|
||||
* 滤芯管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface IWaterFilterService
|
||||
{
|
||||
/**
|
||||
* 查询滤芯管理
|
||||
*
|
||||
* @param filterId 滤芯管理主键
|
||||
* @return 滤芯管理
|
||||
*/
|
||||
public WaterFilter selectWaterFilterByFilterId(Long filterId);
|
||||
|
||||
/**
|
||||
* 查询滤芯管理列表
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 滤芯管理集合
|
||||
*/
|
||||
public List<WaterFilter> selectWaterFilterList(WaterFilter waterFilter);
|
||||
|
||||
/**
|
||||
* 新增滤芯管理
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterFilter(WaterFilter waterFilter);
|
||||
|
||||
/**
|
||||
* 修改滤芯管理
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterFilter(WaterFilter waterFilter);
|
||||
|
||||
/**
|
||||
* 批量删除滤芯管理
|
||||
*
|
||||
* @param filterIds 需要删除的滤芯管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterFilterByFilterIds(Long[] filterIds);
|
||||
|
||||
/**
|
||||
* 删除滤芯管理信息
|
||||
*
|
||||
* @param filterId 滤芯管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterFilterByFilterId(Long filterId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.filter.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.water.filter.mapper.WaterFilterMapper;
|
||||
import com.ruoyi.water.filter.domain.WaterFilter;
|
||||
import com.ruoyi.water.filter.service.IWaterFilterService;
|
||||
|
||||
/**
|
||||
* 滤芯管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@Service
|
||||
public class WaterFilterServiceImpl implements IWaterFilterService
|
||||
{
|
||||
@Autowired
|
||||
private WaterFilterMapper waterFilterMapper;
|
||||
|
||||
/**
|
||||
* 查询滤芯管理
|
||||
*
|
||||
* @param filterId 滤芯管理主键
|
||||
* @return 滤芯管理
|
||||
*/
|
||||
@Override
|
||||
public WaterFilter selectWaterFilterByFilterId(Long filterId)
|
||||
{
|
||||
return waterFilterMapper.selectWaterFilterByFilterId(filterId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询滤芯管理列表
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 滤芯管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterFilter> selectWaterFilterList(WaterFilter waterFilter)
|
||||
{
|
||||
return waterFilterMapper.selectWaterFilterList(waterFilter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增滤芯管理
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterFilter(WaterFilter waterFilter)
|
||||
{
|
||||
waterFilter.setCreateTime(DateUtils.getNowDate());
|
||||
return waterFilterMapper.insertWaterFilter(waterFilter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改滤芯管理
|
||||
*
|
||||
* @param waterFilter 滤芯管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterFilter(WaterFilter waterFilter)
|
||||
{
|
||||
waterFilter.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterFilterMapper.updateWaterFilter(waterFilter);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除滤芯管理
|
||||
*
|
||||
* @param filterIds 需要删除的滤芯管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterFilterByFilterIds(Long[] filterIds)
|
||||
{
|
||||
return waterFilterMapper.deleteWaterFilterByFilterIds(filterIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除滤芯管理信息
|
||||
*
|
||||
* @param filterId 滤芯管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterFilterByFilterId(Long filterId)
|
||||
{
|
||||
return waterFilterMapper.deleteWaterFilterByFilterId(filterId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.message.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.water.message.domain.WaterMessage;
|
||||
import com.ruoyi.water.message.service.IWaterMessageService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 系统消息管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/系统消息")
|
||||
public class WaterMessageController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterMessageService waterMessageService;
|
||||
|
||||
/**
|
||||
* 查询系统消息管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统消息:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterMessage waterMessage)
|
||||
{
|
||||
startPage();
|
||||
List<WaterMessage> list = waterMessageService.selectWaterMessageList(waterMessage);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出系统消息管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统消息:export')")
|
||||
@Log(title = "系统消息管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterMessage waterMessage)
|
||||
{
|
||||
List<WaterMessage> list = waterMessageService.selectWaterMessageList(waterMessage);
|
||||
ExcelUtil<WaterMessage> util = new ExcelUtil<WaterMessage>(WaterMessage.class);
|
||||
util.exportExcel(response, list, "系统消息管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统消息管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统消息:query')")
|
||||
@GetMapping(value = "/{messageId}")
|
||||
public AjaxResult getInfo(@PathVariable("messageId") Long messageId)
|
||||
{
|
||||
return success(waterMessageService.selectWaterMessageByMessageId(messageId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统消息管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统消息:add')")
|
||||
@Log(title = "系统消息管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterMessage waterMessage)
|
||||
{
|
||||
return toAjax(waterMessageService.insertWaterMessage(waterMessage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统消息管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统消息:edit')")
|
||||
@Log(title = "系统消息管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterMessage waterMessage)
|
||||
{
|
||||
return toAjax(waterMessageService.updateWaterMessage(waterMessage));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统消息管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:系统消息:remove')")
|
||||
@Log(title = "系统消息管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{messageIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] messageIds)
|
||||
{
|
||||
return toAjax(waterMessageService.deleteWaterMessageByMessageIds(messageIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.message.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.message.domain.WaterMessage;
|
||||
|
||||
/**
|
||||
* 系统消息管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WaterMessageMapper
|
||||
{
|
||||
/**
|
||||
* 查询系统消息管理
|
||||
*
|
||||
* @param messageId 系统消息管理主键
|
||||
* @return 系统消息管理
|
||||
*/
|
||||
public WaterMessage selectWaterMessageByMessageId(Long messageId);
|
||||
|
||||
/**
|
||||
* 查询系统消息管理列表
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 系统消息管理集合
|
||||
*/
|
||||
public List<WaterMessage> selectWaterMessageList(WaterMessage waterMessage);
|
||||
|
||||
/**
|
||||
* 新增系统消息管理
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterMessage(WaterMessage waterMessage);
|
||||
|
||||
/**
|
||||
* 修改系统消息管理
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterMessage(WaterMessage waterMessage);
|
||||
|
||||
/**
|
||||
* 删除系统消息管理
|
||||
*
|
||||
* @param messageId 系统消息管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterMessageByMessageId(Long messageId);
|
||||
|
||||
/**
|
||||
* 批量删除系统消息管理
|
||||
*
|
||||
* @param messageIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterMessageByMessageIds(Long[] messageIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.message.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.message.domain.WaterMessage;
|
||||
|
||||
/**
|
||||
* 系统消息管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWaterMessageService
|
||||
{
|
||||
/**
|
||||
* 查询系统消息管理
|
||||
*
|
||||
* @param messageId 系统消息管理主键
|
||||
* @return 系统消息管理
|
||||
*/
|
||||
public WaterMessage selectWaterMessageByMessageId(Long messageId);
|
||||
|
||||
/**
|
||||
* 查询系统消息管理列表
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 系统消息管理集合
|
||||
*/
|
||||
public List<WaterMessage> selectWaterMessageList(WaterMessage waterMessage);
|
||||
|
||||
/**
|
||||
* 新增系统消息管理
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterMessage(WaterMessage waterMessage);
|
||||
|
||||
/**
|
||||
* 修改系统消息管理
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterMessage(WaterMessage waterMessage);
|
||||
|
||||
/**
|
||||
* 批量删除系统消息管理
|
||||
*
|
||||
* @param messageIds 需要删除的系统消息管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterMessageByMessageIds(Long[] messageIds);
|
||||
|
||||
/**
|
||||
* 删除系统消息管理信息
|
||||
*
|
||||
* @param messageId 系统消息管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterMessageByMessageId(Long messageId);
|
||||
}
|
||||
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.water.message.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.water.message.mapper.WaterMessageMapper;
|
||||
import com.ruoyi.water.message.domain.WaterMessage;
|
||||
import com.ruoyi.water.message.service.IWaterMessageService;
|
||||
|
||||
/**
|
||||
* 系统消息管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class WaterMessageServiceImpl implements IWaterMessageService
|
||||
{
|
||||
@Autowired
|
||||
private WaterMessageMapper waterMessageMapper;
|
||||
|
||||
/**
|
||||
* 查询系统消息管理
|
||||
*
|
||||
* @param messageId 系统消息管理主键
|
||||
* @return 系统消息管理
|
||||
*/
|
||||
@Override
|
||||
public WaterMessage selectWaterMessageByMessageId(Long messageId)
|
||||
{
|
||||
return waterMessageMapper.selectWaterMessageByMessageId(messageId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询系统消息管理列表
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 系统消息管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterMessage> selectWaterMessageList(WaterMessage waterMessage)
|
||||
{
|
||||
return waterMessageMapper.selectWaterMessageList(waterMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增系统消息管理
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterMessage(WaterMessage waterMessage)
|
||||
{
|
||||
return waterMessageMapper.insertWaterMessage(waterMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改系统消息管理
|
||||
*
|
||||
* @param waterMessage 系统消息管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterMessage(WaterMessage waterMessage)
|
||||
{
|
||||
return waterMessageMapper.updateWaterMessage(waterMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除系统消息管理
|
||||
*
|
||||
* @param messageIds 需要删除的系统消息管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterMessageByMessageIds(Long[] messageIds)
|
||||
{
|
||||
return waterMessageMapper.deleteWaterMessageByMessageIds(messageIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除系统消息管理信息
|
||||
*
|
||||
* @param messageId 系统消息管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterMessageByMessageId(Long messageId)
|
||||
{
|
||||
return waterMessageMapper.deleteWaterMessageByMessageId(messageId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.notice.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.water.notice.domain.WaterNotice;
|
||||
import com.ruoyi.water.notice.service.IWaterNoticeService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 通知公告管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/通知公告")
|
||||
public class WaterNoticeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterNoticeService waterNoticeService;
|
||||
|
||||
/**
|
||||
* 查询通知公告管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:通知公告:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterNotice waterNotice)
|
||||
{
|
||||
startPage();
|
||||
List<WaterNotice> list = waterNoticeService.selectWaterNoticeList(waterNotice);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出通知公告管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:通知公告:export')")
|
||||
@Log(title = "通知公告管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterNotice waterNotice)
|
||||
{
|
||||
List<WaterNotice> list = waterNoticeService.selectWaterNoticeList(waterNotice);
|
||||
ExcelUtil<WaterNotice> util = new ExcelUtil<WaterNotice>(WaterNotice.class);
|
||||
util.exportExcel(response, list, "通知公告管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取通知公告管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:通知公告:query')")
|
||||
@GetMapping(value = "/{noticeId}")
|
||||
public AjaxResult getInfo(@PathVariable("noticeId") Long noticeId)
|
||||
{
|
||||
return success(waterNoticeService.selectWaterNoticeByNoticeId(noticeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增通知公告管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:通知公告:add')")
|
||||
@Log(title = "通知公告管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterNotice waterNotice)
|
||||
{
|
||||
return toAjax(waterNoticeService.insertWaterNotice(waterNotice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改通知公告管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:通知公告:edit')")
|
||||
@Log(title = "通知公告管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterNotice waterNotice)
|
||||
{
|
||||
return toAjax(waterNoticeService.updateWaterNotice(waterNotice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除通知公告管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:通知公告:remove')")
|
||||
@Log(title = "通知公告管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{noticeIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] noticeIds)
|
||||
{
|
||||
return toAjax(waterNoticeService.deleteWaterNoticeByNoticeIds(noticeIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.notice.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.notice.domain.WaterNotice;
|
||||
|
||||
/**
|
||||
* 通知公告管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WaterNoticeMapper
|
||||
{
|
||||
/**
|
||||
* 查询通知公告管理
|
||||
*
|
||||
* @param noticeId 通知公告管理主键
|
||||
* @return 通知公告管理
|
||||
*/
|
||||
public WaterNotice selectWaterNoticeByNoticeId(Long noticeId);
|
||||
|
||||
/**
|
||||
* 查询通知公告管理列表
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 通知公告管理集合
|
||||
*/
|
||||
public List<WaterNotice> selectWaterNoticeList(WaterNotice waterNotice);
|
||||
|
||||
/**
|
||||
* 新增通知公告管理
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterNotice(WaterNotice waterNotice);
|
||||
|
||||
/**
|
||||
* 修改通知公告管理
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterNotice(WaterNotice waterNotice);
|
||||
|
||||
/**
|
||||
* 删除通知公告管理
|
||||
*
|
||||
* @param noticeId 通知公告管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterNoticeByNoticeId(Long noticeId);
|
||||
|
||||
/**
|
||||
* 批量删除通知公告管理
|
||||
*
|
||||
* @param noticeIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterNoticeByNoticeIds(Long[] noticeIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.notice.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.notice.domain.WaterNotice;
|
||||
|
||||
/**
|
||||
* 通知公告管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWaterNoticeService
|
||||
{
|
||||
/**
|
||||
* 查询通知公告管理
|
||||
*
|
||||
* @param noticeId 通知公告管理主键
|
||||
* @return 通知公告管理
|
||||
*/
|
||||
public WaterNotice selectWaterNoticeByNoticeId(Long noticeId);
|
||||
|
||||
/**
|
||||
* 查询通知公告管理列表
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 通知公告管理集合
|
||||
*/
|
||||
public List<WaterNotice> selectWaterNoticeList(WaterNotice waterNotice);
|
||||
|
||||
/**
|
||||
* 新增通知公告管理
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterNotice(WaterNotice waterNotice);
|
||||
|
||||
/**
|
||||
* 修改通知公告管理
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterNotice(WaterNotice waterNotice);
|
||||
|
||||
/**
|
||||
* 批量删除通知公告管理
|
||||
*
|
||||
* @param noticeIds 需要删除的通知公告管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterNoticeByNoticeIds(Long[] noticeIds);
|
||||
|
||||
/**
|
||||
* 删除通知公告管理信息
|
||||
*
|
||||
* @param noticeId 通知公告管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterNoticeByNoticeId(Long noticeId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.notice.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.water.notice.mapper.WaterNoticeMapper;
|
||||
import com.ruoyi.water.notice.domain.WaterNotice;
|
||||
import com.ruoyi.water.notice.service.IWaterNoticeService;
|
||||
|
||||
/**
|
||||
* 通知公告管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class WaterNoticeServiceImpl implements IWaterNoticeService
|
||||
{
|
||||
@Autowired
|
||||
private WaterNoticeMapper waterNoticeMapper;
|
||||
|
||||
/**
|
||||
* 查询通知公告管理
|
||||
*
|
||||
* @param noticeId 通知公告管理主键
|
||||
* @return 通知公告管理
|
||||
*/
|
||||
@Override
|
||||
public WaterNotice selectWaterNoticeByNoticeId(Long noticeId)
|
||||
{
|
||||
return waterNoticeMapper.selectWaterNoticeByNoticeId(noticeId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询通知公告管理列表
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 通知公告管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterNotice> selectWaterNoticeList(WaterNotice waterNotice)
|
||||
{
|
||||
return waterNoticeMapper.selectWaterNoticeList(waterNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增通知公告管理
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterNotice(WaterNotice waterNotice)
|
||||
{
|
||||
waterNotice.setCreateTime(DateUtils.getNowDate());
|
||||
return waterNoticeMapper.insertWaterNotice(waterNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改通知公告管理
|
||||
*
|
||||
* @param waterNotice 通知公告管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterNotice(WaterNotice waterNotice)
|
||||
{
|
||||
waterNotice.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterNoticeMapper.updateWaterNotice(waterNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除通知公告管理
|
||||
*
|
||||
* @param noticeIds 需要删除的通知公告管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterNoticeByNoticeIds(Long[] noticeIds)
|
||||
{
|
||||
return waterNoticeMapper.deleteWaterNoticeByNoticeIds(noticeIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除通知公告管理信息
|
||||
*
|
||||
* @param noticeId 通知公告管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterNoticeByNoticeId(Long noticeId)
|
||||
{
|
||||
return waterNoticeMapper.deleteWaterNoticeByNoticeId(noticeId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.order.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.water.order.domain.WaterOrderProduct;
|
||||
import com.ruoyi.water.order.service.IWaterOrderProductService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 订单商品管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/订单商品")
|
||||
public class WaterOrderProductController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterOrderProductService waterOrderProductService;
|
||||
|
||||
/**
|
||||
* 查询订单商品管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单商品:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterOrderProduct waterOrderProduct)
|
||||
{
|
||||
startPage();
|
||||
List<WaterOrderProduct> list = waterOrderProductService.selectWaterOrderProductList(waterOrderProduct);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单商品管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单商品:export')")
|
||||
@Log(title = "订单商品管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterOrderProduct waterOrderProduct)
|
||||
{
|
||||
List<WaterOrderProduct> list = waterOrderProductService.selectWaterOrderProductList(waterOrderProduct);
|
||||
ExcelUtil<WaterOrderProduct> util = new ExcelUtil<WaterOrderProduct>(WaterOrderProduct.class);
|
||||
util.exportExcel(response, list, "订单商品管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单商品管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单商品:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(waterOrderProductService.selectWaterOrderProductById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单商品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单商品:add')")
|
||||
@Log(title = "订单商品管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterOrderProduct waterOrderProduct)
|
||||
{
|
||||
return toAjax(waterOrderProductService.insertWaterOrderProduct(waterOrderProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单商品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单商品:edit')")
|
||||
@Log(title = "订单商品管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterOrderProduct waterOrderProduct)
|
||||
{
|
||||
return toAjax(waterOrderProductService.updateWaterOrderProduct(waterOrderProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单商品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:订单商品:remove')")
|
||||
@Log(title = "订单商品管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(waterOrderProductService.deleteWaterOrderProductByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.order.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.water.order.domain.WaterServiceOrder;
|
||||
import com.ruoyi.water.order.service.IWaterServiceOrderService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 服务订单管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/服务订单")
|
||||
public class WaterServiceOrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterServiceOrderService waterServiceOrderService;
|
||||
|
||||
/**
|
||||
* 查询服务订单管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:服务订单:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterServiceOrder waterServiceOrder)
|
||||
{
|
||||
startPage();
|
||||
List<WaterServiceOrder> list = waterServiceOrderService.selectWaterServiceOrderList(waterServiceOrder);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出服务订单管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:服务订单:export')")
|
||||
@Log(title = "服务订单管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterServiceOrder waterServiceOrder)
|
||||
{
|
||||
List<WaterServiceOrder> list = waterServiceOrderService.selectWaterServiceOrderList(waterServiceOrder);
|
||||
ExcelUtil<WaterServiceOrder> util = new ExcelUtil<WaterServiceOrder>(WaterServiceOrder.class);
|
||||
util.exportExcel(response, list, "服务订单管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取服务订单管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:服务订单:query')")
|
||||
@GetMapping(value = "/{orderId}")
|
||||
public AjaxResult getInfo(@PathVariable("orderId") Long orderId)
|
||||
{
|
||||
return success(waterServiceOrderService.selectWaterServiceOrderByOrderId(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增服务订单管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:服务订单:add')")
|
||||
@Log(title = "服务订单管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterServiceOrder waterServiceOrder)
|
||||
{
|
||||
return toAjax(waterServiceOrderService.insertWaterServiceOrder(waterServiceOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务订单管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:服务订单:edit')")
|
||||
@Log(title = "服务订单管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterServiceOrder waterServiceOrder)
|
||||
{
|
||||
return toAjax(waterServiceOrderService.updateWaterServiceOrder(waterServiceOrder));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务订单管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:服务订单:remove')")
|
||||
@Log(title = "服务订单管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] orderIds)
|
||||
{
|
||||
return toAjax(waterServiceOrderService.deleteWaterServiceOrderByOrderIds(orderIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,130 @@
|
||||
package com.ruoyi.water.order.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 订单商品管理对象 water_order_product
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public class WaterOrderProduct extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@Excel(name = "主键ID")
|
||||
private Long id;
|
||||
|
||||
/** 订单ID */
|
||||
@Excel(name = "订单ID")
|
||||
private Long orderId;
|
||||
|
||||
/** 商品ID */
|
||||
@Excel(name = "商品ID")
|
||||
private Long productId;
|
||||
|
||||
/** 商品名称(冗余) */
|
||||
@Excel(name = "商品名称", readConverterExp = "冗=余")
|
||||
private String productName;
|
||||
|
||||
/** 商品单价(冗余) */
|
||||
@Excel(name = "商品单价", readConverterExp = "冗=余")
|
||||
private BigDecimal productPrice;
|
||||
|
||||
/** 购买数量 */
|
||||
@Excel(name = "购买数量")
|
||||
private Long quantity;
|
||||
|
||||
/** 小计金额 */
|
||||
@Excel(name = "小计金额")
|
||||
private BigDecimal totalPrice;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
public void setProductName(String productName)
|
||||
{
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductName()
|
||||
{
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductPrice(BigDecimal productPrice)
|
||||
{
|
||||
this.productPrice = productPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getProductPrice()
|
||||
{
|
||||
return productPrice;
|
||||
}
|
||||
|
||||
public void setQuantity(Long quantity)
|
||||
{
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Long getQuantity()
|
||||
{
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setTotalPrice(BigDecimal totalPrice)
|
||||
{
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPrice()
|
||||
{
|
||||
return totalPrice;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("orderId", getOrderId())
|
||||
.append("productId", getProductId())
|
||||
.append("productName", getProductName())
|
||||
.append("productPrice", getProductPrice())
|
||||
.append("quantity", getQuantity())
|
||||
.append("totalPrice", getTotalPrice())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.order.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.order.domain.WaterOrderProduct;
|
||||
|
||||
/**
|
||||
* 订单商品管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WaterOrderProductMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单商品管理
|
||||
*
|
||||
* @param id 订单商品管理主键
|
||||
* @return 订单商品管理
|
||||
*/
|
||||
public WaterOrderProduct selectWaterOrderProductById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单商品管理列表
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 订单商品管理集合
|
||||
*/
|
||||
public List<WaterOrderProduct> selectWaterOrderProductList(WaterOrderProduct waterOrderProduct);
|
||||
|
||||
/**
|
||||
* 新增订单商品管理
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterOrderProduct(WaterOrderProduct waterOrderProduct);
|
||||
|
||||
/**
|
||||
* 修改订单商品管理
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterOrderProduct(WaterOrderProduct waterOrderProduct);
|
||||
|
||||
/**
|
||||
* 删除订单商品管理
|
||||
*
|
||||
* @param id 订单商品管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterOrderProductById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单商品管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterOrderProductByIds(Long[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.order.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.order.domain.WaterServiceOrder;
|
||||
|
||||
/**
|
||||
* 服务订单管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WaterServiceOrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询服务订单管理
|
||||
*
|
||||
* @param orderId 服务订单管理主键
|
||||
* @return 服务订单管理
|
||||
*/
|
||||
public WaterServiceOrder selectWaterServiceOrderByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 查询服务订单管理列表
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 服务订单管理集合
|
||||
*/
|
||||
public List<WaterServiceOrder> selectWaterServiceOrderList(WaterServiceOrder waterServiceOrder);
|
||||
|
||||
/**
|
||||
* 新增服务订单管理
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterServiceOrder(WaterServiceOrder waterServiceOrder);
|
||||
|
||||
/**
|
||||
* 修改服务订单管理
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterServiceOrder(WaterServiceOrder waterServiceOrder);
|
||||
|
||||
/**
|
||||
* 删除服务订单管理
|
||||
*
|
||||
* @param orderId 服务订单管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterServiceOrderByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 批量删除服务订单管理
|
||||
*
|
||||
* @param orderIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterServiceOrderByOrderIds(Long[] orderIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.order.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.order.domain.WaterOrderProduct;
|
||||
|
||||
/**
|
||||
* 订单商品管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWaterOrderProductService
|
||||
{
|
||||
/**
|
||||
* 查询订单商品管理
|
||||
*
|
||||
* @param id 订单商品管理主键
|
||||
* @return 订单商品管理
|
||||
*/
|
||||
public WaterOrderProduct selectWaterOrderProductById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单商品管理列表
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 订单商品管理集合
|
||||
*/
|
||||
public List<WaterOrderProduct> selectWaterOrderProductList(WaterOrderProduct waterOrderProduct);
|
||||
|
||||
/**
|
||||
* 新增订单商品管理
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterOrderProduct(WaterOrderProduct waterOrderProduct);
|
||||
|
||||
/**
|
||||
* 修改订单商品管理
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterOrderProduct(WaterOrderProduct waterOrderProduct);
|
||||
|
||||
/**
|
||||
* 批量删除订单商品管理
|
||||
*
|
||||
* @param ids 需要删除的订单商品管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterOrderProductByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除订单商品管理信息
|
||||
*
|
||||
* @param id 订单商品管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterOrderProductById(Long id);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.order.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.order.domain.WaterServiceOrder;
|
||||
|
||||
/**
|
||||
* 服务订单管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWaterServiceOrderService
|
||||
{
|
||||
/**
|
||||
* 查询服务订单管理
|
||||
*
|
||||
* @param orderId 服务订单管理主键
|
||||
* @return 服务订单管理
|
||||
*/
|
||||
public WaterServiceOrder selectWaterServiceOrderByOrderId(Long orderId);
|
||||
|
||||
/**
|
||||
* 查询服务订单管理列表
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 服务订单管理集合
|
||||
*/
|
||||
public List<WaterServiceOrder> selectWaterServiceOrderList(WaterServiceOrder waterServiceOrder);
|
||||
|
||||
/**
|
||||
* 新增服务订单管理
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterServiceOrder(WaterServiceOrder waterServiceOrder);
|
||||
|
||||
/**
|
||||
* 修改服务订单管理
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterServiceOrder(WaterServiceOrder waterServiceOrder);
|
||||
|
||||
/**
|
||||
* 批量删除服务订单管理
|
||||
*
|
||||
* @param orderIds 需要删除的服务订单管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterServiceOrderByOrderIds(Long[] orderIds);
|
||||
|
||||
/**
|
||||
* 删除服务订单管理信息
|
||||
*
|
||||
* @param orderId 服务订单管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterServiceOrderByOrderId(Long orderId);
|
||||
}
|
||||
@ -0,0 +1,95 @@
|
||||
package com.ruoyi.water.order.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.water.order.mapper.WaterOrderProductMapper;
|
||||
import com.ruoyi.water.order.domain.WaterOrderProduct;
|
||||
import com.ruoyi.water.order.service.IWaterOrderProductService;
|
||||
|
||||
/**
|
||||
* 订单商品管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class WaterOrderProductServiceImpl implements IWaterOrderProductService
|
||||
{
|
||||
@Autowired
|
||||
private WaterOrderProductMapper waterOrderProductMapper;
|
||||
|
||||
/**
|
||||
* 查询订单商品管理
|
||||
*
|
||||
* @param id 订单商品管理主键
|
||||
* @return 订单商品管理
|
||||
*/
|
||||
@Override
|
||||
public WaterOrderProduct selectWaterOrderProductById(Long id)
|
||||
{
|
||||
return waterOrderProductMapper.selectWaterOrderProductById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单商品管理列表
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 订单商品管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterOrderProduct> selectWaterOrderProductList(WaterOrderProduct waterOrderProduct)
|
||||
{
|
||||
return waterOrderProductMapper.selectWaterOrderProductList(waterOrderProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单商品管理
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterOrderProduct(WaterOrderProduct waterOrderProduct)
|
||||
{
|
||||
waterOrderProduct.setCreateTime(DateUtils.getNowDate());
|
||||
return waterOrderProductMapper.insertWaterOrderProduct(waterOrderProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单商品管理
|
||||
*
|
||||
* @param waterOrderProduct 订单商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterOrderProduct(WaterOrderProduct waterOrderProduct)
|
||||
{
|
||||
return waterOrderProductMapper.updateWaterOrderProduct(waterOrderProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单商品管理
|
||||
*
|
||||
* @param ids 需要删除的订单商品管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterOrderProductByIds(Long[] ids)
|
||||
{
|
||||
return waterOrderProductMapper.deleteWaterOrderProductByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单商品管理信息
|
||||
*
|
||||
* @param id 订单商品管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterOrderProductById(Long id)
|
||||
{
|
||||
return waterOrderProductMapper.deleteWaterOrderProductById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.order.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.water.order.mapper.WaterServiceOrderMapper;
|
||||
import com.ruoyi.water.order.domain.WaterServiceOrder;
|
||||
import com.ruoyi.water.order.service.IWaterServiceOrderService;
|
||||
|
||||
/**
|
||||
* 服务订单管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class WaterServiceOrderServiceImpl implements IWaterServiceOrderService
|
||||
{
|
||||
@Autowired
|
||||
private WaterServiceOrderMapper waterServiceOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询服务订单管理
|
||||
*
|
||||
* @param orderId 服务订单管理主键
|
||||
* @return 服务订单管理
|
||||
*/
|
||||
@Override
|
||||
public WaterServiceOrder selectWaterServiceOrderByOrderId(Long orderId)
|
||||
{
|
||||
return waterServiceOrderMapper.selectWaterServiceOrderByOrderId(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询服务订单管理列表
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 服务订单管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterServiceOrder> selectWaterServiceOrderList(WaterServiceOrder waterServiceOrder)
|
||||
{
|
||||
return waterServiceOrderMapper.selectWaterServiceOrderList(waterServiceOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增服务订单管理
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterServiceOrder(WaterServiceOrder waterServiceOrder)
|
||||
{
|
||||
waterServiceOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return waterServiceOrderMapper.insertWaterServiceOrder(waterServiceOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改服务订单管理
|
||||
*
|
||||
* @param waterServiceOrder 服务订单管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterServiceOrder(WaterServiceOrder waterServiceOrder)
|
||||
{
|
||||
waterServiceOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterServiceOrderMapper.updateWaterServiceOrder(waterServiceOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除服务订单管理
|
||||
*
|
||||
* @param orderIds 需要删除的服务订单管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterServiceOrderByOrderIds(Long[] orderIds)
|
||||
{
|
||||
return waterServiceOrderMapper.deleteWaterServiceOrderByOrderIds(orderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除服务订单管理信息
|
||||
*
|
||||
* @param orderId 服务订单管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterServiceOrderByOrderId(Long orderId)
|
||||
{
|
||||
return waterServiceOrderMapper.deleteWaterServiceOrderByOrderId(orderId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.product.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.water.product.domain.WaterProduct;
|
||||
import com.ruoyi.water.product.service.IWaterProductService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/商品")
|
||||
public class WaterProductController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterProductService waterProductService;
|
||||
|
||||
/**
|
||||
* 查询商品管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:商品:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterProduct waterProduct)
|
||||
{
|
||||
startPage();
|
||||
List<WaterProduct> list = waterProductService.selectWaterProductList(waterProduct);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:商品:export')")
|
||||
@Log(title = "商品管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterProduct waterProduct)
|
||||
{
|
||||
List<WaterProduct> list = waterProductService.selectWaterProductList(waterProduct);
|
||||
ExcelUtil<WaterProduct> util = new ExcelUtil<WaterProduct>(WaterProduct.class);
|
||||
util.exportExcel(response, list, "商品管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:商品:query')")
|
||||
@GetMapping(value = "/{productId}")
|
||||
public AjaxResult getInfo(@PathVariable("productId") Long productId)
|
||||
{
|
||||
return success(waterProductService.selectWaterProductByProductId(productId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:商品:add')")
|
||||
@Log(title = "商品管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterProduct waterProduct)
|
||||
{
|
||||
return toAjax(waterProductService.insertWaterProduct(waterProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:商品:edit')")
|
||||
@Log(title = "商品管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterProduct waterProduct)
|
||||
{
|
||||
return toAjax(waterProductService.updateWaterProduct(waterProduct));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:商品:remove')")
|
||||
@Log(title = "商品管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{productIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] productIds)
|
||||
{
|
||||
return toAjax(waterProductService.deleteWaterProductByProductIds(productIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.product.domain.WaterProduct;
|
||||
|
||||
/**
|
||||
* 商品管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WaterProductMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品管理
|
||||
*
|
||||
* @param productId 商品管理主键
|
||||
* @return 商品管理
|
||||
*/
|
||||
public WaterProduct selectWaterProductByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 查询商品管理列表
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 商品管理集合
|
||||
*/
|
||||
public List<WaterProduct> selectWaterProductList(WaterProduct waterProduct);
|
||||
|
||||
/**
|
||||
* 新增商品管理
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterProduct(WaterProduct waterProduct);
|
||||
|
||||
/**
|
||||
* 修改商品管理
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterProduct(WaterProduct waterProduct);
|
||||
|
||||
/**
|
||||
* 删除商品管理
|
||||
*
|
||||
* @param productId 商品管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterProductByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 批量删除商品管理
|
||||
*
|
||||
* @param productIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterProductByProductIds(Long[] productIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.product.domain.WaterProduct;
|
||||
|
||||
/**
|
||||
* 商品管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWaterProductService
|
||||
{
|
||||
/**
|
||||
* 查询商品管理
|
||||
*
|
||||
* @param productId 商品管理主键
|
||||
* @return 商品管理
|
||||
*/
|
||||
public WaterProduct selectWaterProductByProductId(Long productId);
|
||||
|
||||
/**
|
||||
* 查询商品管理列表
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 商品管理集合
|
||||
*/
|
||||
public List<WaterProduct> selectWaterProductList(WaterProduct waterProduct);
|
||||
|
||||
/**
|
||||
* 新增商品管理
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterProduct(WaterProduct waterProduct);
|
||||
|
||||
/**
|
||||
* 修改商品管理
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterProduct(WaterProduct waterProduct);
|
||||
|
||||
/**
|
||||
* 批量删除商品管理
|
||||
*
|
||||
* @param productIds 需要删除的商品管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterProductByProductIds(Long[] productIds);
|
||||
|
||||
/**
|
||||
* 删除商品管理信息
|
||||
*
|
||||
* @param productId 商品管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterProductByProductId(Long productId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.product.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.water.product.mapper.WaterProductMapper;
|
||||
import com.ruoyi.water.product.domain.WaterProduct;
|
||||
import com.ruoyi.water.product.service.IWaterProductService;
|
||||
|
||||
/**
|
||||
* 商品管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class WaterProductServiceImpl implements IWaterProductService
|
||||
{
|
||||
@Autowired
|
||||
private WaterProductMapper waterProductMapper;
|
||||
|
||||
/**
|
||||
* 查询商品管理
|
||||
*
|
||||
* @param productId 商品管理主键
|
||||
* @return 商品管理
|
||||
*/
|
||||
@Override
|
||||
public WaterProduct selectWaterProductByProductId(Long productId)
|
||||
{
|
||||
return waterProductMapper.selectWaterProductByProductId(productId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品管理列表
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 商品管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterProduct> selectWaterProductList(WaterProduct waterProduct)
|
||||
{
|
||||
return waterProductMapper.selectWaterProductList(waterProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品管理
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterProduct(WaterProduct waterProduct)
|
||||
{
|
||||
waterProduct.setCreateTime(DateUtils.getNowDate());
|
||||
return waterProductMapper.insertWaterProduct(waterProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品管理
|
||||
*
|
||||
* @param waterProduct 商品管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterProduct(WaterProduct waterProduct)
|
||||
{
|
||||
waterProduct.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterProductMapper.updateWaterProduct(waterProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品管理
|
||||
*
|
||||
* @param productIds 需要删除的商品管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterProductByProductIds(Long[] productIds)
|
||||
{
|
||||
return waterProductMapper.deleteWaterProductByProductIds(productIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品管理信息
|
||||
*
|
||||
* @param productId 商品管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterProductByProductId(Long productId)
|
||||
{
|
||||
return waterProductMapper.deleteWaterProductByProductId(productId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.quality.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.water.quality.domain.WaterQuality;
|
||||
import com.ruoyi.water.quality.service.IWaterQualityService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 水质检测管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/水质检测")
|
||||
public class WaterQualityController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterQualityService waterQualityService;
|
||||
|
||||
/**
|
||||
* 查询水质检测管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:水质检测:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterQuality waterQuality)
|
||||
{
|
||||
startPage();
|
||||
List<WaterQuality> list = waterQualityService.selectWaterQualityList(waterQuality);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出水质检测管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:水质检测:export')")
|
||||
@Log(title = "水质检测管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterQuality waterQuality)
|
||||
{
|
||||
List<WaterQuality> list = waterQualityService.selectWaterQualityList(waterQuality);
|
||||
ExcelUtil<WaterQuality> util = new ExcelUtil<WaterQuality>(WaterQuality.class);
|
||||
util.exportExcel(response, list, "水质检测管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取水质检测管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:水质检测:query')")
|
||||
@GetMapping(value = "/{qualityId}")
|
||||
public AjaxResult getInfo(@PathVariable("qualityId") Long qualityId)
|
||||
{
|
||||
return success(waterQualityService.selectWaterQualityByQualityId(qualityId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水质检测管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:水质检测:add')")
|
||||
@Log(title = "水质检测管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterQuality waterQuality)
|
||||
{
|
||||
return toAjax(waterQualityService.insertWaterQuality(waterQuality));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水质检测管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:水质检测:edit')")
|
||||
@Log(title = "水质检测管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterQuality waterQuality)
|
||||
{
|
||||
return toAjax(waterQualityService.updateWaterQuality(waterQuality));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水质检测管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:水质检测:remove')")
|
||||
@Log(title = "水质检测管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{qualityIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] qualityIds)
|
||||
{
|
||||
return toAjax(waterQualityService.deleteWaterQualityByQualityIds(qualityIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.quality.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.quality.domain.WaterQuality;
|
||||
|
||||
/**
|
||||
* 水质检测管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface WaterQualityMapper
|
||||
{
|
||||
/**
|
||||
* 查询水质检测管理
|
||||
*
|
||||
* @param qualityId 水质检测管理主键
|
||||
* @return 水质检测管理
|
||||
*/
|
||||
public WaterQuality selectWaterQualityByQualityId(Long qualityId);
|
||||
|
||||
/**
|
||||
* 查询水质检测管理列表
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 水质检测管理集合
|
||||
*/
|
||||
public List<WaterQuality> selectWaterQualityList(WaterQuality waterQuality);
|
||||
|
||||
/**
|
||||
* 新增水质检测管理
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterQuality(WaterQuality waterQuality);
|
||||
|
||||
/**
|
||||
* 修改水质检测管理
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterQuality(WaterQuality waterQuality);
|
||||
|
||||
/**
|
||||
* 删除水质检测管理
|
||||
*
|
||||
* @param qualityId 水质检测管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterQualityByQualityId(Long qualityId);
|
||||
|
||||
/**
|
||||
* 批量删除水质检测管理
|
||||
*
|
||||
* @param qualityIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterQualityByQualityIds(Long[] qualityIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.quality.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.quality.domain.WaterQuality;
|
||||
|
||||
/**
|
||||
* 水质检测管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
public interface IWaterQualityService
|
||||
{
|
||||
/**
|
||||
* 查询水质检测管理
|
||||
*
|
||||
* @param qualityId 水质检测管理主键
|
||||
* @return 水质检测管理
|
||||
*/
|
||||
public WaterQuality selectWaterQualityByQualityId(Long qualityId);
|
||||
|
||||
/**
|
||||
* 查询水质检测管理列表
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 水质检测管理集合
|
||||
*/
|
||||
public List<WaterQuality> selectWaterQualityList(WaterQuality waterQuality);
|
||||
|
||||
/**
|
||||
* 新增水质检测管理
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterQuality(WaterQuality waterQuality);
|
||||
|
||||
/**
|
||||
* 修改水质检测管理
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterQuality(WaterQuality waterQuality);
|
||||
|
||||
/**
|
||||
* 批量删除水质检测管理
|
||||
*
|
||||
* @param qualityIds 需要删除的水质检测管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterQualityByQualityIds(Long[] qualityIds);
|
||||
|
||||
/**
|
||||
* 删除水质检测管理信息
|
||||
*
|
||||
* @param qualityId 水质检测管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterQualityByQualityId(Long qualityId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.quality.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.water.quality.mapper.WaterQualityMapper;
|
||||
import com.ruoyi.water.quality.domain.WaterQuality;
|
||||
import com.ruoyi.water.quality.service.IWaterQualityService;
|
||||
|
||||
/**
|
||||
* 水质检测管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-25
|
||||
*/
|
||||
@Service
|
||||
public class WaterQualityServiceImpl implements IWaterQualityService
|
||||
{
|
||||
@Autowired
|
||||
private WaterQualityMapper waterQualityMapper;
|
||||
|
||||
/**
|
||||
* 查询水质检测管理
|
||||
*
|
||||
* @param qualityId 水质检测管理主键
|
||||
* @return 水质检测管理
|
||||
*/
|
||||
@Override
|
||||
public WaterQuality selectWaterQualityByQualityId(Long qualityId)
|
||||
{
|
||||
return waterQualityMapper.selectWaterQualityByQualityId(qualityId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询水质检测管理列表
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 水质检测管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterQuality> selectWaterQualityList(WaterQuality waterQuality)
|
||||
{
|
||||
return waterQualityMapper.selectWaterQualityList(waterQuality);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增水质检测管理
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterQuality(WaterQuality waterQuality)
|
||||
{
|
||||
waterQuality.setCreateTime(DateUtils.getNowDate());
|
||||
return waterQualityMapper.insertWaterQuality(waterQuality);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改水质检测管理
|
||||
*
|
||||
* @param waterQuality 水质检测管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterQuality(WaterQuality waterQuality)
|
||||
{
|
||||
waterQuality.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterQualityMapper.updateWaterQuality(waterQuality);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除水质检测管理
|
||||
*
|
||||
* @param qualityIds 需要删除的水质检测管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterQualityByQualityIds(Long[] qualityIds)
|
||||
{
|
||||
return waterQualityMapper.deleteWaterQualityByQualityIds(qualityIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除水质检测管理信息
|
||||
*
|
||||
* @param qualityId 水质检测管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterQualityByQualityId(Long qualityId)
|
||||
{
|
||||
return waterQualityMapper.deleteWaterQualityByQualityId(qualityId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.staff.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.water.staff.domain.WaterStaff;
|
||||
import com.ruoyi.water.staff.service.IWaterStaffService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 员工管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/员工")
|
||||
public class WaterStaffController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterStaffService waterStaffService;
|
||||
|
||||
/**
|
||||
* 查询员工管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:员工:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterStaff waterStaff)
|
||||
{
|
||||
startPage();
|
||||
List<WaterStaff> list = waterStaffService.selectWaterStaffList(waterStaff);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出员工管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:员工:export')")
|
||||
@Log(title = "员工管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterStaff waterStaff)
|
||||
{
|
||||
List<WaterStaff> list = waterStaffService.selectWaterStaffList(waterStaff);
|
||||
ExcelUtil<WaterStaff> util = new ExcelUtil<WaterStaff>(WaterStaff.class);
|
||||
util.exportExcel(response, list, "员工管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取员工管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:员工:query')")
|
||||
@GetMapping(value = "/{staffId}")
|
||||
public AjaxResult getInfo(@PathVariable("staffId") Long staffId)
|
||||
{
|
||||
return success(waterStaffService.selectWaterStaffByStaffId(staffId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增员工管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:员工:add')")
|
||||
@Log(title = "员工管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterStaff waterStaff)
|
||||
{
|
||||
return toAjax(waterStaffService.insertWaterStaff(waterStaff));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改员工管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:员工:edit')")
|
||||
@Log(title = "员工管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterStaff waterStaff)
|
||||
{
|
||||
return toAjax(waterStaffService.updateWaterStaff(waterStaff));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除员工管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:员工:remove')")
|
||||
@Log(title = "员工管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{staffIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] staffIds)
|
||||
{
|
||||
return toAjax(waterStaffService.deleteWaterStaffByStaffIds(staffIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.staff.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.staff.domain.WaterStaff;
|
||||
|
||||
/**
|
||||
* 员工管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface WaterStaffMapper
|
||||
{
|
||||
/**
|
||||
* 查询员工管理
|
||||
*
|
||||
* @param staffId 员工管理主键
|
||||
* @return 员工管理
|
||||
*/
|
||||
public WaterStaff selectWaterStaffByStaffId(Long staffId);
|
||||
|
||||
/**
|
||||
* 查询员工管理列表
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 员工管理集合
|
||||
*/
|
||||
public List<WaterStaff> selectWaterStaffList(WaterStaff waterStaff);
|
||||
|
||||
/**
|
||||
* 新增员工管理
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterStaff(WaterStaff waterStaff);
|
||||
|
||||
/**
|
||||
* 修改员工管理
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterStaff(WaterStaff waterStaff);
|
||||
|
||||
/**
|
||||
* 删除员工管理
|
||||
*
|
||||
* @param staffId 员工管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterStaffByStaffId(Long staffId);
|
||||
|
||||
/**
|
||||
* 批量删除员工管理
|
||||
*
|
||||
* @param staffIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterStaffByStaffIds(Long[] staffIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.staff.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.staff.domain.WaterStaff;
|
||||
|
||||
/**
|
||||
* 员工管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface IWaterStaffService
|
||||
{
|
||||
/**
|
||||
* 查询员工管理
|
||||
*
|
||||
* @param staffId 员工管理主键
|
||||
* @return 员工管理
|
||||
*/
|
||||
public WaterStaff selectWaterStaffByStaffId(Long staffId);
|
||||
|
||||
/**
|
||||
* 查询员工管理列表
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 员工管理集合
|
||||
*/
|
||||
public List<WaterStaff> selectWaterStaffList(WaterStaff waterStaff);
|
||||
|
||||
/**
|
||||
* 新增员工管理
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterStaff(WaterStaff waterStaff);
|
||||
|
||||
/**
|
||||
* 修改员工管理
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterStaff(WaterStaff waterStaff);
|
||||
|
||||
/**
|
||||
* 批量删除员工管理
|
||||
*
|
||||
* @param staffIds 需要删除的员工管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterStaffByStaffIds(Long[] staffIds);
|
||||
|
||||
/**
|
||||
* 删除员工管理信息
|
||||
*
|
||||
* @param staffId 员工管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterStaffByStaffId(Long staffId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.staff.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.water.staff.mapper.WaterStaffMapper;
|
||||
import com.ruoyi.water.staff.domain.WaterStaff;
|
||||
import com.ruoyi.water.staff.service.IWaterStaffService;
|
||||
|
||||
/**
|
||||
* 员工管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@Service
|
||||
public class WaterStaffServiceImpl implements IWaterStaffService
|
||||
{
|
||||
@Autowired
|
||||
private WaterStaffMapper waterStaffMapper;
|
||||
|
||||
/**
|
||||
* 查询员工管理
|
||||
*
|
||||
* @param staffId 员工管理主键
|
||||
* @return 员工管理
|
||||
*/
|
||||
@Override
|
||||
public WaterStaff selectWaterStaffByStaffId(Long staffId)
|
||||
{
|
||||
return waterStaffMapper.selectWaterStaffByStaffId(staffId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询员工管理列表
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 员工管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterStaff> selectWaterStaffList(WaterStaff waterStaff)
|
||||
{
|
||||
return waterStaffMapper.selectWaterStaffList(waterStaff);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增员工管理
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterStaff(WaterStaff waterStaff)
|
||||
{
|
||||
waterStaff.setCreateTime(DateUtils.getNowDate());
|
||||
return waterStaffMapper.insertWaterStaff(waterStaff);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改员工管理
|
||||
*
|
||||
* @param waterStaff 员工管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterStaff(WaterStaff waterStaff)
|
||||
{
|
||||
waterStaff.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterStaffMapper.updateWaterStaff(waterStaff);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除员工管理
|
||||
*
|
||||
* @param staffIds 需要删除的员工管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterStaffByStaffIds(Long[] staffIds)
|
||||
{
|
||||
return waterStaffMapper.deleteWaterStaffByStaffIds(staffIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除员工管理信息
|
||||
*
|
||||
* @param staffId 员工管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterStaffByStaffId(Long staffId)
|
||||
{
|
||||
return waterStaffMapper.deleteWaterStaffByStaffId(staffId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.water.user.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.water.user.domain.WaterUser;
|
||||
import com.ruoyi.water.user.service.IWaterUserService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 用户管理Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/water/用户")
|
||||
public class WaterUserController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IWaterUserService waterUserService;
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:用户:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WaterUser waterUser)
|
||||
{
|
||||
startPage();
|
||||
List<WaterUser> list = waterUserService.selectWaterUserList(waterUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:用户:export')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, WaterUser waterUser)
|
||||
{
|
||||
List<WaterUser> list = waterUserService.selectWaterUserList(waterUser);
|
||||
ExcelUtil<WaterUser> util = new ExcelUtil<WaterUser>(WaterUser.class);
|
||||
util.exportExcel(response, list, "用户管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:用户:query')")
|
||||
@GetMapping(value = "/{userId}")
|
||||
public AjaxResult getInfo(@PathVariable("userId") Long userId)
|
||||
{
|
||||
return success(waterUserService.selectWaterUserByUserId(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:用户:add')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WaterUser waterUser)
|
||||
{
|
||||
return toAjax(waterUserService.insertWaterUser(waterUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:用户:edit')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody WaterUser waterUser)
|
||||
{
|
||||
return toAjax(waterUserService.updateWaterUser(waterUser));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('water:用户:remove')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{userIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] userIds)
|
||||
{
|
||||
return toAjax(waterUserService.deleteWaterUserByUserIds(userIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.user.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.user.domain.WaterUser;
|
||||
|
||||
/**
|
||||
* 用户管理Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface WaterUserMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户管理
|
||||
*
|
||||
* @param userId 用户管理主键
|
||||
* @return 用户管理
|
||||
*/
|
||||
public WaterUser selectWaterUserByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 用户管理集合
|
||||
*/
|
||||
public List<WaterUser> selectWaterUserList(WaterUser waterUser);
|
||||
|
||||
/**
|
||||
* 新增用户管理
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterUser(WaterUser waterUser);
|
||||
|
||||
/**
|
||||
* 修改用户管理
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterUser(WaterUser waterUser);
|
||||
|
||||
/**
|
||||
* 删除用户管理
|
||||
*
|
||||
* @param userId 用户管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterUserByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 批量删除用户管理
|
||||
*
|
||||
* @param userIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterUserByUserIds(Long[] userIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.water.user.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.water.user.domain.WaterUser;
|
||||
|
||||
/**
|
||||
* 用户管理Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
public interface IWaterUserService
|
||||
{
|
||||
/**
|
||||
* 查询用户管理
|
||||
*
|
||||
* @param userId 用户管理主键
|
||||
* @return 用户管理
|
||||
*/
|
||||
public WaterUser selectWaterUserByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 用户管理集合
|
||||
*/
|
||||
public List<WaterUser> selectWaterUserList(WaterUser waterUser);
|
||||
|
||||
/**
|
||||
* 新增用户管理
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertWaterUser(WaterUser waterUser);
|
||||
|
||||
/**
|
||||
* 修改用户管理
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateWaterUser(WaterUser waterUser);
|
||||
|
||||
/**
|
||||
* 批量删除用户管理
|
||||
*
|
||||
* @param userIds 需要删除的用户管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterUserByUserIds(Long[] userIds);
|
||||
|
||||
/**
|
||||
* 删除用户管理信息
|
||||
*
|
||||
* @param userId 用户管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteWaterUserByUserId(Long userId);
|
||||
}
|
||||
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.water.user.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.water.user.mapper.WaterUserMapper;
|
||||
import com.ruoyi.water.user.domain.WaterUser;
|
||||
import com.ruoyi.water.user.service.IWaterUserService;
|
||||
|
||||
/**
|
||||
* 用户管理Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-11-24
|
||||
*/
|
||||
@Service
|
||||
public class WaterUserServiceImpl implements IWaterUserService
|
||||
{
|
||||
@Autowired
|
||||
private WaterUserMapper waterUserMapper;
|
||||
|
||||
/**
|
||||
* 查询用户管理
|
||||
*
|
||||
* @param userId 用户管理主键
|
||||
* @return 用户管理
|
||||
*/
|
||||
@Override
|
||||
public WaterUser selectWaterUserByUserId(Long userId)
|
||||
{
|
||||
return waterUserMapper.selectWaterUserByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 用户管理
|
||||
*/
|
||||
@Override
|
||||
public List<WaterUser> selectWaterUserList(WaterUser waterUser)
|
||||
{
|
||||
return waterUserMapper.selectWaterUserList(waterUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户管理
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertWaterUser(WaterUser waterUser)
|
||||
{
|
||||
waterUser.setCreateTime(DateUtils.getNowDate());
|
||||
return waterUserMapper.insertWaterUser(waterUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户管理
|
||||
*
|
||||
* @param waterUser 用户管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateWaterUser(WaterUser waterUser)
|
||||
{
|
||||
waterUser.setUpdateTime(DateUtils.getNowDate());
|
||||
return waterUserMapper.updateWaterUser(waterUser);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户管理
|
||||
*
|
||||
* @param userIds 需要删除的用户管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterUserByUserIds(Long[] userIds)
|
||||
{
|
||||
return waterUserMapper.deleteWaterUserByUserIds(userIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户管理信息
|
||||
*
|
||||
* @param userId 用户管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteWaterUserByUserId(Long userId)
|
||||
{
|
||||
return waterUserMapper.deleteWaterUserByUserId(userId);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,94 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,121 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,69 @@
|
||||
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.system.domain.SysOperLog;
|
||||
import com.ruoyi.system.service.ISysOperLogService;
|
||||
|
||||
/**
|
||||
* 操作日志记录
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitor/operlog")
|
||||
public class SysOperlogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysOperLogService operLogService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysOperLog operLog)
|
||||
{
|
||||
startPage();
|
||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysOperLog operLog)
|
||||
{
|
||||
List<SysOperLog> list = operLogService.selectOperLogList(operLog);
|
||||
ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
|
||||
util.exportExcel(response, list, "操作日志");
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.DELETE)
|
||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
|
||||
@DeleteMapping("/{operIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] operIds)
|
||||
{
|
||||
return toAjax(operLogService.deleteOperLogByIds(operIds));
|
||||
}
|
||||
|
||||
@Log(title = "操作日志", businessType = BusinessType.CLEAN)
|
||||
@PreAuthorize("@ss.hasPermi('monitor:operlog:remove')")
|
||||
@DeleteMapping("/clean")
|
||||
public AjaxResult clean()
|
||||
{
|
||||
operLogService.cleanOperLog();
|
||||
return success();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.ruoyi.web.controller.monitor;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
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.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysUserOnline;
|
||||
import com.ruoyi.system.service.ISysUserOnlineService;
|
||||
|
||||
/**
|
||||
* 在线用户监控
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/monitor/online")
|
||||
public class SysUserOnlineController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysUserOnlineService userOnlineService;
|
||||
|
||||
@Autowired
|
||||
private RedisCache redisCache;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('monitor:online:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(String ipaddr, String userName)
|
||||
{
|
||||
Collection<String> keys = redisCache.keys(CacheConstants.LOGIN_TOKEN_KEY + "*");
|
||||
List<SysUserOnline> userOnlineList = new ArrayList<SysUserOnline>();
|
||||
for (String key : keys)
|
||||
{
|
||||
LoginUser user = redisCache.getCacheObject(key);
|
||||
if (StringUtils.isNotEmpty(ipaddr) && StringUtils.isNotEmpty(userName))
|
||||
{
|
||||
userOnlineList.add(userOnlineService.selectOnlineByInfo(ipaddr, userName, user));
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(ipaddr))
|
||||
{
|
||||
userOnlineList.add(userOnlineService.selectOnlineByIpaddr(ipaddr, user));
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(userName) && StringUtils.isNotNull(user.getUser()))
|
||||
{
|
||||
userOnlineList.add(userOnlineService.selectOnlineByUserName(userName, user));
|
||||
}
|
||||
else
|
||||
{
|
||||
userOnlineList.add(userOnlineService.loginUserToUserOnline(user));
|
||||
}
|
||||
}
|
||||
Collections.reverse(userOnlineList);
|
||||
userOnlineList.removeAll(Collections.singleton(null));
|
||||
return getDataTable(userOnlineList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 强退用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('monitor:online:forceLogout')")
|
||||
@Log(title = "在线用户", businessType = BusinessType.FORCE)
|
||||
@DeleteMapping("/{tokenId}")
|
||||
public AjaxResult forceLogout(@PathVariable String tokenId)
|
||||
{
|
||||
redisCache.deleteObject(CacheConstants.LOGIN_TOKEN_KEY + tokenId);
|
||||
return success();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,133 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
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.validation.annotation.Validated;
|
||||
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.PutMapping;
|
||||
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.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.SysConfig;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
||||
/**
|
||||
* 参数配置 信息操作处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/config")
|
||||
public class SysConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
|
||||
/**
|
||||
* 获取参数配置列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:config:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysConfig config)
|
||||
{
|
||||
startPage();
|
||||
List<SysConfig> list = configService.selectConfigList(config);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "参数管理", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:config:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysConfig config)
|
||||
{
|
||||
List<SysConfig> list = configService.selectConfigList(config);
|
||||
ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
|
||||
util.exportExcel(response, list, "参数数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数编号获取详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:config:query')")
|
||||
@GetMapping(value = "/{configId}")
|
||||
public AjaxResult getInfo(@PathVariable Long configId)
|
||||
{
|
||||
return success(configService.selectConfigById(configId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据参数键名查询参数值
|
||||
*/
|
||||
@GetMapping(value = "/configKey/{configKey}")
|
||||
public AjaxResult getConfigKey(@PathVariable String configKey)
|
||||
{
|
||||
return success(configService.selectConfigByKey(configKey));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增参数配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:config:add')")
|
||||
@Log(title = "参数管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysConfig config)
|
||||
{
|
||||
if (!configService.checkConfigKeyUnique(config))
|
||||
{
|
||||
return error("新增参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
||||
}
|
||||
config.setCreateBy(getUsername());
|
||||
return toAjax(configService.insertConfig(config));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参数配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:config:edit')")
|
||||
@Log(title = "参数管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysConfig config)
|
||||
{
|
||||
if (!configService.checkConfigKeyUnique(config))
|
||||
{
|
||||
return error("修改参数'" + config.getConfigName() + "'失败,参数键名已存在");
|
||||
}
|
||||
config.setUpdateBy(getUsername());
|
||||
return toAjax(configService.updateConfig(config));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除参数配置
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:config:remove')")
|
||||
@Log(title = "参数管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{configIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] configIds)
|
||||
{
|
||||
configService.deleteConfigByIds(configIds);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新参数缓存
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:config:remove')")
|
||||
@Log(title = "参数管理", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/refreshCache")
|
||||
public AjaxResult refreshCache()
|
||||
{
|
||||
configService.resetConfigCache();
|
||||
return success();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,121 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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.validation.annotation.Validated;
|
||||
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.PutMapping;
|
||||
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.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.service.ISysDictDataService;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
|
||||
/**
|
||||
* 数据字典信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/dict/data")
|
||||
public class SysDictDataController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysDictDataService dictDataService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictTypeService dictTypeService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysDictData dictData)
|
||||
{
|
||||
startPage();
|
||||
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典数据", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysDictData dictData)
|
||||
{
|
||||
List<SysDictData> list = dictDataService.selectDictDataList(dictData);
|
||||
ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
|
||||
util.exportExcel(response, list, "字典数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典数据详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
||||
@GetMapping(value = "/{dictCode}")
|
||||
public AjaxResult getInfo(@PathVariable Long dictCode)
|
||||
{
|
||||
return success(dictDataService.selectDictDataById(dictCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据字典类型查询字典数据信息
|
||||
*/
|
||||
@GetMapping(value = "/type/{dictType}")
|
||||
public AjaxResult dictType(@PathVariable String dictType)
|
||||
{
|
||||
List<SysDictData> data = dictTypeService.selectDictDataByType(dictType);
|
||||
if (StringUtils.isNull(data))
|
||||
{
|
||||
data = new ArrayList<SysDictData>();
|
||||
}
|
||||
return success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
||||
@Log(title = "字典数据", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDictData dict)
|
||||
{
|
||||
dict.setCreateBy(getUsername());
|
||||
return toAjax(dictDataService.insertDictData(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
||||
@Log(title = "字典数据", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDictData dict)
|
||||
{
|
||||
dict.setUpdateBy(getUsername());
|
||||
return toAjax(dictDataService.updateDictData(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictCodes}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictCodes)
|
||||
{
|
||||
dictDataService.deleteDictDataByIds(dictCodes);
|
||||
return success();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
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.validation.annotation.Validated;
|
||||
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.PutMapping;
|
||||
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.core.domain.entity.SysDictType;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.service.ISysDictTypeService;
|
||||
|
||||
/**
|
||||
* 数据字典信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/dict/type")
|
||||
public class SysDictTypeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysDictTypeService dictTypeService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysDictType dictType)
|
||||
{
|
||||
startPage();
|
||||
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "字典类型", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysDictType dictType)
|
||||
{
|
||||
List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
|
||||
ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
|
||||
util.exportExcel(response, list, "字典类型");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询字典类型详细
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:query')")
|
||||
@GetMapping(value = "/{dictId}")
|
||||
public AjaxResult getInfo(@PathVariable Long dictId)
|
||||
{
|
||||
return success(dictTypeService.selectDictTypeById(dictId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:add')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysDictType dict)
|
||||
{
|
||||
if (!dictTypeService.checkDictTypeUnique(dict))
|
||||
{
|
||||
return error("新增字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||
}
|
||||
dict.setCreateBy(getUsername());
|
||||
return toAjax(dictTypeService.insertDictType(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:edit')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysDictType dict)
|
||||
{
|
||||
if (!dictTypeService.checkDictTypeUnique(dict))
|
||||
{
|
||||
return error("修改字典'" + dict.getDictName() + "'失败,字典类型已存在");
|
||||
}
|
||||
dict.setUpdateBy(getUsername());
|
||||
return toAjax(dictTypeService.updateDictType(dict));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除字典类型
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dictIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] dictIds)
|
||||
{
|
||||
dictTypeService.deleteDictTypeByIds(dictIds);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 刷新字典缓存
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:dict:remove')")
|
||||
@Log(title = "字典类型", businessType = BusinessType.CLEAN)
|
||||
@DeleteMapping("/refreshCache")
|
||||
public AjaxResult refreshCache()
|
||||
{
|
||||
dictTypeService.resetDictCache();
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字典选择框列表
|
||||
*/
|
||||
@GetMapping("/optionselect")
|
||||
public AjaxResult optionselect()
|
||||
{
|
||||
List<SysDictType> dictTypes = dictTypeService.selectDictTypeAll();
|
||||
return success(dictTypes);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,131 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
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.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.web.service.SysLoginService;
|
||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
import com.ruoyi.system.service.ISysMenuService;
|
||||
|
||||
/**
|
||||
* 登录验证
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
public class SysLoginController
|
||||
{
|
||||
@Autowired
|
||||
private SysLoginService loginService;
|
||||
|
||||
@Autowired
|
||||
private ISysMenuService menuService;
|
||||
|
||||
@Autowired
|
||||
private SysPermissionService permissionService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
|
||||
/**
|
||||
* 登录方法
|
||||
*
|
||||
* @param loginBody 登录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/login")
|
||||
public AjaxResult login(@RequestBody LoginBody loginBody)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
// 生成令牌
|
||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
||||
loginBody.getUuid());
|
||||
ajax.put(Constants.TOKEN, token);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
* @return 用户信息
|
||||
*/
|
||||
@GetMapping("getInfo")
|
||||
public AjaxResult getInfo()
|
||||
{
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
SysUser user = loginUser.getUser();
|
||||
// 角色集合
|
||||
Set<String> roles = permissionService.getRolePermission(user);
|
||||
// 权限集合
|
||||
Set<String> permissions = permissionService.getMenuPermission(user);
|
||||
if (!loginUser.getPermissions().equals(permissions))
|
||||
{
|
||||
loginUser.setPermissions(permissions);
|
||||
tokenService.refreshToken(loginUser);
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("user", user);
|
||||
ajax.put("roles", roles);
|
||||
ajax.put("permissions", permissions);
|
||||
ajax.put("isDefaultModifyPwd", initPasswordIsModify(user.getPwdUpdateDate()));
|
||||
ajax.put("isPasswordExpired", passwordIsExpiration(user.getPwdUpdateDate()));
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取路由信息
|
||||
*
|
||||
* @return 路由信息
|
||||
*/
|
||||
@GetMapping("getRouters")
|
||||
public AjaxResult getRouters()
|
||||
{
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
List<SysMenu> menus = menuService.selectMenuTreeByUserId(userId);
|
||||
return AjaxResult.success(menuService.buildMenus(menus));
|
||||
}
|
||||
|
||||
// 检查初始密码是否提醒修改
|
||||
public boolean initPasswordIsModify(Date pwdUpdateDate)
|
||||
{
|
||||
Integer initPasswordModify = Convert.toInt(configService.selectConfigByKey("sys.account.initPasswordModify"));
|
||||
return initPasswordModify != null && initPasswordModify == 1 && pwdUpdateDate == null;
|
||||
}
|
||||
|
||||
// 检查密码是否过期
|
||||
public boolean passwordIsExpiration(Date pwdUpdateDate)
|
||||
{
|
||||
Integer passwordValidateDays = Convert.toInt(configService.selectConfigByKey("sys.account.passwordValidateDays"));
|
||||
if (passwordValidateDays != null && passwordValidateDays > 0)
|
||||
{
|
||||
if (StringUtils.isNull(pwdUpdateDate))
|
||||
{
|
||||
// 如果从未修改过初始密码,直接提醒过期
|
||||
return true;
|
||||
}
|
||||
Date nowDate = DateUtils.getNowDate();
|
||||
return DateUtils.differentDaysByMillisecond(nowDate, pwdUpdateDate) > passwordValidateDays;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,91 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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.PutMapping;
|
||||
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.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.system.domain.SysNotice;
|
||||
import com.ruoyi.system.service.ISysNoticeService;
|
||||
|
||||
/**
|
||||
* 公告 信息操作处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/notice")
|
||||
public class SysNoticeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysNoticeService noticeService;
|
||||
|
||||
/**
|
||||
* 获取通知公告列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysNotice notice)
|
||||
{
|
||||
startPage();
|
||||
List<SysNotice> list = noticeService.selectNoticeList(notice);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据通知公告编号获取详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:query')")
|
||||
@GetMapping(value = "/{noticeId}")
|
||||
public AjaxResult getInfo(@PathVariable Long noticeId)
|
||||
{
|
||||
return success(noticeService.selectNoticeById(noticeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增通知公告
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:add')")
|
||||
@Log(title = "通知公告", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysNotice notice)
|
||||
{
|
||||
notice.setCreateBy(getUsername());
|
||||
return toAjax(noticeService.insertNotice(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改通知公告
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:edit')")
|
||||
@Log(title = "通知公告", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysNotice notice)
|
||||
{
|
||||
notice.setUpdateBy(getUsername());
|
||||
return toAjax(noticeService.updateNotice(notice));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除通知公告
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:notice:remove')")
|
||||
@Log(title = "通知公告", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{noticeIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] noticeIds)
|
||||
{
|
||||
return toAjax(noticeService.deleteNoticeByIds(noticeIds));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,129 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
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.validation.annotation.Validated;
|
||||
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.PutMapping;
|
||||
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.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.domain.SysPost;
|
||||
import com.ruoyi.system.service.ISysPostService;
|
||||
|
||||
/**
|
||||
* 岗位信息操作处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/post")
|
||||
public class SysPostController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysPostService postService;
|
||||
|
||||
/**
|
||||
* 获取岗位列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:post:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysPost post)
|
||||
{
|
||||
startPage();
|
||||
List<SysPost> list = postService.selectPostList(post);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "岗位管理", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:post:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysPost post)
|
||||
{
|
||||
List<SysPost> list = postService.selectPostList(post);
|
||||
ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
|
||||
util.exportExcel(response, list, "岗位数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据岗位编号获取详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:post:query')")
|
||||
@GetMapping(value = "/{postId}")
|
||||
public AjaxResult getInfo(@PathVariable Long postId)
|
||||
{
|
||||
return success(postService.selectPostById(postId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增岗位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:post:add')")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysPost post)
|
||||
{
|
||||
if (!postService.checkPostNameUnique(post))
|
||||
{
|
||||
return error("新增岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
||||
}
|
||||
else if (!postService.checkPostCodeUnique(post))
|
||||
{
|
||||
return error("新增岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
||||
}
|
||||
post.setCreateBy(getUsername());
|
||||
return toAjax(postService.insertPost(post));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改岗位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:post:edit')")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysPost post)
|
||||
{
|
||||
if (!postService.checkPostNameUnique(post))
|
||||
{
|
||||
return error("修改岗位'" + post.getPostName() + "'失败,岗位名称已存在");
|
||||
}
|
||||
else if (!postService.checkPostCodeUnique(post))
|
||||
{
|
||||
return error("修改岗位'" + post.getPostName() + "'失败,岗位编码已存在");
|
||||
}
|
||||
post.setUpdateBy(getUsername());
|
||||
return toAjax(postService.updatePost(post));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除岗位
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:post:remove')")
|
||||
@Log(title = "岗位管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{postIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] postIds)
|
||||
{
|
||||
return toAjax(postService.deletePostByIds(postIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取岗位选择框列表
|
||||
*/
|
||||
@GetMapping("/optionselect")
|
||||
public AjaxResult optionselect()
|
||||
{
|
||||
List<SysPost> posts = postService.selectPostAll();
|
||||
return success(posts);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,148 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.Map;
|
||||
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.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.common.utils.file.FileUtils;
|
||||
import com.ruoyi.common.utils.file.MimeTypeUtils;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
* 个人信息 业务处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/user/profile")
|
||||
public class SysProfileController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
/**
|
||||
* 个人信息
|
||||
*/
|
||||
@GetMapping
|
||||
public AjaxResult profile()
|
||||
{
|
||||
LoginUser loginUser = getLoginUser();
|
||||
SysUser user = loginUser.getUser();
|
||||
AjaxResult ajax = AjaxResult.success(user);
|
||||
ajax.put("roleGroup", userService.selectUserRoleGroup(loginUser.getUsername()));
|
||||
ajax.put("postGroup", userService.selectUserPostGroup(loginUser.getUsername()));
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult updateProfile(@RequestBody SysUser user)
|
||||
{
|
||||
LoginUser loginUser = getLoginUser();
|
||||
SysUser currentUser = loginUser.getUser();
|
||||
currentUser.setNickName(user.getNickName());
|
||||
currentUser.setEmail(user.getEmail());
|
||||
currentUser.setPhonenumber(user.getPhonenumber());
|
||||
currentUser.setSex(user.getSex());
|
||||
if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(currentUser))
|
||||
{
|
||||
return error("修改用户'" + loginUser.getUsername() + "'失败,手机号码已存在");
|
||||
}
|
||||
if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(currentUser))
|
||||
{
|
||||
return error("修改用户'" + loginUser.getUsername() + "'失败,邮箱账号已存在");
|
||||
}
|
||||
if (userService.updateUserProfile(currentUser) > 0)
|
||||
{
|
||||
// 更新缓存用户信息
|
||||
tokenService.setLoginUser(loginUser);
|
||||
return success();
|
||||
}
|
||||
return error("修改个人信息异常,请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updatePwd")
|
||||
public AjaxResult updatePwd(@RequestBody Map<String, String> params)
|
||||
{
|
||||
String oldPassword = params.get("oldPassword");
|
||||
String newPassword = params.get("newPassword");
|
||||
LoginUser loginUser = getLoginUser();
|
||||
Long userId = loginUser.getUserId();
|
||||
String password = loginUser.getPassword();
|
||||
if (!SecurityUtils.matchesPassword(oldPassword, password))
|
||||
{
|
||||
return error("修改密码失败,旧密码错误");
|
||||
}
|
||||
if (SecurityUtils.matchesPassword(newPassword, password))
|
||||
{
|
||||
return error("新密码不能与旧密码相同");
|
||||
}
|
||||
newPassword = SecurityUtils.encryptPassword(newPassword);
|
||||
if (userService.resetUserPwd(userId, newPassword) > 0)
|
||||
{
|
||||
// 更新缓存用户密码&密码最后更新时间
|
||||
loginUser.getUser().setPwdUpdateDate(DateUtils.getNowDate());
|
||||
loginUser.getUser().setPassword(newPassword);
|
||||
tokenService.setLoginUser(loginUser);
|
||||
return success();
|
||||
}
|
||||
return error("修改密码异常,请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 头像上传
|
||||
*/
|
||||
@Log(title = "用户头像", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/avatar")
|
||||
public AjaxResult avatar(@RequestParam("avatarfile") MultipartFile file) throws Exception
|
||||
{
|
||||
if (!file.isEmpty())
|
||||
{
|
||||
LoginUser loginUser = getLoginUser();
|
||||
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file, MimeTypeUtils.IMAGE_EXTENSION, true);
|
||||
if (userService.updateUserAvatar(loginUser.getUserId(), avatar))
|
||||
{
|
||||
String oldAvatar = loginUser.getUser().getAvatar();
|
||||
if (StringUtils.isNotEmpty(oldAvatar))
|
||||
{
|
||||
FileUtils.deleteFile(RuoYiConfig.getProfile() + FileUtils.stripPrefix(oldAvatar));
|
||||
}
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("imgUrl", avatar);
|
||||
// 更新缓存用户头像
|
||||
loginUser.getUser().setAvatar(avatar);
|
||||
tokenService.setLoginUser(loginUser);
|
||||
return ajax;
|
||||
}
|
||||
}
|
||||
return error("上传图片异常,请联系管理员");
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.model.RegisterBody;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.framework.web.service.SysRegisterService;
|
||||
import com.ruoyi.system.service.ISysConfigService;
|
||||
|
||||
/**
|
||||
* 注册验证
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
public class SysRegisterController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private SysRegisterService registerService;
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
|
||||
@PostMapping("/register")
|
||||
public AjaxResult register(@RequestBody RegisterBody user)
|
||||
{
|
||||
if (!("true".equals(configService.selectConfigByKey("sys.account.registerUser"))))
|
||||
{
|
||||
return error("当前系统没有开启注册功能!");
|
||||
}
|
||||
String msg = registerService.register(user);
|
||||
return StringUtils.isEmpty(msg) ? success() : error(msg);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,262 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
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.validation.annotation.Validated;
|
||||
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.PutMapping;
|
||||
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.core.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
import com.ruoyi.system.domain.SysUserRole;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
* 角色信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/role")
|
||||
public class SysRoleController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysRoleService roleService;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Autowired
|
||||
private SysPermissionService permissionService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysRole role)
|
||||
{
|
||||
startPage();
|
||||
List<SysRole> list = roleService.selectRoleList(role);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "角色管理", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:role:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysRole role)
|
||||
{
|
||||
List<SysRole> list = roleService.selectRoleList(role);
|
||||
ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
|
||||
util.exportExcel(response, list, "角色数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据角色编号获取详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
||||
@GetMapping(value = "/{roleId}")
|
||||
public AjaxResult getInfo(@PathVariable Long roleId)
|
||||
{
|
||||
roleService.checkRoleDataScope(roleId);
|
||||
return success(roleService.selectRoleById(roleId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增角色
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:add')")
|
||||
@Log(title = "角色管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysRole role)
|
||||
{
|
||||
if (!roleService.checkRoleNameUnique(role))
|
||||
{
|
||||
return error("新增角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
||||
}
|
||||
else if (!roleService.checkRoleKeyUnique(role))
|
||||
{
|
||||
return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||
}
|
||||
role.setCreateBy(getUsername());
|
||||
return toAjax(roleService.insertRole(role));
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存角色
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysRole role)
|
||||
{
|
||||
roleService.checkRoleAllowed(role);
|
||||
roleService.checkRoleDataScope(role.getRoleId());
|
||||
if (!roleService.checkRoleNameUnique(role))
|
||||
{
|
||||
return error("修改角色'" + role.getRoleName() + "'失败,角色名称已存在");
|
||||
}
|
||||
else if (!roleService.checkRoleKeyUnique(role))
|
||||
{
|
||||
return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在");
|
||||
}
|
||||
role.setUpdateBy(getUsername());
|
||||
|
||||
if (roleService.updateRole(role) > 0)
|
||||
{
|
||||
// 更新缓存用户权限
|
||||
LoginUser loginUser = getLoginUser();
|
||||
if (StringUtils.isNotNull(loginUser.getUser()) && !loginUser.getUser().isAdmin())
|
||||
{
|
||||
loginUser.setUser(userService.selectUserByUserName(loginUser.getUser().getUserName()));
|
||||
loginUser.setPermissions(permissionService.getMenuPermission(loginUser.getUser()));
|
||||
tokenService.setLoginUser(loginUser);
|
||||
}
|
||||
return success();
|
||||
}
|
||||
return error("修改角色'" + role.getRoleName() + "'失败,请联系管理员");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存数据权限
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/dataScope")
|
||||
public AjaxResult dataScope(@RequestBody SysRole role)
|
||||
{
|
||||
roleService.checkRoleAllowed(role);
|
||||
roleService.checkRoleDataScope(role.getRoleId());
|
||||
return toAjax(roleService.authDataScope(role));
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态修改
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
||||
@Log(title = "角色管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysRole role)
|
||||
{
|
||||
roleService.checkRoleAllowed(role);
|
||||
roleService.checkRoleDataScope(role.getRoleId());
|
||||
role.setUpdateBy(getUsername());
|
||||
return toAjax(roleService.updateRoleStatus(role));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除角色
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:remove')")
|
||||
@Log(title = "角色管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{roleIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] roleIds)
|
||||
{
|
||||
return toAjax(roleService.deleteRoleByIds(roleIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色选择框列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
||||
@GetMapping("/optionselect")
|
||||
public AjaxResult optionselect()
|
||||
{
|
||||
return success(roleService.selectRoleAll());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已分配用户角色列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
||||
@GetMapping("/authUser/allocatedList")
|
||||
public TableDataInfo allocatedList(SysUser user)
|
||||
{
|
||||
startPage();
|
||||
List<SysUser> list = userService.selectAllocatedList(user);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询未分配用户角色列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:list')")
|
||||
@GetMapping("/authUser/unallocatedList")
|
||||
public TableDataInfo unallocatedList(SysUser user)
|
||||
{
|
||||
startPage();
|
||||
List<SysUser> list = userService.selectUnallocatedList(user);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消授权用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/cancel")
|
||||
public AjaxResult cancelAuthUser(@RequestBody SysUserRole userRole)
|
||||
{
|
||||
return toAjax(roleService.deleteAuthUser(userRole));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量取消授权用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/cancelAll")
|
||||
public AjaxResult cancelAuthUserAll(Long roleId, Long[] userIds)
|
||||
{
|
||||
return toAjax(roleService.deleteAuthUsers(roleId, userIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量选择用户授权
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:edit')")
|
||||
@Log(title = "角色管理", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authUser/selectAll")
|
||||
public AjaxResult selectAuthUserAll(Long roleId, Long[] userIds)
|
||||
{
|
||||
roleService.checkRoleDataScope(roleId);
|
||||
return toAjax(roleService.insertAuthUsers(roleId, userIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对应角色部门树列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:role:query')")
|
||||
@GetMapping(value = "/deptTree/{roleId}")
|
||||
public AjaxResult deptTree(@PathVariable("roleId") Long roleId)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
|
||||
ajax.put("depts", deptService.selectDeptTreeList(new SysDept()));
|
||||
return ajax;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,256 @@
|
||||
package com.ruoyi.web.controller.system;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
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.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
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.domain.entity.SysDept;
|
||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysPostService;
|
||||
import com.ruoyi.system.service.ISysRoleService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
|
||||
/**
|
||||
* 用户信息
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/user")
|
||||
public class SysUserController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISysUserService userService;
|
||||
|
||||
@Autowired
|
||||
private ISysRoleService roleService;
|
||||
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
|
||||
@Autowired
|
||||
private ISysPostService postService;
|
||||
|
||||
/**
|
||||
* 获取用户列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SysUser user)
|
||||
{
|
||||
startPage();
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.EXPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:user:export')")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, SysUser user)
|
||||
{
|
||||
List<SysUser> list = userService.selectUserList(user);
|
||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
util.exportExcel(response, list, "用户数据");
|
||||
}
|
||||
|
||||
@Log(title = "用户管理", businessType = BusinessType.IMPORT)
|
||||
@PreAuthorize("@ss.hasPermi('system:user:import')")
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importData(MultipartFile file, boolean updateSupport) throws Exception
|
||||
{
|
||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
List<SysUser> userList = util.importExcel(file.getInputStream());
|
||||
String operName = getUsername();
|
||||
String message = userService.importUser(userList, updateSupport, operName);
|
||||
return success(message);
|
||||
}
|
||||
|
||||
@PostMapping("/importTemplate")
|
||||
public void importTemplate(HttpServletResponse response)
|
||||
{
|
||||
ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
|
||||
util.importTemplateExcel(response, "用户数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户编号获取详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||
@GetMapping(value = { "/", "/{userId}" })
|
||||
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
if (StringUtils.isNotNull(userId))
|
||||
{
|
||||
userService.checkUserDataScope(userId);
|
||||
SysUser sysUser = userService.selectUserById(userId);
|
||||
ajax.put(AjaxResult.DATA_TAG, sysUser);
|
||||
ajax.put("postIds", postService.selectPostListByUserId(userId));
|
||||
ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList()));
|
||||
}
|
||||
List<SysRole> roles = roleService.selectRoleAll();
|
||||
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||
ajax.put("posts", postService.selectPostAll());
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:add')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@Validated @RequestBody SysUser user)
|
||||
{
|
||||
deptService.checkDeptDataScope(user.getDeptId());
|
||||
roleService.checkRoleDataScope(user.getRoleIds());
|
||||
if (!userService.checkUserNameUnique(user))
|
||||
{
|
||||
return error("新增用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
|
||||
{
|
||||
return error("新增用户'" + user.getUserName() + "'失败,手机号码已存在");
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
|
||||
{
|
||||
return error("新增用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
||||
}
|
||||
user.setCreateBy(getUsername());
|
||||
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
||||
return toAjax(userService.insertUser(user));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@Validated @RequestBody SysUser user)
|
||||
{
|
||||
userService.checkUserAllowed(user);
|
||||
userService.checkUserDataScope(user.getUserId());
|
||||
deptService.checkDeptDataScope(user.getDeptId());
|
||||
roleService.checkRoleDataScope(user.getRoleIds());
|
||||
if (!userService.checkUserNameUnique(user))
|
||||
{
|
||||
return error("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(user.getPhonenumber()) && !userService.checkPhoneUnique(user))
|
||||
{
|
||||
return error("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(user.getEmail()) && !userService.checkEmailUnique(user))
|
||||
{
|
||||
return error("修改用户'" + user.getUserName() + "'失败,邮箱账号已存在");
|
||||
}
|
||||
user.setUpdateBy(getUsername());
|
||||
return toAjax(userService.updateUser(user));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:remove')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{userIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] userIds)
|
||||
{
|
||||
if (ArrayUtils.contains(userIds, getUserId()))
|
||||
{
|
||||
return error("当前用户不能删除");
|
||||
}
|
||||
return toAjax(userService.deleteUserByIds(userIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:resetPwd')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/resetPwd")
|
||||
public AjaxResult resetPwd(@RequestBody SysUser user)
|
||||
{
|
||||
userService.checkUserAllowed(user);
|
||||
userService.checkUserDataScope(user.getUserId());
|
||||
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
||||
user.setUpdateBy(getUsername());
|
||||
return toAjax(userService.resetPwd(user));
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态修改
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysUser user)
|
||||
{
|
||||
userService.checkUserAllowed(user);
|
||||
userService.checkUserDataScope(user.getUserId());
|
||||
user.setUpdateBy(getUsername());
|
||||
return toAjax(userService.updateUserStatus(user));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户编号获取授权角色
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:query')")
|
||||
@GetMapping("/authRole/{userId}")
|
||||
public AjaxResult authRole(@PathVariable("userId") Long userId)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
SysUser user = userService.selectUserById(userId);
|
||||
List<SysRole> roles = roleService.selectRolesByUserId(userId);
|
||||
ajax.put("user", user);
|
||||
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户授权角色
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:edit')")
|
||||
@Log(title = "用户管理", businessType = BusinessType.GRANT)
|
||||
@PutMapping("/authRole")
|
||||
public AjaxResult insertAuthRole(Long userId, Long[] roleIds)
|
||||
{
|
||||
userService.checkUserDataScope(userId);
|
||||
roleService.checkRoleDataScope(roleIds);
|
||||
userService.insertUserAuth(userId, roleIds);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门树列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:user:list')")
|
||||
@GetMapping("/deptTree")
|
||||
public AjaxResult deptTree(SysDept dept)
|
||||
{
|
||||
return success(deptService.selectDeptTreeList(dept));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,183 @@
|
||||
package com.ruoyi.web.controller.tool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
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.PutMapping;
|
||||
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.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* swagger 用户测试方法
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Api("用户信息管理")
|
||||
@RestController
|
||||
@RequestMapping("/test/user")
|
||||
public class TestController extends BaseController
|
||||
{
|
||||
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
|
||||
{
|
||||
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
|
||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户列表")
|
||||
@GetMapping("/list")
|
||||
public R<List<UserEntity>> userList()
|
||||
{
|
||||
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
|
||||
return R.ok(userList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户详细")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@GetMapping("/{userId}")
|
||||
public R<UserEntity> getUser(@PathVariable Integer userId)
|
||||
{
|
||||
if (!users.isEmpty() && users.containsKey(userId))
|
||||
{
|
||||
return R.ok(users.get(userId));
|
||||
}
|
||||
else
|
||||
{
|
||||
return R.fail("用户不存在");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("新增用户")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "Integer", dataTypeClass = Integer.class),
|
||||
@ApiImplicitParam(name = "username", value = "用户名称", dataType = "String", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "password", value = "用户密码", dataType = "String", dataTypeClass = String.class),
|
||||
@ApiImplicitParam(name = "mobile", value = "用户手机", dataType = "String", dataTypeClass = String.class)
|
||||
})
|
||||
@PostMapping("/save")
|
||||
public R<String> save(UserEntity user)
|
||||
{
|
||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
||||
{
|
||||
return R.fail("用户ID不能为空");
|
||||
}
|
||||
users.put(user.getUserId(), user);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("更新用户")
|
||||
@PutMapping("/update")
|
||||
public R<String> update(@RequestBody UserEntity user)
|
||||
{
|
||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
||||
{
|
||||
return R.fail("用户ID不能为空");
|
||||
}
|
||||
if (users.isEmpty() || !users.containsKey(user.getUserId()))
|
||||
{
|
||||
return R.fail("用户不存在");
|
||||
}
|
||||
users.remove(user.getUserId());
|
||||
users.put(user.getUserId(), user);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("删除用户信息")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path", dataTypeClass = Integer.class)
|
||||
@DeleteMapping("/{userId}")
|
||||
public R<String> delete(@PathVariable Integer userId)
|
||||
{
|
||||
if (!users.isEmpty() && users.containsKey(userId))
|
||||
{
|
||||
users.remove(userId);
|
||||
return R.ok();
|
||||
}
|
||||
else
|
||||
{
|
||||
return R.fail("用户不存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModel(value = "UserEntity", description = "用户实体")
|
||||
class UserEntity
|
||||
{
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("用户名称")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("用户密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty("用户手机")
|
||||
private String mobile;
|
||||
|
||||
public UserEntity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public UserEntity(Integer userId, String username, String password, String mobile)
|
||||
{
|
||||
this.userId = userId;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public Integer getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUsername()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username)
|
||||
{
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getMobile()
|
||||
{
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile)
|
||||
{
|
||||
this.mobile = mobile;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
restart.include.json=/com.alibaba.fastjson2.*.jar
|
||||
@ -0,0 +1,24 @@
|
||||
Application Version: ${ruoyi.version}
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// _ooOoo_ //
|
||||
// o8888888o //
|
||||
// 88" . "88 //
|
||||
// (| ^_^ |) //
|
||||
// O\ = /O //
|
||||
// ____/`---'\____ //
|
||||
// .' \\| |// `. //
|
||||
// / \\||| : |||// \ //
|
||||
// / _||||| -:- |||||- \ //
|
||||
// | | \\\ - /// | | //
|
||||
// | \_| ''\---/'' | | //
|
||||
// \ .-\__ `-` ___/-. / //
|
||||
// ___`. .' /--.--\ `. . ___ //
|
||||
// ."" '< `.___\_<|>_/___.' >'"". //
|
||||
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
|
||||
// \ \ `-. \_ __\ /__ _/ .-` / / //
|
||||
// ========`-.____`-.___\_____/___.-`____.-'======== //
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 佛祖保佑 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue