若依 3.0

dep_wangsr
RuoYi 6 years ago committed by Limy
parent bef9a7949a
commit 9b9dcc0980

@ -10,9 +10,9 @@ http://www.zi-han.net/theme/hplus
http://webapplayers.com/inspinia_admin-v2.7.1 http://webapplayers.com/inspinia_admin-v2.7.1
阿里云优惠活动2CPU 4GRAM 1M带宽 40G高效云盘https://promotion.aliyun.com/ntms/act/vm/aliyun-group/buy.html?group=BphATfDhsQ > RuoYi从3.0开始,进行模块拆分,将原先的单应用转变为多模块,如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast)
云产品通用1000元代金券可叠加官网常规优惠使用 https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof > 推荐使用阿里云部署,通用云产品代金券 [点我领取](https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof)
## 内置功能 ## 内置功能

@ -1,257 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?> <?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" <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"> 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> <modelVersion>4.0.0</modelVersion>
<groupId>com.ruoyi</groupId> <groupId>com.ruoyi</groupId>
<artifactId>RuoYi</artifactId> <artifactId>ruoyi</artifactId>
<version>3.0.0</version> <version>3.0</version>
<packaging>jar</packaging>
<name>RuoYi</name> <name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description> <description>若依管理系统</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
<relativePath />
</parent>
<properties> <properties>
<ruoyi.version>3.0</ruoyi.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<shiro.version>1.4.0</shiro.version> <shiro.version>1.4.0</shiro.version>
<thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version> <thymeleaf.extras.shiro.version>2.0.0</thymeleaf.extras.shiro.version>
<mybatis.spring.boot.starter.version>1.3.2</mybatis.spring.boot.starter.version> <mybatis.boot.version>1.3.2</mybatis.boot.version>
<pagehelper.spring.boot.starter.version>1.2.5</pagehelper.spring.boot.starter.version>
<fastjson.version>1.2.47</fastjson.version>
<druid.version>1.1.10</druid.version> <druid.version>1.1.10</druid.version>
<commons.io.version>2.5</commons.io.version>
<commons.fileupload.version>1.3.3</commons.fileupload.version>
<bitwalker.version>1.19</bitwalker.version> <bitwalker.version>1.19</bitwalker.version>
<lombok.version>1.16.18</lombok.version>
<velocity.version>1.7</velocity.version>
<kaptcha.version>2.3.2</kaptcha.version> <kaptcha.version>2.3.2</kaptcha.version>
<swagger.version>2.7.0</swagger.version> <swagger.version>2.7.0</swagger.version>
<jsoup.version>1.11.3</jsoup.version>
<poi.version>3.17</poi.version>
</properties> </properties>
<dependencyManagement>
<dependencies> <dependencies>
<!-- SpringBoot 核心包 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<!--
<exclusions>
<exclusion>
<artifactId>spring-boot-starter-tomcat</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
</exclusions>
-->
</dependency>
<!-- SpringBoot 测试 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- SpringBoot 拦截器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<!-- SpringBoot Web容器 -->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-dependencies</artifactId>
</dependency> <version>2.0.5.RELEASE</version>
<type>pom</type>
<!-- SpringBoot集成thymeleaf模板 --> <scope>import</scope>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- SpringBoot集成mybatis框架 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis.spring.boot.starter.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.spring.boot.starter.version}</version>
</dependency>
<!--阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!--常用工具类 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!--io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!--文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons.fileupload.version}</version>
</dependency>
<!--Shiro核心框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- Shiro使用Srping框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- Shiro使用EhCache缓存框架 -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-ehcache</artifactId>
<version>${shiro.version}</version>
</dependency>
<!-- thymeleaf模板引擎和shiro框架的整合 -->
<dependency>
<groupId>com.github.theborakompanioni</groupId>
<artifactId>thymeleaf-extras-shiro</artifactId>
<version>${thymeleaf.extras.shiro.version}</version>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${bitwalker.version}</version>
</dependency> </dependency>
</dependencies>
</dependencyManagement>
<!--Spring框架基本的核心工具--> <modules>
<dependency> <module>ruoyi-admin</module>
<groupId>org.springframework</groupId> <module>ruoyi-framework</module>
<artifactId>spring-context-support</artifactId> <module>ruoyi-system</module>
</dependency> <module>ruoyi-quartz</module>
<module>ruoyi-generator</module>
<module>ruoyi-common</module>
</modules>
<packaging>pom</packaging>
<!-- 定时任务 -->
<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<exclusions>
<exclusion>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--velocity代码生成使用模板 --> <dependencies>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>${velocity.version}</version>
</dependency>
<!--验证码 -->
<dependency> <dependency>
<groupId>com.github.penggle</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
<exclusions>
<exclusion>
<artifactId>javax.servlet-api</artifactId>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
</exclusion> <artifactId>javax.servlet-api</artifactId>
</exclusions>
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- swagger2-UI-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- HTML解析器 -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>${jsoup.version}</version>
</dependency> </dependency>
<!-- excel工具 --> <!-- 日志工具类 -->
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.slf4j</groupId>
<artifactId>poi-ooxml</artifactId> <artifactId>slf4j-api</artifactId>
<version>${poi.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>${project.artifactId}</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>spring-boot-maven-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<configuration> <configuration>
<fork>true</fork> <!-- 如果没有该配置devtools不会生效 --> <source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ruoyi-admin</artifactId>
<description>
web服务入口
</description>
<properties>
<pagehelper.boot.version>1.2.5</pagehelper.boot.version>
<swagger.version>2.7.0</swagger.version>
</properties>
<dependencies>
<!-- SpringBoot Web容器 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- SpringBoot集成thymeleaf模板 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- swagger2-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</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-quartz</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
<version>${ruoyi.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork> <!-- 如果没有该配置devtools不会生效 -->
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<finalName>ruoyi-${ruoyi.version}</finalName>
</build>
</project>

@ -11,7 +11,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
* @author ruoyi * @author ruoyi
*/ */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class }) @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@MapperScan("com.ruoyi.project.*.*.mapper") @MapperScan("com.ruoyi.*.mapper")
public class RuoYiApplication public class RuoYiApplication
{ {
public static void main(String[] args) public static void main(String[] args)

@ -1,4 +1,4 @@
package com.ruoyi.project.common; package com.ruoyi.web.controller.common;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URLEncoder; import java.net.URLEncoder;
@ -8,8 +8,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.common.config.Global;
import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.common.utils.file.FileUtils;
import com.ruoyi.framework.config.RuoYiConfig;
/** /**
* *
@ -27,7 +27,7 @@ public class CommonController
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1); String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
try try
{ {
String filePath = RuoYiConfig.getDownloadPath() + fileName; String filePath = Global.getDownloadPath() + fileName;
response.setCharacterEncoding("utf-8"); response.setCharacterEncoding("utf-8");
response.setContentType("multipart/form-data"); response.setContentType("multipart/form-data");

@ -1,10 +1,10 @@
package com.ruoyi.project.monitor.druid; package com.ruoyi.web.controller.monitor;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.web.core.base.BaseController;
/** /**
* druid * druid

@ -1,4 +1,4 @@
package com.ruoyi.project.monitor.job.controller; package com.ruoyi.web.controller.monitor;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -10,14 +10,15 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.job.domain.Job; import com.ruoyi.quartz.domain.SysJob;
import com.ruoyi.project.monitor.job.service.IJobService; import com.ruoyi.quartz.service.ISysJobService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -31,7 +32,7 @@ public class JobController extends BaseController
private String prefix = "monitor/job"; private String prefix = "monitor/job";
@Autowired @Autowired
private IJobService jobService; private ISysJobService jobService;
@RequiresPermissions("monitor:job:view") @RequiresPermissions("monitor:job:view")
@GetMapping() @GetMapping()
@ -43,10 +44,10 @@ public class JobController extends BaseController
@RequiresPermissions("monitor:job:list") @RequiresPermissions("monitor:job:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(Job job) public TableDataInfo list(SysJob job)
{ {
startPage(); startPage();
List<Job> list = jobService.selectJobList(job); List<SysJob> list = jobService.selectJobList(job);
return getDataTable(list); return getDataTable(list);
} }
@ -54,10 +55,10 @@ public class JobController extends BaseController
@RequiresPermissions("monitor:job:export") @RequiresPermissions("monitor:job:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Job job) public AjaxResult export(SysJob job)
{ {
List<Job> list = jobService.selectJobList(job); List<SysJob> list = jobService.selectJobList(job);
ExcelUtil<Job> util = new ExcelUtil<Job>(Job.class); ExcelUtil<SysJob> util = new ExcelUtil<SysJob>(SysJob.class);
return util.exportExcel(list, "job"); return util.exportExcel(list, "job");
} }
@ -86,8 +87,9 @@ public class JobController extends BaseController
@RequiresPermissions("monitor:job:changeStatus") @RequiresPermissions("monitor:job:changeStatus")
@PostMapping("/changeStatus") @PostMapping("/changeStatus")
@ResponseBody @ResponseBody
public AjaxResult changeStatus(Job job) public AjaxResult changeStatus(SysJob job)
{ {
job.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(jobService.changeStatus(job)); return toAjax(jobService.changeStatus(job));
} }
@ -98,7 +100,7 @@ public class JobController extends BaseController
@RequiresPermissions("monitor:job:changeStatus") @RequiresPermissions("monitor:job:changeStatus")
@PostMapping("/run") @PostMapping("/run")
@ResponseBody @ResponseBody
public AjaxResult run(Job job) public AjaxResult run(SysJob job)
{ {
return toAjax(jobService.run(job)); return toAjax(jobService.run(job));
} }
@ -119,8 +121,9 @@ public class JobController extends BaseController
@RequiresPermissions("monitor:job:add") @RequiresPermissions("monitor:job:add")
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(Job job) public AjaxResult addSave(SysJob job)
{ {
job.setCreateBy(ShiroUtils.getLoginName());
return toAjax(jobService.insertJobCron(job)); return toAjax(jobService.insertJobCron(job));
} }
@ -141,8 +144,9 @@ public class JobController extends BaseController
@RequiresPermissions("monitor:job:edit") @RequiresPermissions("monitor:job:edit")
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(Job job) public AjaxResult editSave(SysJob job)
{ {
job.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(jobService.updateJobCron(job)); return toAjax(jobService.updateJobCron(job));
} }
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.monitor.job.controller; package com.ruoyi.web.controller.monitor;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.job.domain.JobLog; import com.ruoyi.quartz.domain.SysJobLog;
import com.ruoyi.project.monitor.job.service.IJobLogService; import com.ruoyi.quartz.service.ISysJobLogService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -29,7 +29,7 @@ public class JobLogController extends BaseController
private String prefix = "monitor/job"; private String prefix = "monitor/job";
@Autowired @Autowired
private IJobLogService jobLogService; private ISysJobLogService jobLogService;
@RequiresPermissions("monitor:job:view") @RequiresPermissions("monitor:job:view")
@GetMapping() @GetMapping()
@ -41,10 +41,10 @@ public class JobLogController extends BaseController
@RequiresPermissions("monitor:job:list") @RequiresPermissions("monitor:job:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(JobLog jobLog) public TableDataInfo list(SysJobLog jobLog)
{ {
startPage(); startPage();
List<JobLog> list = jobLogService.selectJobLogList(jobLog); List<SysJobLog> list = jobLogService.selectJobLogList(jobLog);
return getDataTable(list); return getDataTable(list);
} }
@ -52,10 +52,10 @@ public class JobLogController extends BaseController
@RequiresPermissions("monitor:job:export") @RequiresPermissions("monitor:job:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(JobLog jobLog) public AjaxResult export(SysJobLog jobLog)
{ {
List<JobLog> list = jobLogService.selectJobLogList(jobLog); List<SysJobLog> list = jobLogService.selectJobLogList(jobLog);
ExcelUtil<JobLog> util = new ExcelUtil<JobLog>(JobLog.class); ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class);
return util.exportExcel(list, "jobLog"); return util.exportExcel(list, "jobLog");
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.monitor.logininfor.controller; package com.ruoyi.web.controller.monitor;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -8,14 +8,14 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.logininfor.domain.Logininfor; import com.ruoyi.system.domain.SysLogininfor;
import com.ruoyi.project.monitor.logininfor.service.ILogininforService; import com.ruoyi.system.service.ISysLogininforService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* 访 * 访
@ -29,7 +29,7 @@ public class LogininforController extends BaseController
private String prefix = "monitor/logininfor"; private String prefix = "monitor/logininfor";
@Autowired @Autowired
private ILogininforService logininforService; private ISysLogininforService logininforService;
@RequiresPermissions("monitor:logininfor:view") @RequiresPermissions("monitor:logininfor:view")
@GetMapping() @GetMapping()
@ -41,10 +41,10 @@ public class LogininforController extends BaseController
@RequiresPermissions("monitor:logininfor:list") @RequiresPermissions("monitor:logininfor:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(Logininfor logininfor) public TableDataInfo list(SysLogininfor logininfor)
{ {
startPage(); startPage();
List<Logininfor> list = logininforService.selectLogininforList(logininfor); List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
return getDataTable(list); return getDataTable(list);
} }
@ -52,10 +52,10 @@ public class LogininforController extends BaseController
@RequiresPermissions("monitor:logininfor:export") @RequiresPermissions("monitor:logininfor:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Logininfor logininfor) public AjaxResult export(SysLogininfor logininfor)
{ {
List<Logininfor> list = logininforService.selectLogininforList(logininfor); List<SysLogininfor> list = logininforService.selectLogininforList(logininfor);
ExcelUtil<Logininfor> util = new ExcelUtil<Logininfor>(Logininfor.class); ExcelUtil<SysLogininfor> util = new ExcelUtil<SysLogininfor>(SysLogininfor.class);
return util.exportExcel(list, "logininfor"); return util.exportExcel(list, "logininfor");
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.monitor.operlog.controller; package com.ruoyi.web.controller.monitor;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -10,14 +10,14 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.operlog.domain.OperLog; import com.ruoyi.system.domain.SysOperLog;
import com.ruoyi.project.monitor.operlog.service.IOperLogService; import com.ruoyi.system.service.ISysOperLogService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -31,7 +31,7 @@ public class OperlogController extends BaseController
private String prefix = "monitor/operlog"; private String prefix = "monitor/operlog";
@Autowired @Autowired
private IOperLogService operLogService; private ISysOperLogService operLogService;
@RequiresPermissions("monitor:operlog:view") @RequiresPermissions("monitor:operlog:view")
@GetMapping() @GetMapping()
@ -43,10 +43,10 @@ public class OperlogController extends BaseController
@RequiresPermissions("monitor:operlog:list") @RequiresPermissions("monitor:operlog:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(OperLog operLog) public TableDataInfo list(SysOperLog operLog)
{ {
startPage(); startPage();
List<OperLog> list = operLogService.selectOperLogList(operLog); List<SysOperLog> list = operLogService.selectOperLogList(operLog);
return getDataTable(list); return getDataTable(list);
} }
@ -54,10 +54,10 @@ public class OperlogController extends BaseController
@RequiresPermissions("monitor:operlog:export") @RequiresPermissions("monitor:operlog:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(OperLog operLog) public AjaxResult export(SysOperLog operLog)
{ {
List<OperLog> list = operLogService.selectOperLogList(operLog); List<SysOperLog> list = operLogService.selectOperLogList(operLog);
ExcelUtil<OperLog> util = new ExcelUtil<OperLog>(OperLog.class); ExcelUtil<SysOperLog> util = new ExcelUtil<SysOperLog>(SysOperLog.class);
return util.exportExcel(list, "operLog"); return util.exportExcel(list, "operLog");
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.monitor.online.controller; package com.ruoyi.web.controller.monitor;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -9,16 +9,17 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.security.ShiroUtils; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.enums.OnlineStatus;
import com.ruoyi.framework.shiro.session.OnlineSession;
import com.ruoyi.framework.shiro.session.OnlineSessionDAO; import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.online.domain.OnlineSession; import com.ruoyi.system.domain.SysUserOnline;
import com.ruoyi.project.monitor.online.domain.UserOnline; import com.ruoyi.system.service.impl.SysUserOnlineServiceImpl;
import com.ruoyi.project.monitor.online.service.IUserOnlineService; import com.ruoyi.web.core.base.BaseController;
/** /**
* 线 * 线
@ -32,7 +33,7 @@ public class UserOnlineController extends BaseController
private String prefix = "monitor/online"; private String prefix = "monitor/online";
@Autowired @Autowired
private IUserOnlineService userOnlineService; private SysUserOnlineServiceImpl userOnlineService;
@Autowired @Autowired
private OnlineSessionDAO onlineSessionDAO; private OnlineSessionDAO onlineSessionDAO;
@ -47,10 +48,10 @@ public class UserOnlineController extends BaseController
@RequiresPermissions("monitor:online:list") @RequiresPermissions("monitor:online:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(UserOnline userOnline) public TableDataInfo list(SysUserOnline userOnline)
{ {
startPage(); startPage();
List<UserOnline> list = userOnlineService.selectUserOnlineList(userOnline); List<SysUserOnline> list = userOnlineService.selectUserOnlineList(userOnline);
return getDataTable(list); return getDataTable(list);
} }
@ -62,7 +63,7 @@ public class UserOnlineController extends BaseController
{ {
for (String sessionId : ids) for (String sessionId : ids)
{ {
UserOnline online = userOnlineService.selectOnlineById(sessionId); SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
if (online == null) if (online == null)
{ {
return error("用户已下线"); return error("用户已下线");
@ -76,8 +77,8 @@ public class UserOnlineController extends BaseController
{ {
return error("当前登陆用户无法强退"); return error("当前登陆用户无法强退");
} }
onlineSession.setStatus(OnlineSession.OnlineStatus.off_line); onlineSession.setStatus(OnlineStatus.off_line);
online.setStatus(OnlineSession.OnlineStatus.off_line); online.setStatus(OnlineStatus.off_line);
userOnlineService.saveOnline(online); userOnlineService.saveOnline(online);
} }
return success(); return success();
@ -89,7 +90,7 @@ public class UserOnlineController extends BaseController
@ResponseBody @ResponseBody
public AjaxResult forceLogout(String sessionId) public AjaxResult forceLogout(String sessionId)
{ {
UserOnline online = userOnlineService.selectOnlineById(sessionId); SysUserOnline online = userOnlineService.selectOnlineById(sessionId);
if (sessionId.equals(ShiroUtils.getSessionId())) if (sessionId.equals(ShiroUtils.getSessionId()))
{ {
return error("当前登陆用户无法强退"); return error("当前登陆用户无法强退");
@ -103,8 +104,8 @@ public class UserOnlineController extends BaseController
{ {
return error("用户已下线"); return error("用户已下线");
} }
onlineSession.setStatus(OnlineSession.OnlineStatus.off_line); onlineSession.setStatus(OnlineStatus.off_line);
online.setStatus(OnlineSession.OnlineStatus.off_line); online.setStatus(OnlineStatus.off_line);
userOnlineService.saveOnline(online); userOnlineService.saveOnline(online);
return success(); return success();
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.system.user.controller; package com.ruoyi.web.controller.system;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.io.IOException; import java.io.IOException;
@ -14,7 +14,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
import com.google.code.kaptcha.Constants; import com.google.code.kaptcha.Constants;
import com.google.code.kaptcha.Producer; import com.google.code.kaptcha.Producer;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.web.core.base.BaseController;
/** /**
* *

@ -1,4 +1,4 @@
package com.ruoyi.project.system.config.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -10,14 +10,15 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.config.domain.Config; import com.ruoyi.system.domain.SysConfig;
import com.ruoyi.project.system.config.service.IConfigService; import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -31,7 +32,7 @@ public class ConfigController extends BaseController
private String prefix = "system/config"; private String prefix = "system/config";
@Autowired @Autowired
private IConfigService configService; private ISysConfigService configService;
@RequiresPermissions("system:config:view") @RequiresPermissions("system:config:view")
@GetMapping() @GetMapping()
@ -46,10 +47,10 @@ public class ConfigController extends BaseController
@RequiresPermissions("system:config:list") @RequiresPermissions("system:config:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(Config config) public TableDataInfo list(SysConfig config)
{ {
startPage(); startPage();
List<Config> list = configService.selectConfigList(config); List<SysConfig> list = configService.selectConfigList(config);
return getDataTable(list); return getDataTable(list);
} }
@ -57,10 +58,10 @@ public class ConfigController extends BaseController
@RequiresPermissions("system:config:export") @RequiresPermissions("system:config:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Config config) public AjaxResult export(SysConfig config)
{ {
List<Config> list = configService.selectConfigList(config); List<SysConfig> list = configService.selectConfigList(config);
ExcelUtil<Config> util = new ExcelUtil<Config>(Config.class); ExcelUtil<SysConfig> util = new ExcelUtil<SysConfig>(SysConfig.class);
return util.exportExcel(list, "config"); return util.exportExcel(list, "config");
} }
@ -80,8 +81,9 @@ public class ConfigController extends BaseController
@Log(title = "参数管理", businessType = BusinessType.INSERT) @Log(title = "参数管理", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(Config config) public AjaxResult addSave(SysConfig config)
{ {
config.setCreateBy(ShiroUtils.getLoginName());
return toAjax(configService.insertConfig(config)); return toAjax(configService.insertConfig(config));
} }
@ -102,8 +104,9 @@ public class ConfigController extends BaseController
@Log(title = "参数管理", businessType = BusinessType.UPDATE) @Log(title = "参数管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(Config config) public AjaxResult editSave(SysConfig config)
{ {
config.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(configService.updateConfig(config)); return toAjax(configService.updateConfig(config));
} }
@ -124,7 +127,7 @@ public class ConfigController extends BaseController
*/ */
@PostMapping("/checkConfigKeyUnique") @PostMapping("/checkConfigKeyUnique")
@ResponseBody @ResponseBody
public String checkConfigKeyUnique(Config config) public String checkConfigKeyUnique(SysConfig config)
{ {
return configService.checkConfigKeyUnique(config); return configService.checkConfigKeyUnique(config);
} }

@ -1,8 +1,7 @@
package com.ruoyi.project.system.dept.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
@ -12,14 +11,14 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.system.domain.SysDept;
import com.ruoyi.project.system.dept.domain.Dept; import com.ruoyi.system.domain.SysRole;
import com.ruoyi.project.system.dept.service.IDeptService; import com.ruoyi.system.service.ISysDeptService;
import com.ruoyi.project.system.role.domain.Role; import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -33,7 +32,7 @@ public class DeptController extends BaseController
private String prefix = "system/dept"; private String prefix = "system/dept";
@Autowired @Autowired
private IDeptService deptService; private ISysDeptService deptService;
@RequiresPermissions("system:dept:view") @RequiresPermissions("system:dept:view")
@GetMapping() @GetMapping()
@ -45,9 +44,9 @@ public class DeptController extends BaseController
@RequiresPermissions("system:dept:list") @RequiresPermissions("system:dept:list")
@GetMapping("/list") @GetMapping("/list")
@ResponseBody @ResponseBody
public List<Dept> list(Dept dept) public List<SysDept> list(SysDept dept)
{ {
List<Dept> deptList = deptService.selectDeptList(dept); List<SysDept> deptList = deptService.selectDeptList(dept);
return deptList; return deptList;
} }
@ -68,8 +67,9 @@ public class DeptController extends BaseController
@RequiresPermissions("system:dept:add") @RequiresPermissions("system:dept:add")
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(Dept dept) public AjaxResult addSave(SysDept dept)
{ {
dept.setCreateBy(ShiroUtils.getLoginName());
return toAjax(deptService.insertDept(dept)); return toAjax(deptService.insertDept(dept));
} }
@ -90,8 +90,9 @@ public class DeptController extends BaseController
@RequiresPermissions("system:dept:edit") @RequiresPermissions("system:dept:edit")
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(Dept dept) public AjaxResult editSave(SysDept dept)
{ {
dept.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(deptService.updateDept(dept)); return toAjax(deptService.updateDept(dept));
} }
@ -120,7 +121,7 @@ public class DeptController extends BaseController
*/ */
@PostMapping("/checkDeptNameUnique") @PostMapping("/checkDeptNameUnique")
@ResponseBody @ResponseBody
public String checkDeptNameUnique(Dept dept) public String checkDeptNameUnique(SysDept dept)
{ {
return deptService.checkDeptNameUnique(dept); return deptService.checkDeptNameUnique(dept);
} }
@ -151,7 +152,7 @@ public class DeptController extends BaseController
*/ */
@GetMapping("/roleDeptTreeData") @GetMapping("/roleDeptTreeData")
@ResponseBody @ResponseBody
public List<Map<String, Object>> deptTreeData(Role role) public List<Map<String, Object>> deptTreeData(SysRole role)
{ {
List<Map<String, Object>> tree = deptService.roleDeptTreeData(role); List<Map<String, Object>> tree = deptService.roleDeptTreeData(role);
return tree; return tree;

@ -1,4 +1,4 @@
package com.ruoyi.project.system.dict.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -10,14 +10,15 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.dict.domain.DictData; import com.ruoyi.system.domain.SysDictData;
import com.ruoyi.project.system.dict.service.IDictDataService; import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -31,7 +32,7 @@ public class DictDataController extends BaseController
private String prefix = "system/dict/data"; private String prefix = "system/dict/data";
@Autowired @Autowired
private IDictDataService dictDataService; private ISysDictDataService dictDataService;
@RequiresPermissions("system:dict:view") @RequiresPermissions("system:dict:view")
@GetMapping() @GetMapping()
@ -43,10 +44,10 @@ public class DictDataController extends BaseController
@PostMapping("/list") @PostMapping("/list")
@RequiresPermissions("system:dict:list") @RequiresPermissions("system:dict:list")
@ResponseBody @ResponseBody
public TableDataInfo list(DictData dictData) public TableDataInfo list(SysDictData dictData)
{ {
startPage(); startPage();
List<DictData> list = dictDataService.selectDictDataList(dictData); List<SysDictData> list = dictDataService.selectDictDataList(dictData);
return getDataTable(list); return getDataTable(list);
} }
@ -54,10 +55,10 @@ public class DictDataController extends BaseController
@RequiresPermissions("system:dict:export") @RequiresPermissions("system:dict:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(DictData dictData) public AjaxResult export(SysDictData dictData)
{ {
List<DictData> list = dictDataService.selectDictDataList(dictData); List<SysDictData> list = dictDataService.selectDictDataList(dictData);
ExcelUtil<DictData> util = new ExcelUtil<DictData>(DictData.class); ExcelUtil<SysDictData> util = new ExcelUtil<SysDictData>(SysDictData.class);
return util.exportExcel(list, "dictData"); return util.exportExcel(list, "dictData");
} }
@ -78,8 +79,9 @@ public class DictDataController extends BaseController
@RequiresPermissions("system:dict:add") @RequiresPermissions("system:dict:add")
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(DictData dict) public AjaxResult addSave(SysDictData dict)
{ {
dict.setCreateBy(ShiroUtils.getLoginName());
return toAjax(dictDataService.insertDictData(dict)); return toAjax(dictDataService.insertDictData(dict));
} }
@ -100,8 +102,9 @@ public class DictDataController extends BaseController
@RequiresPermissions("system:dict:edit") @RequiresPermissions("system:dict:edit")
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(DictData dict) public AjaxResult editSave(SysDictData dict)
{ {
dict.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(dictDataService.updateDictData(dict)); return toAjax(dictDataService.updateDictData(dict));
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.system.dict.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -10,14 +10,15 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.dict.domain.DictType; import com.ruoyi.system.domain.SysDictType;
import com.ruoyi.project.system.dict.service.IDictTypeService; import com.ruoyi.system.service.ISysDictTypeService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -31,7 +32,7 @@ public class DictTypeController extends BaseController
private String prefix = "system/dict/type"; private String prefix = "system/dict/type";
@Autowired @Autowired
private IDictTypeService dictTypeService; private ISysDictTypeService dictTypeService;
@RequiresPermissions("system:dict:view") @RequiresPermissions("system:dict:view")
@GetMapping() @GetMapping()
@ -43,10 +44,10 @@ public class DictTypeController extends BaseController
@PostMapping("/list") @PostMapping("/list")
@RequiresPermissions("system:dict:list") @RequiresPermissions("system:dict:list")
@ResponseBody @ResponseBody
public TableDataInfo list(DictType dictType) public TableDataInfo list(SysDictType dictType)
{ {
startPage(); startPage();
List<DictType> list = dictTypeService.selectDictTypeList(dictType); List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
return getDataTable(list); return getDataTable(list);
} }
@ -54,11 +55,11 @@ public class DictTypeController extends BaseController
@RequiresPermissions("system:dict:export") @RequiresPermissions("system:dict:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(DictType dictType) public AjaxResult export(SysDictType dictType)
{ {
List<DictType> list = dictTypeService.selectDictTypeList(dictType); List<SysDictType> list = dictTypeService.selectDictTypeList(dictType);
ExcelUtil<DictType> util = new ExcelUtil<DictType>(DictType.class); ExcelUtil<SysDictType> util = new ExcelUtil<SysDictType>(SysDictType.class);
return util.exportExcel(list, "dictType"); return util.exportExcel(list, "dictType");
} }
@ -78,8 +79,9 @@ public class DictTypeController extends BaseController
@RequiresPermissions("system:dict:add") @RequiresPermissions("system:dict:add")
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(DictType dict) public AjaxResult addSave(SysDictType dict)
{ {
dict.setCreateBy(ShiroUtils.getLoginName());
return toAjax(dictTypeService.insertDictType(dict)); return toAjax(dictTypeService.insertDictType(dict));
} }
@ -100,8 +102,9 @@ public class DictTypeController extends BaseController
@RequiresPermissions("system:dict:edit") @RequiresPermissions("system:dict:edit")
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(DictType dict) public AjaxResult editSave(SysDictType dict)
{ {
dict.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(dictTypeService.updateDictType(dict)); return toAjax(dictTypeService.updateDictType(dict));
} }
@ -138,7 +141,7 @@ public class DictTypeController extends BaseController
*/ */
@PostMapping("/checkDictTypeUnique") @PostMapping("/checkDictTypeUnique")
@ResponseBody @ResponseBody
public String checkDictTypeUnique(DictType dictType) public String checkDictTypeUnique(SysDictType dictType)
{ {
return dictTypeService.checkDictTypeUnique(dictType); return dictTypeService.checkDictTypeUnique(dictType);
} }

@ -1,15 +1,15 @@
package com.ruoyi.project.system.user.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import com.ruoyi.framework.config.RuoYiConfig; import com.ruoyi.common.config.Global;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.system.domain.SysMenu;
import com.ruoyi.project.system.menu.domain.Menu; import com.ruoyi.system.domain.SysUser;
import com.ruoyi.project.system.menu.service.IMenuService; import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.project.system.user.domain.User; import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -20,22 +20,19 @@ import com.ruoyi.project.system.user.domain.User;
public class IndexController extends BaseController public class IndexController extends BaseController
{ {
@Autowired @Autowired
private IMenuService menuService; private ISysMenuService menuService;
@Autowired
private RuoYiConfig ruoYiConfig;
// 系统首页 // 系统首页
@GetMapping("/index") @GetMapping("/index")
public String index(ModelMap mmap) public String index(ModelMap mmap)
{ {
// 取身份信息 // 取身份信息
User user = getUser(); SysUser user = getUser();
// 根据用户id取出菜单 // 根据用户id取出菜单
List<Menu> menus = menuService.selectMenusByUser(user); List<SysMenu> menus = menuService.selectMenusByUser(user);
mmap.put("menus", menus); mmap.put("menus", menus);
mmap.put("user", user); mmap.put("user", user);
mmap.put("copyrightYear", ruoYiConfig.getCopyrightYear()); mmap.put("copyrightYear", Global.getCopyrightYear());
return "index"; return "index";
} }
@ -43,7 +40,7 @@ public class IndexController extends BaseController
@GetMapping("/system/main") @GetMapping("/system/main")
public String main(ModelMap mmap) public String main(ModelMap mmap)
{ {
mmap.put("version", ruoYiConfig.getVersion()); mmap.put("version", Global.getVersion());
return "main"; return "main";
} }
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.system.user.controller; package com.ruoyi.web.controller.system;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
@ -10,10 +10,10 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.util.ServletUtils;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.web.core.base.BaseController;
/** /**
* *

@ -1,4 +1,4 @@
package com.ruoyi.project.system.menu.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -11,13 +11,14 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.project.system.menu.domain.Menu; import com.ruoyi.system.domain.SysMenu;
import com.ruoyi.project.system.menu.service.IMenuService; import com.ruoyi.system.domain.SysRole;
import com.ruoyi.project.system.role.domain.Role; import com.ruoyi.system.service.ISysMenuService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -31,7 +32,7 @@ public class MenuController extends BaseController
private String prefix = "system/menu"; private String prefix = "system/menu";
@Autowired @Autowired
private IMenuService menuService; private ISysMenuService menuService;
@RequiresPermissions("system:menu:view") @RequiresPermissions("system:menu:view")
@GetMapping() @GetMapping()
@ -43,9 +44,9 @@ public class MenuController extends BaseController
@RequiresPermissions("system:menu:list") @RequiresPermissions("system:menu:list")
@GetMapping("/list") @GetMapping("/list")
@ResponseBody @ResponseBody
public List<Menu> list(Menu menu) public List<SysMenu> list(SysMenu menu)
{ {
List<Menu> menuList = menuService.selectMenuList(menu); List<SysMenu> menuList = menuService.selectMenuList(menu);
return menuList; return menuList;
} }
@ -66,6 +67,7 @@ public class MenuController extends BaseController
{ {
return error(1, "菜单已分配,不允许删除"); return error(1, "菜单已分配,不允许删除");
} }
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(menuService.deleteMenuById(menuId)); return toAjax(menuService.deleteMenuById(menuId));
} }
@ -75,14 +77,14 @@ public class MenuController extends BaseController
@GetMapping("/add/{parentId}") @GetMapping("/add/{parentId}")
public String add(@PathVariable("parentId") Long parentId, ModelMap mmap) public String add(@PathVariable("parentId") Long parentId, ModelMap mmap)
{ {
Menu menu = null; SysMenu menu = null;
if (0L != parentId) if (0L != parentId)
{ {
menu = menuService.selectMenuById(parentId); menu = menuService.selectMenuById(parentId);
} }
else else
{ {
menu = new Menu(); menu = new SysMenu();
menu.setMenuId(0L); menu.setMenuId(0L);
menu.setMenuName("主目录"); menu.setMenuName("主目录");
} }
@ -97,8 +99,10 @@ public class MenuController extends BaseController
@RequiresPermissions("system:menu:add") @RequiresPermissions("system:menu:add")
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(Menu menu) public AjaxResult addSave(SysMenu menu)
{ {
menu.setCreateBy(ShiroUtils.getLoginName());
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(menuService.insertMenu(menu)); return toAjax(menuService.insertMenu(menu));
} }
@ -119,8 +123,10 @@ public class MenuController extends BaseController
@RequiresPermissions("system:menu:edit") @RequiresPermissions("system:menu:edit")
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(Menu menu) public AjaxResult editSave(SysMenu menu)
{ {
menu.setUpdateBy(ShiroUtils.getLoginName());
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(menuService.updateMenu(menu)); return toAjax(menuService.updateMenu(menu));
} }
@ -138,7 +144,7 @@ public class MenuController extends BaseController
*/ */
@PostMapping("/checkMenuNameUnique") @PostMapping("/checkMenuNameUnique")
@ResponseBody @ResponseBody
public String checkMenuNameUnique(Menu menu) public String checkMenuNameUnique(SysMenu menu)
{ {
return menuService.checkMenuNameUnique(menu); return menuService.checkMenuNameUnique(menu);
} }
@ -148,7 +154,7 @@ public class MenuController extends BaseController
*/ */
@GetMapping("/roleMenuTreeData") @GetMapping("/roleMenuTreeData")
@ResponseBody @ResponseBody
public List<Map<String, Object>> roleMenuTreeData(Role role) public List<Map<String, Object>> roleMenuTreeData(SysRole role)
{ {
List<Map<String, Object>> tree = menuService.roleMenuTreeData(role); List<Map<String, Object>> tree = menuService.roleMenuTreeData(role);
return tree; return tree;
@ -159,7 +165,7 @@ public class MenuController extends BaseController
*/ */
@GetMapping("/menuTreeData") @GetMapping("/menuTreeData")
@ResponseBody @ResponseBody
public List<Map<String, Object>> menuTreeData(Role role) public List<Map<String, Object>> menuTreeData(SysRole role)
{ {
List<Map<String, Object>> tree = menuService.menuTreeData(); List<Map<String, Object>> tree = menuService.menuTreeData();
return tree; return tree;

@ -1,4 +1,4 @@
package com.ruoyi.project.system.notice.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -10,13 +10,14 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.notice.domain.Notice; import com.ruoyi.system.domain.SysNotice;
import com.ruoyi.project.system.notice.service.INoticeService; import com.ruoyi.system.service.ISysNoticeService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -30,7 +31,7 @@ public class NoticeController extends BaseController
private String prefix = "system/notice"; private String prefix = "system/notice";
@Autowired @Autowired
private INoticeService noticeService; private ISysNoticeService noticeService;
@RequiresPermissions("system:notice:view") @RequiresPermissions("system:notice:view")
@GetMapping() @GetMapping()
@ -45,10 +46,10 @@ public class NoticeController extends BaseController
@RequiresPermissions("system:notice:list") @RequiresPermissions("system:notice:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(Notice notice) public TableDataInfo list(SysNotice notice)
{ {
startPage(); startPage();
List<Notice> list = noticeService.selectNoticeList(notice); List<SysNotice> list = noticeService.selectNoticeList(notice);
return getDataTable(list); return getDataTable(list);
} }
@ -68,8 +69,9 @@ public class NoticeController extends BaseController
@Log(title = "通知公告", businessType = BusinessType.INSERT) @Log(title = "通知公告", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(Notice notice) public AjaxResult addSave(SysNotice notice)
{ {
notice.setCreateBy(ShiroUtils.getLoginName());
return toAjax(noticeService.insertNotice(notice)); return toAjax(noticeService.insertNotice(notice));
} }
@ -90,8 +92,9 @@ public class NoticeController extends BaseController
@Log(title = "通知公告", businessType = BusinessType.UPDATE) @Log(title = "通知公告", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(Notice notice) public AjaxResult editSave(SysNotice notice)
{ {
notice.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(noticeService.updateNotice(notice)); return toAjax(noticeService.updateNotice(notice));
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.system.post.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -10,14 +10,15 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.post.domain.Post; import com.ruoyi.system.domain.SysPost;
import com.ruoyi.project.system.post.service.IPostService; import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -31,7 +32,7 @@ public class PostController extends BaseController
private String prefix = "system/post"; private String prefix = "system/post";
@Autowired @Autowired
private IPostService postService; private ISysPostService postService;
@RequiresPermissions("system:post:view") @RequiresPermissions("system:post:view")
@GetMapping() @GetMapping()
@ -43,10 +44,10 @@ public class PostController extends BaseController
@RequiresPermissions("system:post:list") @RequiresPermissions("system:post:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(Post post) public TableDataInfo list(SysPost post)
{ {
startPage(); startPage();
List<Post> list = postService.selectPostList(post); List<SysPost> list = postService.selectPostList(post);
return getDataTable(list); return getDataTable(list);
} }
@ -54,10 +55,10 @@ public class PostController extends BaseController
@RequiresPermissions("system:post:export") @RequiresPermissions("system:post:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Post post) public AjaxResult export(SysPost post)
{ {
List<Post> list = postService.selectPostList(post); List<SysPost> list = postService.selectPostList(post);
ExcelUtil<Post> util = new ExcelUtil<Post>(Post.class); ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
return util.exportExcel(list, "post"); return util.exportExcel(list, "post");
} }
@ -93,8 +94,9 @@ public class PostController extends BaseController
@Log(title = "岗位管理", businessType = BusinessType.INSERT) @Log(title = "岗位管理", businessType = BusinessType.INSERT)
@PostMapping("/add") @PostMapping("/add")
@ResponseBody @ResponseBody
public AjaxResult addSave(Post post) public AjaxResult addSave(SysPost post)
{ {
post.setCreateBy(ShiroUtils.getLoginName());
return toAjax(postService.insertPost(post)); return toAjax(postService.insertPost(post));
} }
@ -115,8 +117,9 @@ public class PostController extends BaseController
@Log(title = "岗位管理", businessType = BusinessType.UPDATE) @Log(title = "岗位管理", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(Post post) public AjaxResult editSave(SysPost post)
{ {
post.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(postService.updatePost(post)); return toAjax(postService.updatePost(post));
} }
@ -125,7 +128,7 @@ public class PostController extends BaseController
*/ */
@PostMapping("/checkPostNameUnique") @PostMapping("/checkPostNameUnique")
@ResponseBody @ResponseBody
public String checkPostNameUnique(Post post) public String checkPostNameUnique(SysPost post)
{ {
return postService.checkPostNameUnique(post); return postService.checkPostNameUnique(post);
} }
@ -135,7 +138,7 @@ public class PostController extends BaseController
*/ */
@PostMapping("/checkPostCodeUnique") @PostMapping("/checkPostCodeUnique")
@ResponseBody @ResponseBody
public String checkPostCodeUnique(Post post) public String checkPostCodeUnique(SysPost post)
{ {
return postService.checkPostCodeUnique(post); return postService.checkPostCodeUnique(post);
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.system.user.controller; package com.ruoyi.web.controller.system;
import org.apache.shiro.crypto.hash.Md5Hash; import org.apache.shiro.crypto.hash.Md5Hash;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -13,15 +13,15 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.config.Global;
import com.ruoyi.framework.config.RuoYiConfig; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.util.FileUploadUtils;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.system.domain.SysUser;
import com.ruoyi.framework.web.service.DictService; import com.ruoyi.system.service.ISysDictDataService;
import com.ruoyi.project.system.user.domain.User; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.project.system.user.service.IUserService; import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -37,10 +37,10 @@ public class ProfileController extends BaseController
private String prefix = "system/user/profile"; private String prefix = "system/user/profile";
@Autowired @Autowired
private IUserService userService; private ISysUserService userService;
@Autowired @Autowired
private DictService dict; private ISysDictDataService dictDataService;
/** /**
* *
@ -48,8 +48,8 @@ public class ProfileController extends BaseController
@GetMapping() @GetMapping()
public String profile(ModelMap mmap) public String profile(ModelMap mmap)
{ {
User user = getUser(); SysUser user = getUser();
user.setSex(dict.getLabel("sys_user_sex", user.getSex())); user.setSex(dictDataService.selectDictLabel("sys_user_sex", user.getSex()));
mmap.put("user", user); mmap.put("user", user);
mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId())); mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId()));
mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId())); mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId()));
@ -60,7 +60,7 @@ public class ProfileController extends BaseController
@ResponseBody @ResponseBody
public boolean checkPassword(String password) public boolean checkPassword(String password)
{ {
User user = getUser(); SysUser user = getUser();
String encrypt = new Md5Hash(user.getLoginName() + password + user.getSalt()).toHex().toString(); String encrypt = new Md5Hash(user.getLoginName() + password + user.getSalt()).toHex().toString();
if (user.getPassword().equals(encrypt)) if (user.getPassword().equals(encrypt))
{ {
@ -79,7 +79,7 @@ public class ProfileController extends BaseController
@Log(title = "重置密码", businessType = BusinessType.UPDATE) @Log(title = "重置密码", businessType = BusinessType.UPDATE)
@PostMapping("/resetPwd") @PostMapping("/resetPwd")
@ResponseBody @ResponseBody
public AjaxResult resetPwd(User user) public AjaxResult resetPwd(SysUser user)
{ {
int rows = userService.resetUserPwd(user); int rows = userService.resetUserPwd(user);
if (rows > 0) if (rows > 0)
@ -116,7 +116,7 @@ public class ProfileController extends BaseController
@Log(title = "个人信息", businessType = BusinessType.UPDATE) @Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PostMapping("/update") @PostMapping("/update")
@ResponseBody @ResponseBody
public AjaxResult update(User user) public AjaxResult update(SysUser user)
{ {
if (userService.updateUserInfo(user) > 0) if (userService.updateUserInfo(user) > 0)
{ {
@ -132,13 +132,13 @@ public class ProfileController extends BaseController
@Log(title = "个人信息", businessType = BusinessType.UPDATE) @Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PostMapping("/updateAvatar") @PostMapping("/updateAvatar")
@ResponseBody @ResponseBody
public AjaxResult updateAvatar(User user, @RequestParam("avatarfile") MultipartFile file) public AjaxResult updateAvatar(SysUser user, @RequestParam("avatarfile") MultipartFile file)
{ {
try try
{ {
if (!file.isEmpty()) if (!file.isEmpty())
{ {
String avatar = FileUploadUtils.upload(RuoYiConfig.getAvatarPath(), file); String avatar = FileUploadUtils.upload(Global.getAvatarPath(), file);
user.setAvatar(avatar); user.setAvatar(avatar);
if (userService.updateUserInfo(user) > 0) if (userService.updateUserInfo(user) > 0)
{ {

@ -1,4 +1,4 @@
package com.ruoyi.project.system.role.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -11,14 +11,15 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.annotation.Log;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.role.domain.Role; import com.ruoyi.system.domain.SysRole;
import com.ruoyi.project.system.role.service.IRoleService; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -32,7 +33,7 @@ public class RoleController extends BaseController
private String prefix = "system/role"; private String prefix = "system/role";
@Autowired @Autowired
private IRoleService roleService; private ISysRoleService roleService;
@RequiresPermissions("system:role:view") @RequiresPermissions("system:role:view")
@GetMapping() @GetMapping()
@ -44,10 +45,10 @@ public class RoleController extends BaseController
@RequiresPermissions("system:role:list") @RequiresPermissions("system:role:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(Role role) public TableDataInfo list(SysRole role)
{ {
startPage(); startPage();
List<Role> list = roleService.selectRoleList(role); List<SysRole> list = roleService.selectRoleList(role);
return getDataTable(list); return getDataTable(list);
} }
@ -55,10 +56,10 @@ public class RoleController extends BaseController
@RequiresPermissions("system:role:export") @RequiresPermissions("system:role:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(Role role) public AjaxResult export(SysRole role)
{ {
List<Role> list = roleService.selectRoleList(role); List<SysRole> list = roleService.selectRoleList(role);
ExcelUtil<Role> util = new ExcelUtil<Role>(Role.class); ExcelUtil<SysRole> util = new ExcelUtil<SysRole>(SysRole.class);
return util.exportExcel(list, "role"); return util.exportExcel(list, "role");
} }
@ -79,8 +80,10 @@ public class RoleController extends BaseController
@PostMapping("/add") @PostMapping("/add")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ResponseBody @ResponseBody
public AjaxResult addSave(Role role) public AjaxResult addSave(SysRole role)
{ {
role.setCreateBy(ShiroUtils.getLoginName());
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(roleService.insertRole(role)); return toAjax(roleService.insertRole(role));
} }
@ -103,8 +106,10 @@ public class RoleController extends BaseController
@PostMapping("/edit") @PostMapping("/edit")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ResponseBody @ResponseBody
public AjaxResult editSave(Role role) public AjaxResult editSave(SysRole role)
{ {
role.setUpdateBy(ShiroUtils.getLoginName());
ShiroUtils.clearCachedAuthorizationInfo();
return toAjax(roleService.updateRole(role)); return toAjax(roleService.updateRole(role));
} }
@ -126,8 +131,9 @@ public class RoleController extends BaseController
@PostMapping("/rule") @PostMapping("/rule")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ResponseBody @ResponseBody
public AjaxResult ruleSave(Role role) public AjaxResult ruleSave(SysRole role)
{ {
role.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(roleService.updateRule(role)); return toAjax(roleService.updateRule(role));
} }
@ -152,7 +158,7 @@ public class RoleController extends BaseController
*/ */
@PostMapping("/checkRoleNameUnique") @PostMapping("/checkRoleNameUnique")
@ResponseBody @ResponseBody
public String checkRoleNameUnique(Role role) public String checkRoleNameUnique(SysRole role)
{ {
return roleService.checkRoleNameUnique(role); return roleService.checkRoleNameUnique(role);
} }
@ -162,7 +168,7 @@ public class RoleController extends BaseController
*/ */
@PostMapping("/checkRoleKeyUnique") @PostMapping("/checkRoleKeyUnique")
@ResponseBody @ResponseBody
public String checkRoleKeyUnique(Role role) public String checkRoleKeyUnique(SysRole role)
{ {
return roleService.checkRoleKeyUnique(role); return roleService.checkRoleKeyUnique(role);
} }

@ -1,4 +1,4 @@
package com.ruoyi.project.system.user.controller; package com.ruoyi.web.controller.system;
import java.util.List; import java.util.List;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -11,17 +11,19 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ExcelUtil;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.framework.shiro.service.PasswordService;
import com.ruoyi.framework.aspectj.lang.annotation.Log; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.system.post.service.IPostService; import com.ruoyi.system.domain.SysUser;
import com.ruoyi.project.system.role.service.IRoleService; import com.ruoyi.system.service.ISysPostService;
import com.ruoyi.project.system.user.domain.User; import com.ruoyi.system.service.ISysRoleService;
import com.ruoyi.project.system.user.service.IUserService; import com.ruoyi.system.service.ISysUserService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *
@ -35,13 +37,16 @@ public class UserController extends BaseController
private String prefix = "system/user"; private String prefix = "system/user";
@Autowired @Autowired
private IUserService userService; private ISysUserService userService;
@Autowired @Autowired
private IRoleService roleService; private ISysRoleService roleService;
@Autowired @Autowired
private IPostService postService; private ISysPostService postService;
@Autowired
private PasswordService passwordService;
@RequiresPermissions("system:user:view") @RequiresPermissions("system:user:view")
@GetMapping() @GetMapping()
@ -53,10 +58,10 @@ public class UserController extends BaseController
@RequiresPermissions("system:user:list") @RequiresPermissions("system:user:list")
@PostMapping("/list") @PostMapping("/list")
@ResponseBody @ResponseBody
public TableDataInfo list(User user) public TableDataInfo list(SysUser user)
{ {
startPage(); startPage();
List<User> list = userService.selectUserList(user); List<SysUser> list = userService.selectUserList(user);
return getDataTable(list); return getDataTable(list);
} }
@ -64,10 +69,10 @@ public class UserController extends BaseController
@RequiresPermissions("system:user:export") @RequiresPermissions("system:user:export")
@PostMapping("/export") @PostMapping("/export")
@ResponseBody @ResponseBody
public AjaxResult export(User user) public AjaxResult export(SysUser user)
{ {
List<User> list = userService.selectUserList(user); List<SysUser> list = userService.selectUserList(user);
ExcelUtil<User> util = new ExcelUtil<User>(User.class); ExcelUtil<SysUser> util = new ExcelUtil<SysUser>(SysUser.class);
return util.exportExcel(list, "user"); return util.exportExcel(list, "user");
} }
@ -90,12 +95,15 @@ public class UserController extends BaseController
@PostMapping("/add") @PostMapping("/add")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ResponseBody @ResponseBody
public AjaxResult addSave(User user) public AjaxResult addSave(SysUser user)
{ {
if (StringUtils.isNotNull(user.getUserId()) && User.isAdmin(user.getUserId())) if (StringUtils.isNotNull(user.getUserId()) && SysUser.isAdmin(user.getUserId()))
{ {
return error("不允许修改超级管理员用户"); return error("不允许修改超级管理员用户");
} }
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
user.setCreateBy(ShiroUtils.getLoginName());
return toAjax(userService.insertUser(user)); return toAjax(userService.insertUser(user));
} }
@ -119,12 +127,13 @@ public class UserController extends BaseController
@PostMapping("/edit") @PostMapping("/edit")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ResponseBody @ResponseBody
public AjaxResult editSave(User user) public AjaxResult editSave(SysUser user)
{ {
if (StringUtils.isNotNull(user.getUserId()) && User.isAdmin(user.getUserId())) if (StringUtils.isNotNull(user.getUserId()) && SysUser.isAdmin(user.getUserId()))
{ {
return error("不允许修改超级管理员用户"); return error("不允许修改超级管理员用户");
} }
user.setUpdateBy(ShiroUtils.getLoginName());
return toAjax(userService.updateUser(user)); return toAjax(userService.updateUser(user));
} }
@ -141,8 +150,10 @@ public class UserController extends BaseController
@Log(title = "重置密码", businessType = BusinessType.UPDATE) @Log(title = "重置密码", businessType = BusinessType.UPDATE)
@PostMapping("/resetPwd") @PostMapping("/resetPwd")
@ResponseBody @ResponseBody
public AjaxResult resetPwd(User user) public AjaxResult resetPwdSave(SysUser user)
{ {
user.setSalt(ShiroUtils.randomSalt());
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
return toAjax(userService.resetUserPwd(user)); return toAjax(userService.resetUserPwd(user));
} }
@ -167,7 +178,7 @@ public class UserController extends BaseController
*/ */
@PostMapping("/checkLoginNameUnique") @PostMapping("/checkLoginNameUnique")
@ResponseBody @ResponseBody
public String checkLoginNameUnique(User user) public String checkLoginNameUnique(SysUser user)
{ {
return userService.checkLoginNameUnique(user.getLoginName()); return userService.checkLoginNameUnique(user.getLoginName());
} }
@ -177,7 +188,7 @@ public class UserController extends BaseController
*/ */
@PostMapping("/checkPhoneUnique") @PostMapping("/checkPhoneUnique")
@ResponseBody @ResponseBody
public String checkPhoneUnique(User user) public String checkPhoneUnique(SysUser user)
{ {
return userService.checkPhoneUnique(user); return userService.checkPhoneUnique(user);
} }
@ -187,7 +198,7 @@ public class UserController extends BaseController
*/ */
@PostMapping("/checkEmailUnique") @PostMapping("/checkEmailUnique")
@ResponseBody @ResponseBody
public String checkEmailUnique(User user) public String checkEmailUnique(SysUser user)
{ {
return userService.checkEmailUnique(user); return userService.checkEmailUnique(user);
} }

@ -1,10 +1,10 @@
package com.ruoyi.project.tool.build; package com.ruoyi.web.controller.tool;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.web.core.base.BaseController;
/** /**
* build * build

@ -1,4 +1,4 @@
package com.ruoyi.project.tool.gen.controller; package com.ruoyi.web.controller.tool;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.support.Convert; import com.ruoyi.common.support.Convert;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.tool.gen.domain.TableInfo; import com.ruoyi.generator.domain.TableInfo;
import com.ruoyi.project.tool.gen.service.IGenService; import com.ruoyi.generator.service.IGenService;
import com.ruoyi.web.core.base.BaseController;
/** /**
* *

@ -1,10 +1,10 @@
package com.ruoyi.project.tool.swagger; package com.ruoyi.web.controller.tool;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.web.core.base.BaseController;
/** /**
* swagger * swagger

@ -1,15 +1,18 @@
package com.ruoyi.project.tool.swagger; package com.ruoyi.web.controller.tool;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.web.core.base.BaseController;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;

@ -1,4 +1,4 @@
package com.ruoyi.framework.web.controller; package com.ruoyi.web.core.base;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.Date; import java.util.Date;
@ -8,13 +8,13 @@ import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.InitBinder;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.ruoyi.common.base.AjaxResult;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.security.ShiroUtils; import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.framework.web.page.PageDomain; import com.ruoyi.framework.web.page.PageDomain;
import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.framework.web.page.TableSupport; import com.ruoyi.framework.web.page.TableSupport;
import com.ruoyi.project.system.user.domain.User; import com.ruoyi.system.domain.SysUser;
/** /**
* web * web
@ -121,12 +121,12 @@ public class BaseController
return StringUtils.format("redirect:{}", url); return StringUtils.format("redirect:{}", url);
} }
public User getUser() public SysUser getUser()
{ {
return ShiroUtils.getUser(); return ShiroUtils.getUser();
} }
public void setUser(User user) public void setUser(SysUser user)
{ {
ShiroUtils.setUser(user); ShiroUtils.setUser(user);
} }

@ -1,8 +1,8 @@
package com.ruoyi.framework.config; package com.ruoyi.web.core.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import com.ruoyi.common.config.Global;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.builders.RequestHandlerSelectors;
@ -21,10 +21,6 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableSwagger2 @EnableSwagger2
public class SwaggerConfig public class SwaggerConfig
{ {
/** 系统基础配置 */
@Autowired
private RuoYiConfig ruoYiConfig;
/** /**
* API * API
*/ */
@ -51,8 +47,8 @@ public class SwaggerConfig
return new ApiInfoBuilder() return new ApiInfoBuilder()
.title("标题若依管理系统_接口文档") .title("标题若依管理系统_接口文档")
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...") .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
.contact(new Contact(ruoYiConfig.getName(), null, null)) .contact(new Contact(Global.getName(), null, null))
.version("版本号:" + ruoYiConfig.getVersion()) .version("版本号:" + Global.getVersion())
.build(); .build();
} }
} }

@ -9,7 +9,7 @@ ruoyi:
# 文件上传路径 # 文件上传路径
profile: D:/profile/ profile: D:/profile/
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: true
# 开发环境配置 # 开发环境配置
server: server:
@ -70,11 +70,11 @@ spring:
# MyBatis # MyBatis
mybatis: mybatis:
# 搜索指定包别名 # 搜索指定包别名
typeAliasesPackage: com.ruoyi.project typeAliasesPackage: com.ruoyi
# 配置mapper的扫描找到所有的mapper.xml映射文件 # 配置mapper的扫描找到所有的mapper.xml映射文件
mapperLocations: classpath:mybatis/**/*Mapper.xml mapperLocations: classpath:mapper/system/*Mapper.xml,classpath:mapper/quartz/*Mapper.xml,classpath:mapper/generator/*Mapper.xml
# 加载全局的配置文件 # 加载全局的配置文件
configLocation: classpath:mybatis/mybatis-config.xml configLocation: classpath:mapper/mybatis-config.xml
# PageHelper分页插件 # PageHelper分页插件
pagehelper: pagehelper:

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save