Pre Merge pull request !158 from Jack_1994/sr-sso
This commit is contained in:
commit
a0b14997f5
91
README.md
91
README.md
|
|
@ -1,90 +1,3 @@
|
|||
## 平台简介
|
||||
# 平台简介
|
||||
|
||||
一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适的。于是利用空闲休息时间开始自己写了一套后台系统。如此有了若依。她可以用于所有的Web应用程序,如网站管理后台,网站会员中心,CMS,CRM,OA。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。
|
||||
|
||||
性别男,若依是给还没有出生女儿取的名字(寓意:你若不离不弃,我必生死相依)
|
||||
|
||||
> 如需前后端分离版本,请移步 [RuoYi-Vue](https://gitee.com/y_project/RuoYi-Vue)
|
||||
|
||||
> 如需单应用,请移步 [RuoYi-fast](https://gitee.com/y_project/RuoYi-fast) `(保持同步更新)`,如需其他版本,请移步 [项目扩展](http://doc.ruoyi.vip/ruoyi/document/xmkz.html) `(不定时更新)`
|
||||
|
||||
> 阿里云通用云产品1888优惠券 :[点我领取](https://www.aliyun.com/minisite/goods?userCode=brki8iof) 腾讯云通用云产品2860优惠券 :[点我领取](https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console) `(仅限新用户)`
|
||||
|
||||
> 阿里云Hi拼购 限量爆款 低至199元/年 [点我进入](https://www.aliyun.com/acts/hi-group-buying?userCode=brki8iof) `(仅限新用户)`
|
||||
|
||||
## 内置功能
|
||||
|
||||
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
|
||||
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
|
||||
3. 岗位管理:配置系统用户所属担任职务。
|
||||
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
|
||||
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
|
||||
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
|
||||
7. 参数管理:对系统动态配置常用参数。
|
||||
8. 通知公告:系统通知公告信息发布维护。
|
||||
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
|
||||
10. 登录日志:系统登录日志记录查询包含登录异常。
|
||||
11. 在线用户:当前系统中活跃用户状态监控。
|
||||
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
|
||||
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
|
||||
14. 系统接口:根据业务代码自动生成相关的api接口文档。
|
||||
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
|
||||
16. 在线构建器:拖动表单元素生成相应的HTML代码。
|
||||
17. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
|
||||
## 在线体验
|
||||
> admin/admin123
|
||||
> 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
|
||||
|
||||
演示地址:http://ruoyi.vip
|
||||
|
||||
文档地址:http://doc.ruoyi.vip
|
||||
|
||||
## 演示图
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/e29fd81b2d43b517f99535564af41f9d1d5.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/629f1510fb6205f773c8c284863406b694f.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/9124eda87df0e72427cd63f458b813e3363.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/438c59467afd0097cfbe9c89db932661687.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/72a015041db6843aca7f7b273688cb346f8.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/ecb5f1c9929f1933f733f796749b2df73d9.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/e4283d500eb10e8dd8701e7742f7facb065.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/2531dbf419a1b114e1177f8d2a120b8a9c3.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/8b740a42dddc1e5a8a150d97c5060df258b.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/00e642dc3515919b3760968cc496a12a849.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/f72d28a3e60413a4e1b5c7c2f45f962fd65.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/19222e495869a2a99fc31c5d2bd4539e1e7.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/264d25176f4e22b4b38e95fe6ce73775299.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/d85fbb59be27fb33f68bdbb6e8bc967c97b.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/bb902d2c54bad02a052e9a05e5f22a93df1.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/30cda883bb9a7f74f1454314e64f949942d.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/deebaaa8d6b14a419ed5911f49e3f222a6f.jpg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/bed2b98a44e7ae820c2885329e711965c28.jpg"/></td>
|
||||
<td><img src="https://oscimg.oschina.net/oscnet/up-6d73c2140ce694e3de4c05035fdc1868d4c.png"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
## 若依交流群
|
||||
|
||||
QQ群: [](https://jq.qq.com/?_wv=1027&k=5HBAaYN) [](https://jq.qq.com/?_wv=1027&k=5cHeRVW) [](https://jq.qq.com/?_wv=1027&k=53R0L5Z) [](https://jq.qq.com/?_wv=1027&k=5g75dCU) [](https://jq.qq.com/?_wv=1027&k=58cPoHA) [](https://jq.qq.com/?_wv=1027&k=5Ofd4Pb) [](https://jq.qq.com/?_wv=1027&k=5yugASz) [](https://jq.qq.com/?_wv=1027&k=5Rf3d2P) [](https://jq.qq.com/?_wv=1027&k=5ZIjaeP) [](https://jq.qq.com/?_wv=1027&k=5CJw1jY) [](https://jq.qq.com/?_wv=1027&k=5omzbKc)
|
||||
## 用于上饶市管理需要接入江西省政务服务网相关应用单点登录的接口
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
若依系统开发环境搭建手册
|
||||
1. 准备工作
|
||||
1.1 前置环境准备 -- -- 安装Maven
|
||||
若依基于Maven管理项目的构建,需要先安装好相应的版本。
|
||||
1.2 开发工具
|
||||
若依系统采用Eclipse作为开发工具。但不局限于Eclipse。此处仅介绍在Eclipse搭建开发环境所需的操作。
|
||||
2. 开发环境搭建
|
||||
2.1 开发工具的配置
|
||||
2.1.1 配置Maven
|
||||
进入Window->Preferences->Maven->Installations页面,设置已经安装好的Maven
|
||||
|
||||
2.1.2 配置Maven仓库路径
|
||||
进入Window->Preferences->Maven->User Settings页面,配置仓库路径
|
||||
|
||||
2.1.4 关闭校验
|
||||
进入Window->Preferences->Validation页面,勾选"Suspend all validators",关闭校验
|
||||
|
||||
2.2 导入工程
|
||||
通过Eclipse导入工程,步骤如下:
|
||||
(1)点击左侧项目区域 -- >Import...
|
||||
(2)选择RuoYi
|
||||
(3)点击Finish(4)RuoYi的代码就被导出到Eclipse中了,此时可以在工程视图中看到。
|
||||
|
||||
3. 运行若依系统
|
||||
3.1 必要的配置
|
||||
3.1.1 修改数据库连接
|
||||
编辑src/main/ resources目录下的application-druid.yml 文件,修改数据库地址账号信息。
|
||||
执行sql/ ry_20180423.sql,quartz.sql 两个文件 日期随版本变化
|
||||
3.1.2 开发环境配置
|
||||
编辑src/main/ resources目录下的application.yml 文件,
|
||||
默认端口为80
|
||||
|
||||
3.1.3 代码生成配置
|
||||
编辑src/main/ resources目录下的application.yml 文件,
|
||||
|
||||
默认为module,根据实际情况修改即可。生成的表要有注释注:如对模板有特殊需求,可自行修改。编辑src/main/ resources/templates/vm目录下
|
||||
|
||||
3.1.4 日志配置
|
||||
编辑src/main/ resources目录下的logback.yml 文件
|
||||
<property name="log.path" value="/home/ruoyi/logs" />
|
||||
改为自己需要的路径
|
||||
<property name="log.path" value="/Users/jyking/project/logs" />
|
||||
3.2 启动及验证
|
||||
启动RuoYiApplication.java 出现如下图表示启动成功
|
||||
打开浏览器,输入:http://localhost:80/若能正确展示登录页面,并能成功登录,登录后菜单及页面展示正常,则表明环境搭建成功。默认密码为 admin/admin123
|
||||
|
||||
演示地址:http://www.ruoyi.club
|
||||
|
||||
|
||||
|
||||
4. 部署若依系统
|
||||
4.1 war部署方式
|
||||
4.1.1 修改pom.xml文件。将jar修改为war
|
||||
|
||||
如果是分模块需要修改ruoyi-admin
|
||||
|
||||
|
||||
4.1.2 在spring-boot-starter依赖中移除tomcat模块
|
||||
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
|
||||
4.1.3 部署到tomcat的webapps目录下面
|
||||
默认为RuoYi.war
|
||||
|
||||
4.1.4 启动及验证
|
||||
运行startup.bat 出现如下图即部署成功
|
||||
4.2 Jar方式部署
|
||||
执行命令:java - jar RuoYi.jar
|
||||
脚本执行:ry.sh start 启动stop 停止
|
||||
|
||||
|
||||
演示地址:ruoyi.vip
|
||||
文档地址:doc.ruoyi.vip
|
||||
1
pom.xml
1
pom.xml
|
|
@ -209,6 +209,7 @@
|
|||
<modules>
|
||||
<module>ruoyi-admin</module>
|
||||
<module>ruoyi-framework</module>
|
||||
<module>ruoyi-sso</module>
|
||||
<module>ruoyi-system</module>
|
||||
<module>ruoyi-quartz</module>
|
||||
<module>ruoyi-generator</module>
|
||||
|
|
|
|||
|
|
@ -73,6 +73,18 @@
|
|||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jodd</groupId>
|
||||
<artifactId>jodd-core</artifactId>
|
||||
<version>5.1.4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jodd</groupId>
|
||||
<artifactId>jodd-http</artifactId>
|
||||
<version>5.1.4</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,88 @@
|
|||
package com.ruoyi.web.controller.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.exception.BusinessException;
|
||||
import com.ruoyi.common.utils.DESUtil;
|
||||
import com.ruoyi.sso.domain.SsoApplication;
|
||||
import com.ruoyi.sso.service.ISsoApplicationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import jodd.http.HttpRequest;
|
||||
import jodd.http.HttpResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api("单点登录")
|
||||
@Controller
|
||||
@RequestMapping("/api/sso")
|
||||
public class SsoApiController extends BaseController {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(SsoApiController.class);
|
||||
|
||||
@Autowired
|
||||
private ISsoApplicationService iSsoApplicationService;
|
||||
|
||||
private final String JXSR_CLIENT_ID = "4802e571a8c94cd9921bc77cd8bf6084";
|
||||
private final String JXSR_SSO_API_KEY = "sr_sso_manager_2020020211000011";
|
||||
|
||||
@ApiOperation("重定向至省网登录")
|
||||
@GetMapping(value = "/redirectUrl")
|
||||
public String redirectUrl(@ApiParam(value = "应用标识", type = "String", required = true) String appKey,
|
||||
@ApiParam(value = "应用密钥", type = "String", required = true) String appSecret) throws Exception {
|
||||
logger.info("appKey = {} ----- appSecret = {}", appKey, appSecret);
|
||||
SsoApplication queryObject = new SsoApplication();
|
||||
queryObject.setAppKey(appKey);
|
||||
queryObject.setAppSecret(appSecret);
|
||||
List<SsoApplication> ssoApplications = iSsoApplicationService.querySsoApplicationByAppKeyAndSecret(queryObject);
|
||||
if (!CollectionUtils.isEmpty(ssoApplications)) {
|
||||
SsoApplication ssoApplication = ssoApplications.get(0);
|
||||
JSONObject queryParamObject = new JSONObject();
|
||||
queryParamObject.put("appKey", ssoApplication.getAppKey());
|
||||
String s = queryParamObject.toString();
|
||||
String resultQueryStr = DESUtil.encrypt(s, JXSR_SSO_API_KEY);
|
||||
return "redirect:https://login.jxzwfww.gov.cn/auth2/authorize.do?redirect_uri=" + resultQueryStr + "&client_id=" + JXSR_CLIENT_ID;
|
||||
}
|
||||
throw new BusinessException("应用不存在!");
|
||||
}
|
||||
|
||||
@ApiOperation("重定向至各个应用回调地址")
|
||||
@GetMapping(value = "/ssoCallBack")
|
||||
public String ssoCallBack(@ApiParam(value = "回调应用加密信息", type = "String") String redirect_uri,
|
||||
@ApiParam(value = "用于搜索数据的ticket", type = "String") String ticket,
|
||||
@ApiParam(value = "登录类型", type = "String") String logintype) throws Exception {
|
||||
logger.info("redirect_uri = {} ----- ticket = {} ----- loginType = {}", redirect_uri, ticket, logintype);
|
||||
String resultJsonStr = DESUtil.decrypt(redirect_uri, JXSR_SSO_API_KEY);
|
||||
JSONObject jsonObject = JSONObject.parseObject(resultJsonStr);
|
||||
String appKey = jsonObject.getString("appKey");
|
||||
SsoApplication queryObject = new SsoApplication();
|
||||
queryObject.setAppKey(appKey);
|
||||
List<SsoApplication> ssoApplications = iSsoApplicationService.querySsoApplicationByAppKeyAndSecret(queryObject);
|
||||
if (!CollectionUtils.isEmpty(ssoApplications)) {
|
||||
SsoApplication ssoApplication = ssoApplications.get(0);
|
||||
return "redirect:" + ssoApplication.getAppCallBackUrl() + "?ticket=" + ticket + "&loginType=" + logintype;
|
||||
}
|
||||
throw new BusinessException("应用不存在!");
|
||||
}
|
||||
|
||||
@ApiOperation("根据ticket获取用户信息")
|
||||
@GetMapping(value = "/validateTicket", produces = "application/json;charset=utf-8")
|
||||
@ResponseBody
|
||||
public String validateTicket(@ApiParam(value = "回调中获取的ticket值", type = "String", required = true) String ticket) {
|
||||
logger.info("ticket = {}", ticket);
|
||||
HttpResponse response = HttpRequest.post("https://login.jxzwfww.gov.cn/auth2/validationTicket.do")
|
||||
.form("ticket", ticket)
|
||||
.form("clientId", JXSR_CLIENT_ID)
|
||||
.send();
|
||||
return response.bodyText();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
package com.ruoyi.web.controller.sso;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.ruoyi.framework.util.ShiroUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.util.Base64Utils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.sso.domain.SsoApplication;
|
||||
import com.ruoyi.sso.service.ISsoApplicationService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 单点登录应用Controller
|
||||
*
|
||||
* @author shixueshu
|
||||
* @date 2020-03-23
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/sso/ssoApplication")
|
||||
public class SsoApplicationController extends BaseController
|
||||
{
|
||||
private String prefix = "sso/ssoApplication";
|
||||
|
||||
@Autowired
|
||||
private ISsoApplicationService ssoApplicationService;
|
||||
|
||||
@RequiresPermissions("sso:ssoApplication:view")
|
||||
@GetMapping()
|
||||
public String ssoApplication()
|
||||
{
|
||||
return prefix + "/ssoApplication";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单点登录应用列表
|
||||
*/
|
||||
@RequiresPermissions("sso:ssoApplication:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(SsoApplication ssoApplication)
|
||||
{
|
||||
startPage();
|
||||
List<SsoApplication> list = ssoApplicationService.selectSsoApplicationList(ssoApplication);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出单点登录应用列表
|
||||
*/
|
||||
@RequiresPermissions("sso:ssoApplication:export")
|
||||
@Log(title = "单点登录应用", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(SsoApplication ssoApplication)
|
||||
{
|
||||
List<SsoApplication> list = ssoApplicationService.selectSsoApplicationList(ssoApplication);
|
||||
ExcelUtil<SsoApplication> util = new ExcelUtil<SsoApplication>(SsoApplication.class);
|
||||
return util.exportExcel(list, "templates/sso/ssoApplication");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单点登录应用
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add(Model model)
|
||||
{
|
||||
String appSecret = Base64Utils.encodeToString(UUID.randomUUID().toString().getBytes());
|
||||
model.addAttribute("appSecret", appSecret);
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存单点登录应用
|
||||
*/
|
||||
@RequiresPermissions("sso:ssoApplication:add")
|
||||
@Log(title = "单点登录应用", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(SsoApplication ssoApplication)
|
||||
{
|
||||
ssoApplication.setCreateBy(ShiroUtils.getLoginName());
|
||||
ssoApplication.setStatus("1");
|
||||
return toAjax(ssoApplicationService.insertSsoApplication(ssoApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单点登录应用
|
||||
*/
|
||||
@GetMapping("/edit/{appId}")
|
||||
public String edit(@PathVariable("appId") Long appId, ModelMap mmap)
|
||||
{
|
||||
SsoApplication ssoApplication = ssoApplicationService.selectSsoApplicationById(appId);
|
||||
mmap.put("ssoApplication", ssoApplication);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存单点登录应用
|
||||
*/
|
||||
@RequiresPermissions("sso:ssoApplication:edit")
|
||||
@Log(title = "单点登录应用", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(SsoApplication ssoApplication)
|
||||
{
|
||||
ssoApplication.setUpdateBy(ShiroUtils.getLoginName());
|
||||
return toAjax(ssoApplicationService.updateSsoApplication(ssoApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单点登录应用
|
||||
*/
|
||||
@RequiresPermissions("sso:ssoApplication:remove")
|
||||
@Log(title = "单点登录应用", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(ssoApplicationService.deleteSsoApplicationByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -1,175 +0,0 @@
|
|||
package com.ruoyi.web.controller.tool;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* swagger 用户测试方法
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Api("用户信息管理")
|
||||
@RestController
|
||||
@RequestMapping("/test/user")
|
||||
public class TestController extends BaseController
|
||||
{
|
||||
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
|
||||
{
|
||||
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
|
||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户列表")
|
||||
@GetMapping("/list")
|
||||
public AjaxResult userList()
|
||||
{
|
||||
List<UserEntity> userList = new ArrayList<UserEntity>(users.values());
|
||||
return AjaxResult.success(userList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户详细")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
|
||||
@GetMapping("/{userId}")
|
||||
public AjaxResult getUser(@PathVariable Integer userId)
|
||||
{
|
||||
if (!users.isEmpty() && users.containsKey(userId))
|
||||
{
|
||||
return AjaxResult.success(users.get(userId));
|
||||
}
|
||||
else
|
||||
{
|
||||
return error("用户不存在");
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("新增用户")
|
||||
@ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity")
|
||||
@PostMapping("/save")
|
||||
public AjaxResult save(UserEntity user)
|
||||
{
|
||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
||||
{
|
||||
return error("用户ID不能为空");
|
||||
}
|
||||
return AjaxResult.success(users.put(user.getUserId(), user));
|
||||
}
|
||||
|
||||
@ApiOperation("更新用户")
|
||||
@ApiImplicitParam(name = "userEntity", value = "新增用户信息", dataType = "UserEntity")
|
||||
@PutMapping("/update")
|
||||
public AjaxResult update(UserEntity user)
|
||||
{
|
||||
if (StringUtils.isNull(user) || StringUtils.isNull(user.getUserId()))
|
||||
{
|
||||
return error("用户ID不能为空");
|
||||
}
|
||||
if (users.isEmpty() || !users.containsKey(user.getUserId()))
|
||||
{
|
||||
return error("用户不存在");
|
||||
}
|
||||
users.remove(user.getUserId());
|
||||
return AjaxResult.success(users.put(user.getUserId(), user));
|
||||
}
|
||||
|
||||
@ApiOperation("删除用户信息")
|
||||
@ApiImplicitParam(name = "userId", value = "用户ID", required = true, dataType = "int", paramType = "path")
|
||||
@DeleteMapping("/{userId}")
|
||||
public AjaxResult delete(@PathVariable Integer userId)
|
||||
{
|
||||
if (!users.isEmpty() && users.containsKey(userId))
|
||||
{
|
||||
users.remove(userId);
|
||||
return success();
|
||||
}
|
||||
else
|
||||
{
|
||||
return error("用户不存在");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ApiModel("用户实体")
|
||||
class UserEntity
|
||||
{
|
||||
@ApiModelProperty("用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("用户名称")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("用户密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty("用户手机")
|
||||
private String mobile;
|
||||
|
||||
public UserEntity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public UserEntity(Integer userId, String username, String password, String mobile)
|
||||
{
|
||||
this.userId = userId;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public Integer getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getUsername()
|
||||
{
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username)
|
||||
{
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword()
|
||||
{
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password)
|
||||
{
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getMobile()
|
||||
{
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile)
|
||||
{
|
||||
this.mobile = mobile;
|
||||
}
|
||||
}
|
||||
|
|
@ -50,9 +50,9 @@ public class SwaggerConfig
|
|||
// 用ApiInfoBuilder进行定制
|
||||
return new ApiInfoBuilder()
|
||||
// 设置标题
|
||||
.title("标题:若依管理系统_接口文档")
|
||||
.title("标题:江西省上饶市政务服务网单点登录_接口文档")
|
||||
// 描述
|
||||
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
|
||||
.description("描述:主要为上饶市对接省政务服务网单点登录接口服务")
|
||||
// 作者信息
|
||||
.contact(new Contact(Global.getName(), null, null))
|
||||
// 版本
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ spring:
|
|||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://localhost:3306/shangrao_sso_manager?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: password
|
||||
password: shixueshu
|
||||
# 从库数据源
|
||||
slave:
|
||||
# 从数据源开关/默认关闭
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
# 项目相关配置
|
||||
ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
name: 上饶省政务服务网单点登陆
|
||||
# 版本
|
||||
version: 4.2.0
|
||||
version: 1.0.0
|
||||
# 版权年份
|
||||
copyrightYear: 2019
|
||||
copyrightYear: 2020
|
||||
# 实例演示开关
|
||||
demoEnabled: true
|
||||
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
|
||||
|
|
@ -127,4 +127,4 @@ xss:
|
|||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice/*
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*,/sso/*
|
||||
|
|
|
|||
|
|
@ -46,12 +46,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-home"></i> <span class="nav-label">主页</span> <span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level">
|
||||
<li><a class="menuItem" th:href="@{/system/main}">了解若依</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li th:each="menu : ${menus}">
|
||||
<a th:class="@{${menu.url != '' && menu.url != '#'} ? ${menu.target}}" th:href="@{${menu.url == ''} ? |#| : ${menu.url}}">
|
||||
<i class="fa fa-bar-chart-o" th:class="${menu.icon}"></i>
|
||||
|
|
@ -74,97 +68,6 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li th:if="${demoEnabled}">
|
||||
<a href="#"><i class="fa fa-desktop"></i><span class="nav-label">实例演示</span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li> <a>表单<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/form/button}">按钮</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/grid}">栅格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/select}">下拉框</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/timeline}">时间轴</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/basic}">基本表单</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/cards}">卡片列表</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/jasny}">功能扩展</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/sortable}">拖动排序</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/tabs_panels}">选项卡 & 面板</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/validate}">表单校验</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/wizard}">表单向导</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/upload}">文件上传</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/datetime}">日期和时间</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/summernote}">富文本编辑器</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/duallistbox}">左右互选组件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/form/autocomplete}">搜索自动补全</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>表格<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/table/search}">查询条件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/footer}">数据汇总</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/groupHeader}">组合表头</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/export}">表格导出</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/remember}">翻页记住选择</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/pageGo}">跳转至指定页</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/params}">自定义查询参数</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/multi}">初始多表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/button}">点击按钮加载表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/child}">表格父子视图</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/image}">表格图片预览</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/reorder}">表格拖拽操作</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>弹框<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/dialog}">模态窗口</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/layer}">弹层组件</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/modal/table}">弹层表格</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>操作<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/operate/table}">表格</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/operate/other}">其他</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>报表<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/report/echarts}">百度ECharts</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/peity}">peity</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/sparkline}">sparkline</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/report/metrics}">图表组合</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li> <a>图标<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li><a class="menuItem" th:href="@{/demo/icon/fontawesome}">Font Awesome</a></li>
|
||||
<li><a class="menuItem" th:href="@{/demo/icon/glyphicons}">Glyphicons</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#"><i class="fa fa-sitemap"></i> <span class="nav-label">四层菜单 </span><span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-second-level collapse">
|
||||
<li>
|
||||
<a href="#" id="damian">三级菜单1<span class="fa arrow"></span></a>
|
||||
<ul class="nav nav-third-level">
|
||||
<li>
|
||||
<a href="#">四级菜单1</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#">四级菜单2</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="#">三级菜单2</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
|
@ -180,8 +83,6 @@
|
|||
</a>
|
||||
</div>
|
||||
<ul class="nav navbar-top-links navbar-right welcome-message">
|
||||
<li><a title="视频教程" href="http://doc.ruoyi.vip/ruoyi/document/spjc.html" target="_blank"><i class="fa fa-video-camera"></i> 视频教程</a></li>
|
||||
<li><a title="开发文档" href="http://doc.ruoyi.vip" target="_blank"><i class="fa fa-question-circle"></i> 开发文档</a></li>
|
||||
<li><a title="全屏显示" href="javascript:void(0)" id="fullScreen"><i class="fa fa-arrows-alt"></i> 全屏显示</a></li>
|
||||
<li class="dropdown user-menu">
|
||||
<a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
|
||||
|
|
@ -197,10 +98,6 @@
|
|||
<a onclick="resetPwd()">
|
||||
<i class="fa fa-key"></i> 修改密码</a>
|
||||
</li>
|
||||
<li>
|
||||
<a onclick="switchSkin()">
|
||||
<i class="fa fa-dashboard"></i> 切换主题</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li>
|
||||
<a th:href="@{logout}">
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@
|
|||
<form id="signupForm" autocomplete="off">
|
||||
<h4 class="no-margins">登录:</h4>
|
||||
<p class="m-t-md">你若不离不弃,我必生死相依</p>
|
||||
<input type="text" name="username" class="form-control uname" placeholder="用户名" value="admin" />
|
||||
<input type="password" name="password" class="form-control pword" placeholder="密码" value="admin123" />
|
||||
<input type="text" name="username" class="form-control uname" placeholder="用户名" value="" />
|
||||
<input type="password" name="password" class="form-control pword" placeholder="密码" value="" />
|
||||
<div class="row m-t" th:if="${captchaEnabled==true}">
|
||||
<div class="col-xs-6">
|
||||
<input type="text" name="validateCode" class="form-control code" placeholder="验证码" maxlength="5" />
|
||||
|
|
|
|||
|
|
@ -16,911 +16,11 @@
|
|||
<div class="row border-bottom white-bg dashboard-header">
|
||||
<div class="col-sm-12">
|
||||
<blockquote class="text-warning" style="font-size:14px">
|
||||
领取阿里云通用云产品1888优惠券
|
||||
<br><a target="_blank" href="https://www.aliyun.com/minisite/goods?userCode=brki8iof">https://www.aliyun.com/minisite/goods?userCode=brki8iof</a><br>
|
||||
领取腾讯云通用云产品2860优惠券
|
||||
<br><a target="_blank" href="https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console">https://cloud.tencent.com/redirect.php?redirect=1025&cps_key=198c8df2ed259157187173bc7f4f32fd&from=console</a><br>
|
||||
<h4 class="text-danger">云产品通用红包,可叠加官网常规优惠使用。(仅限新用户)</h4>
|
||||
<h1>上饶市省政务服务网单点登陆管理平台</h1>
|
||||
</blockquote>
|
||||
|
||||
<hr>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<h2>Hello,Guest</h2>
|
||||
<small>移动设备访问请扫描以下二维码:</small>
|
||||
<br>
|
||||
<br>
|
||||
<img th:src="@{/img/qr_code.png}" width="100%" style="max-width:264px;">
|
||||
<br>
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
<h2>若依后台管理框架</h2>
|
||||
<p>一直想做一款后台管理系统,看了很多优秀的开源项目但是发现没有合适自己的。于是利用空闲休息时间开始自己写一套后台系统。如此有了若依管理系统。,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。所有前端后台代码封装过后十分精简易上手,出错概率低。同时支持移动客户端访问。系统会陆续更新一些实用功能。</p>
|
||||
<p>
|
||||
<b>当前版本:</b><span>v[[${version}]]</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">¥免费开源</span>
|
||||
</p>
|
||||
<br>
|
||||
<p>
|
||||
<a class="btn btn-success btn-outline" href="https://gitee.com/y_project/RuoYi" target="_blank">
|
||||
<i class="fa fa-cloud"> </i> 访问码云
|
||||
</a>
|
||||
<a class="btn btn-white btn-bitbucket" href="http://ruoyi.vip" target="_blank">
|
||||
<i class="fa fa-home"></i> 访问主页
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<h4>技术选型:</h4>
|
||||
<ol>
|
||||
<li>核心框架:Spring Boot。</li>
|
||||
<li>安全框架:Apache Shiro。</li>
|
||||
<li>模板引擎:Thymeleaf。</li>
|
||||
<li>持久层框架:MyBatis。</li>
|
||||
<li>定时任务:Quartz。</li>
|
||||
<li>数据库连接池:Druid。</li>
|
||||
<li>工具类:Fastjson。</li>
|
||||
<li>更多……</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>联系信息</h5>
|
||||
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<p><i class="fa fa-send-o"></i> 官网:<a href="http://www.ruoyi.vip" target="_blank">http://www.ruoyi.vip</a>
|
||||
</p>
|
||||
<p><i class="fa fa-qq"></i> QQ群:<s>满1389287</s> <s>满1679294</s> <s>满1529866</s> <s>满1772718</s> <s>满1366522</s> <s>满1382251</s> <s>满1145125</s> <s>满86752435</s> <s>满134072510</s> <s>满210336300</s> <a href="https://jq.qq.com/?_wv=1027&k=5omzbKc" target="_blank">339522636</a>
|
||||
</p>
|
||||
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
|
||||
</p>
|
||||
<p><i class="fa fa-credit-card"></i> 支付宝:<a href="javascript:;" class="支付宝信息">/ *若依</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>更新日志</h5>
|
||||
</div>
|
||||
<div class="ibox-content no-padding">
|
||||
<div class="panel-body">
|
||||
<div class="panel-group" id="version">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v42">v4.2.0</a><code class="pull-right">2020.03.23</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v42" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>用户管理添加分配角色页面</li>
|
||||
<li>定时任务添加调度日志按钮</li>
|
||||
<li>新增是否开启用户注册功能</li>
|
||||
<li>新增页面滚动显示返回顶部按钮</li>
|
||||
<li>用户&角色&任务添加更多操作按钮</li>
|
||||
<li>iframe框架页会话过期弹出超时提示</li>
|
||||
<li>移动端登录不显示左侧菜单</li>
|
||||
<li>侧边栏添加一套深蓝色主题</li>
|
||||
<li>首页logo固定,不随菜单滚动</li>
|
||||
<li>支持mode配置history(表示去掉地址栏的#)</li>
|
||||
<li>任务分组字典翻译(调度日志详细)</li>
|
||||
<li>字典管理添加缓存读取</li>
|
||||
<li>字典数据列表标签显示样式</li>
|
||||
<li>参数管理支持缓存操作</li>
|
||||
<li>日期控件清空结束时间设置开始默认值为2099-12-31</li>
|
||||
<li>表格树添加获取数据后响应回调处理</li>
|
||||
<li>批量替换表前缀调整</li>
|
||||
<li>支持表格导入模板的弹窗表单加入其它输入控件</li>
|
||||
<li>表单重置刷新表格树</li>
|
||||
<li>新增支持导出数据字段排序</li>
|
||||
<li>新增表格参数(是否单选checkbox)</li>
|
||||
<li>druid未授权不允许访问</li>
|
||||
<li>表格树父节点兼容0,'0','',null</li>
|
||||
<li>表单必填的项添加星号</li>
|
||||
<li>修复select2不显示校验错误信息</li>
|
||||
<li>添加自定义HTML过滤器</li>
|
||||
<li>修复多数据源下开关关闭出现异常问题</li>
|
||||
<li>修复翻页记住选择项数据问题</li>
|
||||
<li>用户邮箱长度限制20</li>
|
||||
<li>修改错误页面返回主页出现嵌套问题</li>
|
||||
<li>表格浮动提示单双引号转义</li>
|
||||
<li>支持配置四级菜单</li>
|
||||
<li>升级shiro到最新版1.4.2 阻止rememberMe漏洞攻击</li>
|
||||
<li>升级summernote到最新版本v0.8.12</li>
|
||||
<li>导入Excel根据dateFormat属性格式处理</li>
|
||||
<li>修复War部署无法正常shutdown,ehcache内存泄漏</li>
|
||||
<li>修复代码生成短字段无法识别问题</li>
|
||||
<li>修复serviceImpl模版,修改方法判断日期错误</li>
|
||||
<li>代码生成模板增加导出功能日志记录</li>
|
||||
<li>代码生成唯一编号调整为tableId</li>
|
||||
<li>代码生成查询时忽略大小写</li>
|
||||
<li>代码生成支持翻页记住选中</li>
|
||||
<li>代码生成表注释未填写也允许导入</li>
|
||||
<li>Global全局配置类修改为注解,防止多环境配置下读取问题</li>
|
||||
<li>修复多表格情况下,firstLoad只对第一个表格生效</li>
|
||||
<li>处理Maven打包出现警告问题</li>
|
||||
<li>默认主题样式,防止网速慢情况下出现空白</li>
|
||||
<li>修复文件上传多级目录识别问题</li>
|
||||
<li>锚链接解码url,防止中文导致页面不能加载问题</li>
|
||||
<li>修复右键Tab页刷新事件重复请求问题</li>
|
||||
<li>角色禁用&菜单隐藏不查询权限</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v41">v4.1.0</a><code class="pull-right">2019.10.22</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v41" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>支持多表格实例操作</li>
|
||||
<li>浮动提示方法tooltip支持弹窗</li>
|
||||
<li>代码生成&字典数据支持模糊条件查询</li>
|
||||
<li>增加页签全屏方法</li>
|
||||
<li>增加清除表单验证错误信息方法</li>
|
||||
<li>支持iframe局部刷新页面</li>
|
||||
<li>支持在线切换主题</li>
|
||||
<li>修改图片预览设置的高宽参数颠倒问题</li>
|
||||
<li>操作日志新增解锁账户功能</li>
|
||||
<li>管理员用户&角色不允许操作</li>
|
||||
<li>去掉jsoup包调用自定义转义工具</li>
|
||||
<li>添加时间轴示例</li>
|
||||
<li>修复翻页记住选择时获取指定列值的问题</li>
|
||||
<li>代码生成sql脚本添加导出按钮</li>
|
||||
<li>添加表格父子视图示例</li>
|
||||
<li>添加表格行内编辑示例</li>
|
||||
<li>升级fastjson到最新版1.2.60 阻止漏洞攻击</li>
|
||||
<li>升级echarts到最新版4.2.1</li>
|
||||
<li>操作日志新增返回参数</li>
|
||||
<li>支持mybatis通配符扫描任意多个包</li>
|
||||
<li>权限验证多种情况处理</li>
|
||||
<li>修复树形类型的代码生成的部分必要属性无法显示</li>
|
||||
<li>修复非表格插件情况下重置出现异常</li>
|
||||
<li>修复富文本编辑器有序列表冲突</li>
|
||||
<li>代码生成表前缀配置支持多个</li>
|
||||
<li>修复自动去除表前缀配置无效问题</li>
|
||||
<li>菜单列表按钮数据可见不显示(权限标识控制)</li>
|
||||
<li>修复设置会话超时时间无效问题</li>
|
||||
<li>新增本地资源通用下载方法</li>
|
||||
<li>操作日志记录新增请求方式</li>
|
||||
<li>代码生成单选按钮属性重名修复</li>
|
||||
<li>优化select2下拉框宽度不会随浏览器改变</li>
|
||||
<li>修复代码生成树表异常</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v40">v4.0.0</a><code class="pull-right">2019.08.08</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v40" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>代码生成支持预览、编辑,保存方案</li>
|
||||
<li>新增防止表单重复提交注解</li>
|
||||
<li>新增后端校验(和前端保持一致)</li>
|
||||
<li>新增同一个用户最大会话数控制</li>
|
||||
<li>Excel导出子对象支持多个字段</li>
|
||||
<li>定时任务支持静态调用和多参数</li>
|
||||
<li>定时任务增加分组条件查询</li>
|
||||
<li>字典类型增加任务分组数据</li>
|
||||
<li>新增表格是否首次加载数据</li>
|
||||
<li>新增parentTab选项卡可在同一页签打开</li>
|
||||
<li>多数据源支持类注解(允许继承父类的注解)</li>
|
||||
<li>部门及以下数据权限(调整为以下及所有子节点)</li>
|
||||
<li>新增角色数据权限配(仅本人数据权限)</li>
|
||||
<li>修改菜单权限显示问题</li>
|
||||
<li>上传文件修改路径及返回名称</li>
|
||||
<li>添加报表插件及示例</li>
|
||||
<li>添加首页统计模板</li>
|
||||
<li>添加表格拖拽示例</li>
|
||||
<li>添加卡片列表示例</li>
|
||||
<li>添加富文本编辑器示例</li>
|
||||
<li>添加表格动态增删改查示例</li>
|
||||
<li>添加用户页面岗位选择框提示</li>
|
||||
<li>点击菜单操作添加背景高亮显示</li>
|
||||
<li>表格树新增showSearch是否显示检索信息</li>
|
||||
<li>解决表格列设置sortName无效问题</li>
|
||||
<li>表格图片预览支持自定义设置宽高</li>
|
||||
<li>添加表格列浮动提示(单击文本复制)</li>
|
||||
<li>PC端收起菜单后支持浮动显示</li>
|
||||
<li>详细操作样式调整</li>
|
||||
<li>修改用户更新描述空串不更新问题</li>
|
||||
<li>导入修改为模板渲染</li>
|
||||
<li>修改菜单及部门排序规则</li>
|
||||
<li>角色导出数据范围表达式翻译</li>
|
||||
<li>添加summernote富文本字体大小</li>
|
||||
<li>优化表格底部下边框防重叠&汇总像素问题</li>
|
||||
<li>树表格支持属性多层级访问</li>
|
||||
<li>修复IE浏览器用户管理界面右侧留白问题</li>
|
||||
<li>重置按钮刷新表格</li>
|
||||
<li>重置密码更新用户缓存</li>
|
||||
<li>优化验证码属性参数</li>
|
||||
<li>支持数据监控配置用户名和密码</li>
|
||||
<li>文件上传修改按钮背景及加载动画</li>
|
||||
<li>支持配置一级菜单href跳转</li>
|
||||
<li>侧边栏添加一套浅色主题</li>
|
||||
<li>树表格添加回调函数(校验异常状态)</li>
|
||||
<li>用户个人中心适配手机端显示</li>
|
||||
<li>Excel支持设置导出类型&更换样式</li>
|
||||
<li>检查属性改变修改为克隆方式(防止热部署强转异常)</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v34">v3.4.0</a><code class="pull-right">2019.06.03</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v34" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增实例演示菜单及demo</li>
|
||||
<li>新增页签右键操作</li>
|
||||
<li>菜单管理新增打开方式</li>
|
||||
<li>新增点击某行触发的事件</li>
|
||||
<li>新增双击某行触发的事件</li>
|
||||
<li>新增单击某格触发的事件</li>
|
||||
<li>新增双击某格触发的事件</li>
|
||||
<li>新增是否启用显示细节视图</li>
|
||||
<li>支持上传任意格式文件</li>
|
||||
<li>修复角色权限注解失效问题</li>
|
||||
<li>左侧的菜单栏宽度调整</li>
|
||||
<li>新增响应完成后自定义回调函数</li>
|
||||
<li>支持前端及其他模块直接获取用户信息</li>
|
||||
<li>升级swagger到最新版2.9.2</li>
|
||||
<li>升级jquery.slimscroll到最新版1.3.8</li>
|
||||
<li>升级select2到最新版4.0.7</li>
|
||||
<li>新增角色配置本部门数据权限</li>
|
||||
<li>新增角色配置本部门及以下数据权限</li>
|
||||
<li>优化底部操作防止跳到页面顶端</li>
|
||||
<li>修改冻结列选框无效及样式问题</li>
|
||||
<li>修复部门四层级修改祖级无效问题</li>
|
||||
<li>更换开关切换按钮样式</li>
|
||||
<li>新增select2-bootstrap美化下拉框</li>
|
||||
<li>添加表格内图片预览方法</li>
|
||||
<li>修复权限校验失败跳转页面路径错误</li>
|
||||
<li>国际化资源文件调整</li>
|
||||
<li>通知公告布局调整</li>
|
||||
<li>删除页签操作功能</li>
|
||||
<li>表格树新增查询指定列值</li>
|
||||
<li>更改系统接口扫描方式及完善测试案例</li>
|
||||
<li>表格列浮动提示及字典回显默认去背景</li>
|
||||
<li>修复启用翻页记住前面的选择check没选中问题</li>
|
||||
<li>去除监控页面底部的广告</li>
|
||||
<li>日期控件功问题修复及data功能增强</li>
|
||||
<li>新增角色权限可见性(前端直接调用)</li>
|
||||
<li>新增获取当前登录用户方法(前端及子模块调用)</li>
|
||||
<li>修复热部署重启导致菜单丢失问题</li>
|
||||
<li>优化业务校验失败普通请求跳转页面</li>
|
||||
<li>操作日志新增状态条件查询</li>
|
||||
<li>操作类型支持多选条件查询</li>
|
||||
<li>通知公告防止滚动触底回弹优化</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v33">v3.3.0</a><code class="pull-right">2019.04.01</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v33" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增线程池统一管理</li>
|
||||
<li>新增支持左右冻结列</li>
|
||||
<li>新增表格字符超长浮动提示</li>
|
||||
<li>升级datepicker拓展并汉化</li>
|
||||
<li>升级druid到最新版本v1.1.14</li>
|
||||
<li>修复个人头像为图片服务器跨域问题</li>
|
||||
<li>修改上传文件按日期存储</li>
|
||||
<li>新增表格客户端分页选项</li>
|
||||
<li>新增表格的高度参数</li>
|
||||
<li>新增表格销毁方法</li>
|
||||
<li>新增表格下拉按钮切换方法</li>
|
||||
<li>新增表格分页跳转到指定页码</li>
|
||||
<li>新增表格启用点击选中行参数</li>
|
||||
<li>修复表格数据重新加载未触发部分按钮禁用</li>
|
||||
<li>使用jsonview展示操作日志参数</li>
|
||||
<li>新增方法(addTab、editTab)</li>
|
||||
<li>修改用户管理界面为Tab打开方式</li>
|
||||
<li>表单验证代码优化</li>
|
||||
<li>修复@Excel注解 prompt 属性使用报错</li>
|
||||
<li>修复combo属性Excel兼容性问题</li>
|
||||
<li>新增@Excel导入导出支持父类字段</li>
|
||||
<li>修复关闭最后选项卡无法激活滚动问题</li>
|
||||
<li>增加日期控件显示类型及回显格式扩展选项</li>
|
||||
<li>修复定时任务执行失败后入库状态为成功状态</li>
|
||||
<li>支持定时任务并发开关控制</li>
|
||||
<li>优化权限校验失败普通请求跳转页面</li>
|
||||
<li>捕获线程池执行任务抛出的异常</li>
|
||||
<li>修复IE浏览器导出功能报错</li>
|
||||
<li>新增角色管理分配用户功能</li>
|
||||
<li>新增表格翻页记住前面的选择</li>
|
||||
<li>调整用户个人中心页面</li>
|
||||
<li>修复界面存在的一些安全问题</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v32">v3.2.0</a><code class="pull-right">2019.01.18</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v32" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>部门修改时不允许选择最后节点</li>
|
||||
<li>修复部门菜单排序字段无效</li>
|
||||
<li>修复光驱磁盘导致服务监控异常</li>
|
||||
<li>登录界面去除check插件</li>
|
||||
<li>验证码文本字符间距修正</li>
|
||||
<li>升级SpringBoot到最新版本2.1.1</li>
|
||||
<li>升级MYSQL驱动</li>
|
||||
<li>修正登录必填项位置偏移</li>
|
||||
<li>Session会话检查优化</li>
|
||||
<li>Excel注解支持多级获取</li>
|
||||
<li>新增序列号生成方法</li>
|
||||
<li>修复WAR部署tomcat退出线程异常</li>
|
||||
<li>全屏操作增加默认确认/关闭</li>
|
||||
<li>修复个人信息可能导致漏洞</li>
|
||||
<li>字典数据根据下拉选择新增类型</li>
|
||||
<li>升级Summernote到最新版本v0.8.11</li>
|
||||
<li>新增用户数据导入</li>
|
||||
<li>首页主题样式更换</li>
|
||||
<li>layer扩展主题更换</li>
|
||||
<li>用户管理移动端默认隐藏左侧布局</li>
|
||||
<li>详细信息弹出层显示在顶层</li>
|
||||
<li>表格支持切换状态(用户/角色/定时任务)</li>
|
||||
<li>Druid数据源支持配置继承</li>
|
||||
<li>修正部分iPhone手机端表格适配问题</li>
|
||||
<li>新增防止重复提交表单方法</li>
|
||||
<li>新增表格数据统计汇总方法</li>
|
||||
<li>支持富文本上传图片文件</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v31">v3.1.0</a><code class="pull-right">2018.12.03</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v31" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增内网不获取IP地址</li>
|
||||
<li>新增cron表达式有效校验</li>
|
||||
<li>定时任务新增详细信息</li>
|
||||
<li>定时任务默认策略修改(不触发立即执行)</li>
|
||||
<li>定时任务显示下一个执行周期</li>
|
||||
<li>支持前端任意日期格式处理</li>
|
||||
<li>上传头像删除多余提交按钮</li>
|
||||
<li>表格增加行间隔色配置项</li>
|
||||
<li>表格增加转义HTML字符串配置项</li>
|
||||
<li>表格增加显示/隐藏指定列</li>
|
||||
<li>代码生成优化</li>
|
||||
<li>操作日志参数格式化显示</li>
|
||||
<li>页签新增新增全屏显示</li>
|
||||
<li>新增一键打包部署</li>
|
||||
<li>Excel注解新增多个参数</li>
|
||||
<li>新增提交静默更新表格方法</li>
|
||||
<li>新增服务监控菜单</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v30">v3.0.0</a><code class="pull-right">2018.10.08</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v30" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>升级poi到最新版3.17</li>
|
||||
<li>导出修改临时目录绝对路径</li>
|
||||
<li>升级laydate到最新版5.0.9</li>
|
||||
<li>升级SpringBoot到最新版本2.0.5</li>
|
||||
<li>优化开始/结束时间校验限制</li>
|
||||
<li>重置密码参数表中获取默认值</li>
|
||||
<li>修复头像修改显示问题</li>
|
||||
<li>新增数据权限过滤注解</li>
|
||||
<li>新增表格检索折叠按钮</li>
|
||||
<li>新增清空(登录、操作、调度)日志</li>
|
||||
<li>固定按钮位置(提交/关闭)</li>
|
||||
<li>部门/菜单支持(展开/折叠)</li>
|
||||
<li>部分细节调整优化</li>
|
||||
<li>项目采用分模块</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v24">v2.4.0</a><code class="pull-right">2018.09.03</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v24" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>支持部门多级查询</li>
|
||||
<li>修复菜单状态查询无效</li>
|
||||
<li>支持IP地址开关</li>
|
||||
<li>支持XSS开关</li>
|
||||
<li>记录日志异步处理</li>
|
||||
<li>字典回显样式更改为下拉框</li>
|
||||
<li>菜单类型必填校验</li>
|
||||
<li>修复在线用户排序报错</li>
|
||||
<li>增加重置按钮</li>
|
||||
<li>支持注解导入数据</li>
|
||||
<li>支持弹层外区域关闭</li>
|
||||
<li>备注更换为文本区域</li>
|
||||
<li>新增角色逻辑删除</li>
|
||||
<li>新增部门逻辑删除</li>
|
||||
<li>支持部门数据权限</li>
|
||||
<li>管理员默认拥有所有授权</li>
|
||||
<li>字典数据采用分页</li>
|
||||
<li>部分细节调整优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v23">v2.3.0</a><code class="pull-right">2018.08.06</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v23" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>支持表格不分页开关控制</li>
|
||||
<li>修改字典类型同步修改字典数据</li>
|
||||
<li>代码生成新增修改后缀处理</li>
|
||||
<li>代码生成新增实体toString</li>
|
||||
<li>代码生成非字符串去除!=''</li>
|
||||
<li>导出数据前加载遮罩层</li>
|
||||
<li>部门删除校验条件修改</li>
|
||||
<li>搜索查询下载优化</li>
|
||||
<li>手机打开弹出层自适应</li>
|
||||
<li>角色岗位禁用显示置灰</li>
|
||||
<li>角色禁用不显示菜单</li>
|
||||
<li>新增导出权限</li>
|
||||
<li>角色权限唯一校验</li>
|
||||
<li>岗位名称编码唯一校验</li>
|
||||
<li>TreeTable优化</li>
|
||||
<li>支持多数据源</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v22">v2.2.0</a><code class="pull-right">2018.07.23</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v22" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>修复批量生成代码异常问题</li>
|
||||
<li>修复定时器保存失败问题</li>
|
||||
<li>修复热部署转换问题</li>
|
||||
<li>支持查询菜单管理,部门管理</li>
|
||||
<li>大多数功能支持时间查询</li>
|
||||
<li>自定义导出注解自动匹配column</li>
|
||||
<li>新增任务执行策略</li>
|
||||
<li>操作详细动态显示类型</li>
|
||||
<li>支持动态回显字典数据</li>
|
||||
<li>后台代码优化调整</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v21">v2.1.0</a><code class="pull-right">2018.07.10</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v21" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增登陆超时提醒</li>
|
||||
<li>修复定时器热部署转换问题</li>
|
||||
<li>修复登录验证码校验无效问题</li>
|
||||
<li>定时任务新增立即执行一次</li>
|
||||
<li>存在字典数据不允许删除字典</li>
|
||||
<li>字典数据支持按名称查询</li>
|
||||
<li>代码生成增加日志注解&表格优化</li>
|
||||
<li>修复用户逻辑删除后能登录问题</li>
|
||||
<li>表格支持多字段动态排序</li>
|
||||
<li>支持三级菜单显示</li>
|
||||
<li>新增ry.sh启动程序脚本</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v20">v2.0.0</a><code class="pull-right">2018.07.02</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v20" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>升级SpringBoot到最新版本2.0.3</li>
|
||||
<li>新增公告管理</li>
|
||||
<li>表单校验示提体验优化</li>
|
||||
<li>前端通用方法封装调整</li>
|
||||
<li>前端去除js文件,合并到html</li>
|
||||
<li>操作加载遮罩层</li>
|
||||
<li>支持全屏模式操作</li>
|
||||
<li>支持注解导出数据</li>
|
||||
<li>系统支持多查询&下载</li>
|
||||
<li>系统样式调整</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v16">v1.1.6</a><code class="pull-right">2018.06.04</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v16" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增用户列表部门列</li>
|
||||
<li>新增登录地点</li>
|
||||
<li>新增swagger</li>
|
||||
<li>修复排序数字校验</li>
|
||||
<li>优化头像上传文件类型限定为图片</li>
|
||||
<li>新增XSS过滤</li>
|
||||
<li>新增热部署提高开发效率</li>
|
||||
<li>修复treegrid居中无效</li>
|
||||
<li>角色多条件查询</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v15">v1.1.5</a><code class="pull-right">2018.05.28</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v15" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>优化登录失败刷新验证码</li>
|
||||
<li>新增用户登陆地址时间</li>
|
||||
<li>修复ajax超时退出问题</li>
|
||||
<li>新增html调用数据字典(若依首创)</li>
|
||||
<li>调整系统部分样式</li>
|
||||
<li>新增用户逻辑删除</li>
|
||||
<li>新增管理员不允许删除修改</li>
|
||||
<li>升级bootstrapTable到最新版本1.12.1</li>
|
||||
<li>升级layer到最新版本3.1.1</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v14">v1.1.4</a><code class="pull-right">2018.05.20</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v14" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增参数管理</li>
|
||||
<li>修复头像上传bug</li>
|
||||
<li>手机邮箱唯一校验</li>
|
||||
<li>支持手机邮箱登录</li>
|
||||
<li>代码生成优化</li>
|
||||
<li>支持模糊查询</li>
|
||||
<li>支持切换主题皮肤</li>
|
||||
<li>修改权限即时生效</li>
|
||||
<li>修复页签Tab关闭问题</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v13">v1.1.3</a><code class="pull-right">2018.05.14</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v13" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增验证码(数组计算、字符验证)</li>
|
||||
<li>新增cookie记住我</li>
|
||||
<li>新增头像上传</li>
|
||||
<li>用户名密码长度限制</li>
|
||||
<li>通用字段提取</li>
|
||||
<li>支持自定义条件查询</li>
|
||||
<li>部门名称必填、时间格式调整</li>
|
||||
<li>其他细节优化</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v12">v1.1.2</a><code class="pull-right">2018.05.07</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v12" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增个人信息修改</li>
|
||||
<li>菜单存在子菜单不允许删除</li>
|
||||
<li>菜单分配角色不允许删除</li>
|
||||
<li>角色分配人员不允许删除</li>
|
||||
<li>岗位使用后不允许删除</li>
|
||||
<li>保证用户的数据完整性加入事物</li>
|
||||
<li>新增环境使用手册、数据建模</li>
|
||||
<li>Thymeleaf升级到3.0</li>
|
||||
<li>支持非ROOT部署</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v11">v1.1.1</a><code class="pull-right">2018.04.23</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v11" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增表单构建器</li>
|
||||
<li>代码生成优化</li>
|
||||
<li>支持新增主部门</li>
|
||||
<li>支持选择上级部门、上级菜单</li>
|
||||
<li>新增字典管理单条删除</li>
|
||||
<li>优化一些其他细节</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v10">v1.1.0</a><code class="pull-right">2018.04.20</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v10" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>支持密码盐</li>
|
||||
<li>支持新增主目录</li>
|
||||
<li>支持批量生成代码</li>
|
||||
<li>支持表格导出(csv、txt、doc、excel)</li>
|
||||
<li>自动适应宽高模式窗体</li>
|
||||
<li>重复校验(角色名、菜单名、部门名)</li>
|
||||
<li>优化一些其他细节</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v09">v1.0.9</a><code class="pull-right">2018.04.14</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v09" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增代码生成(生成包括 java、html、js、xml、sql)</li>
|
||||
<li>新增按钮权限控制隐藏(若依首创)</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v08">v1.0.8</a><code class="pull-right">2018.04.08</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v08" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增定时任务(新增、修改、删除、查询、启动/暂停)</li>
|
||||
<li>新增调度日志(查询、删除)</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v07">v1.0.7</a><code class="pull-right">2018.04.04</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v07" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增岗位管理(新增、修改、删除、查询)</li>
|
||||
<li>优化用户管理,菜单管理部分细节</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v06">v1.0.6</a><code class="pull-right">2018.03.15</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v06" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增字典管理(新增、删除、修改、查询、数据选择)</li>
|
||||
<li>新增用户密码重置</li>
|
||||
<li>优化一些其他细节</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v05">v1.0.5</a><code class="pull-right">2018.03.12</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v05" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增菜单管理(新增、删除、修改、查询、图标选择)</li>
|
||||
<li>部门管理优化(添加责任人、联系电话、邮箱、修改者)</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v04">v1.0.4</a><code class="pull-right">2018.03.11</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v04" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增角色管理(新增、删除、修改、查询、菜单选择)</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v03">v1.0.3</a><code class="pull-right">2018.03.08</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v03" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增用户管理(新增、删除、修改、查询、部门选择)</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v02">v1.0.2</a><code class="pull-right">2018.03.04</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v02" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增部门管理 (新增、删除、修改、查询)</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h5 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v01">v1.0.1</a><code class="pull-right">2018.03.03</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v01" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>新增在线用户 (批量强退、单条强退、查询)</li>
|
||||
<li>新增登录日志 (批量删除、查询)</li>
|
||||
<li>新增操作日志 (批量删除、查询、详细)</li>
|
||||
<li>新增数据监控 (监控DB池连接和SQL的执行)</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a data-toggle="collapse" data-parent="#version" href="#v00">v1.0.0</a><code class="pull-right">2018.03.01</code>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="v00" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>若依管理系统正式发布。</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>捐赠</h5>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="alert alert-warning">
|
||||
请作者喝杯咖啡(点击图片放大)
|
||||
</div>
|
||||
<p id="pay-qrcode">
|
||||
<a href="javascript:;"><img th:src="@{/img/pay.png}" width="100%" alt="请使用手机支付宝或者微信扫码支付">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script th:src="@{/js/jquery.min.js}"></script>
|
||||
<script th:src="@{/js/bootstrap.min.js}"></script>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增单点登录应用')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-ssoApplication-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应用名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="appName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">应用描述:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="appDesc" class="form-control" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应用标识:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="appKey" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应用密钥:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="appSecret" class="form-control" type="text" required th:value="${appSecret}" readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应用回调地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="appCallBackUrl" class="form-control" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "sso/ssoApplication"
|
||||
$("#form-ssoApplication-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-ssoApplication-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改单点登录应用')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-ssoApplication-edit" th:object="${ssoApplication}">
|
||||
<input name="appId" th:field="*{appId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应用名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="appName" th:field="*{appName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">应用描述:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="appDesc" class="form-control" required>[[*{appDesc}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应用标识:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="appKey" th:field="*{appKey}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应用密钥:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="appSecret" th:field="*{appSecret}" class="form-control" type="text" required readonly>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">应用回调地址:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="appCallBackUrl" class="form-control" required>[[*{appCallBackUrl}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script type="text/javascript">
|
||||
var prefix = ctx + "sso/ssoApplication";
|
||||
$("#form-ssoApplication-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-ssoApplication-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('单点登录应用列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>应用名称:</label>
|
||||
<input type="text" name="appName"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="sso:ssoApplication:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="sso:ssoApplication:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="sso:ssoApplication:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="sso:ssoApplication:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('sso:ssoApplication:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('sso:ssoApplication:remove')}]];
|
||||
var prefix = ctx + "sso/ssoApplication";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "单点登录应用",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'appId',
|
||||
title: '应用id',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'appName',
|
||||
title: '应用名称'
|
||||
},
|
||||
{
|
||||
field: 'appDesc',
|
||||
title: '应用描述'
|
||||
},
|
||||
{
|
||||
field: 'appKey',
|
||||
title: '应用标识'
|
||||
},
|
||||
{
|
||||
field: 'appSecret',
|
||||
title: '应用密钥'
|
||||
},
|
||||
{
|
||||
field: 'appCallBackUrl',
|
||||
title: '应用回调地址'
|
||||
},
|
||||
{
|
||||
field: 'status',
|
||||
title: '是否启用'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.appId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.appId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
package com.ruoyi.common.utils;
|
||||
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.KeyGenerator;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.IvParameterSpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
/**
|
||||
* des3加密
|
||||
* @author wudetian
|
||||
*
|
||||
*/
|
||||
public class DES3Utils {
|
||||
private static byte[] defaultIV = { 0x23, (byte)0xf2, (byte)0xa3, (byte)0xc6, 0x3e, 0x2b, (byte)0xe7, 0x28 };
|
||||
//加密算法
|
||||
private static final String Algorithm = "DESede";
|
||||
// 加解密统一使用的编码方式
|
||||
private static final String encoding = "utf-8";
|
||||
// 密钥
|
||||
public static final String key="key自写";
|
||||
|
||||
/**
|
||||
* des加密
|
||||
*
|
||||
* @param
|
||||
* @param src
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String desEncrypt(String src) throws Exception {
|
||||
return URLEncoder.encode(Base64.encodeBase64String(desEncryptBytes(key, src)),"UTF-8");
|
||||
}
|
||||
|
||||
public static String desEncryptNOUrl(String src) throws Exception {
|
||||
return Base64.encodeBase64String(desEncryptBytes(key, src));
|
||||
}
|
||||
|
||||
/**
|
||||
* des加密
|
||||
*
|
||||
* @param key
|
||||
* @param src
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
private static byte[] desEncryptBytes(String key, String src) throws Exception{
|
||||
SecretKey deskey = new SecretKeySpec(Base64.decodeBase64(key), Algorithm); // 加密
|
||||
Cipher c1 = Cipher.getInstance(Algorithm +"/CBC/PKCS5Padding");
|
||||
IvParameterSpec IVSpec = IvGenerator(defaultIV);
|
||||
c1.init(Cipher.ENCRYPT_MODE, deskey, IVSpec);
|
||||
return c1.doFinal(regularCryptStr(src, encoding));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* des解密
|
||||
*
|
||||
* @param
|
||||
* @param src
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public static String desDecrypt(String src) throws Exception {
|
||||
return desDecryptBytes(key, Base64.decodeBase64(src));
|
||||
}
|
||||
|
||||
/**
|
||||
* des解密
|
||||
*
|
||||
* @param
|
||||
* @param srcBytes
|
||||
* @return
|
||||
* @throws
|
||||
* @throws Exception
|
||||
*/
|
||||
private static String desDecryptBytes(String key, byte[] srcBytes) throws Exception {
|
||||
SecretKey deskey = new SecretKeySpec(Base64.decodeBase64(key), Algorithm); // 解密
|
||||
IvParameterSpec IVSpec = IvGenerator(defaultIV);
|
||||
Cipher c1 = Cipher.getInstance(Algorithm +"/CBC/PKCS5Padding");
|
||||
c1.init(Cipher.DECRYPT_MODE, deskey, IVSpec);
|
||||
return new String(c1.doFinal(srcBytes), encoding).trim();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 格式化待加密字符串,使其长度为8的倍数
|
||||
*
|
||||
* @param strIn
|
||||
* @return
|
||||
*/
|
||||
private static byte[] regularCryptStr(String strIn, String charSet) throws Exception {
|
||||
ByteBuffer buffer = null;
|
||||
int iLen = 8 - strIn.getBytes(charSet).length % 8;
|
||||
if (iLen != 8) {
|
||||
buffer = ByteBuffer.allocate(strIn.getBytes(charSet).length + iLen);
|
||||
buffer.put(strIn.getBytes(charSet));
|
||||
return buffer.array();
|
||||
} else {
|
||||
return strIn.getBytes(charSet);
|
||||
}
|
||||
}
|
||||
|
||||
public static String genKey() throws NoSuchAlgorithmException{
|
||||
byte[] keyBytes = UUID.randomUUID().toString().getBytes();
|
||||
KeyGenerator generator = KeyGenerator.getInstance("DESede");
|
||||
generator.init( new SecureRandom( keyBytes ) );
|
||||
SecretKey key = generator.generateKey();
|
||||
return Base64.encodeBase64String(key.getEncoded());
|
||||
}
|
||||
|
||||
private static IvParameterSpec IvGenerator(byte b[]) throws Exception {
|
||||
IvParameterSpec IV = new IvParameterSpec(b);
|
||||
return IV;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,107 @@
|
|||
package com.ruoyi.common.utils;
|
||||
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.Key;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.SecureRandom;
|
||||
import java.security.spec.InvalidKeySpecException;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.SecretKeyFactory;
|
||||
import javax.crypto.spec.DESKeySpec;
|
||||
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
||||
public class DESUtil {
|
||||
//算法名称
|
||||
public static final String KEY_ALGORITHM = "DES";
|
||||
//算法名称/加密模式/填充方式
|
||||
//DES共有四种工作模式-->>ECB:电子密码本模式、CBC:加密分组链接模式、CFB:加密反馈模式、OFB:输出反馈模式
|
||||
public static final String CIPHER_ALGORITHM = "DES/ECB/PKCS5Padding";
|
||||
|
||||
/**
|
||||
*
|
||||
* 生成密钥key对象
|
||||
* @param KeyStr 密钥字符串
|
||||
* @return 密钥对象
|
||||
* @throws InvalidKeyException
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws InvalidKeySpecException
|
||||
* @throws Exception
|
||||
*/
|
||||
private static SecretKey keyGenerator(String keyStr) throws Exception {
|
||||
byte input[] = HexString2Bytes(keyStr);
|
||||
DESKeySpec desKey = new DESKeySpec(input);
|
||||
//创建一个密匙工厂,然后用它把DESKeySpec转换成
|
||||
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("DES");
|
||||
SecretKey securekey = keyFactory.generateSecret(desKey);
|
||||
return securekey;
|
||||
}
|
||||
|
||||
private static int parse(char c) {
|
||||
if (c >= 'a') return (c - 'a' + 10) & 0x0f;
|
||||
if (c >= 'A') return (c - 'A' + 10) & 0x0f;
|
||||
return (c - '0') & 0x0f;
|
||||
}
|
||||
|
||||
// 从十六进制字符串到字节数组转换
|
||||
public static byte[] HexString2Bytes(String hexstr) {
|
||||
byte[] b = new byte[hexstr.length() / 2];
|
||||
int j = 0;
|
||||
for (int i = 0; i < b.length; i++) {
|
||||
char c0 = hexstr.charAt(j++);
|
||||
char c1 = hexstr.charAt(j++);
|
||||
b[i] = (byte) ((parse(c0) << 4) | parse(c1));
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* 加密数据
|
||||
* @param data 待加密数据
|
||||
* @param key 密钥
|
||||
* @return 加密后的数据
|
||||
*/
|
||||
public static String encrypt(String data, String key) throws Exception {
|
||||
Key deskey = keyGenerator(key);
|
||||
// 实例化Cipher对象,它用于完成实际的加密操作
|
||||
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
|
||||
SecureRandom random = new SecureRandom();
|
||||
// 初始化Cipher对象,设置为加密模式
|
||||
cipher.init(Cipher.ENCRYPT_MODE, deskey, random);
|
||||
byte[] results = cipher.doFinal(data.getBytes());
|
||||
// 该部分是为了与加解密在线测试网站(http://tripledes.online-domain-tools.com/)的十六进制结果进行核对
|
||||
for (int i = 0; i < results.length; i++) {
|
||||
System.out.print(results[i] + " ");
|
||||
}
|
||||
System.out.println();
|
||||
// 执行加密操作。加密后的结果通常都会用Base64编码进行传输
|
||||
return Base64.encodeBase64String(results);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解密数据
|
||||
* @param data 待解密数据
|
||||
* @param key 密钥
|
||||
* @return 解密后的数据
|
||||
*/
|
||||
public static String decrypt(String data, String key) throws Exception {
|
||||
Key deskey = keyGenerator(key);
|
||||
Cipher cipher = Cipher.getInstance(CIPHER_ALGORITHM);
|
||||
//初始化Cipher对象,设置为解密模式
|
||||
cipher.init(Cipher.DECRYPT_MODE, deskey);
|
||||
// 执行解密操作
|
||||
return new String(cipher.doFinal(Base64.decodeBase64(data)));
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String source = "amigoxie";
|
||||
System.out.println("原文: " + source);
|
||||
String key = "A1B2C3D4E5F60708";
|
||||
String encryptData = encrypt(source, key);
|
||||
System.out.println("加密后: " + encryptData);
|
||||
String decryptData = decrypt(encryptData, key);
|
||||
System.out.println("解密后: " + decryptData);
|
||||
}
|
||||
}
|
||||
|
|
@ -77,6 +77,13 @@
|
|||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 单点模块-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-sso</artifactId>
|
||||
<version>4.2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 获取系统信息 -->
|
||||
<dependency>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ public class ShiroConfig
|
|||
filterChainDefinitionMap.put("/ajax/**", "anon");
|
||||
filterChainDefinitionMap.put("/js/**", "anon");
|
||||
filterChainDefinitionMap.put("/ruoyi/**", "anon");
|
||||
filterChainDefinitionMap.put("/api/**", "anon");
|
||||
filterChainDefinitionMap.put("/captcha/captchaImage**", "anon");
|
||||
// 退出 logout地址,shiro去清除session
|
||||
filterChainDefinitionMap.put("/logout", "logout");
|
||||
|
|
|
|||
|
|
@ -0,0 +1,35 @@
|
|||
<?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>4.2.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-sso</artifactId>
|
||||
|
||||
<description>
|
||||
sso单点登录管理模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Mysql驱动包 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
package com.ruoyi.sso.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 单点登录应用对象 sso_application
|
||||
*
|
||||
* @author shixueshu
|
||||
* @date 2020-03-23
|
||||
*/
|
||||
public class SsoApplication extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 应用id */
|
||||
private Long appId;
|
||||
|
||||
/** 应用名称 */
|
||||
@Excel(name = "应用名称")
|
||||
private String appName;
|
||||
|
||||
/** 应用描述 */
|
||||
@Excel(name = "应用描述")
|
||||
private String appDesc;
|
||||
|
||||
/** 应用标识 */
|
||||
@Excel(name = "应用标识")
|
||||
private String appKey;
|
||||
|
||||
/** 应用密钥 */
|
||||
@Excel(name = "应用密钥")
|
||||
private String appSecret;
|
||||
|
||||
/** 应用回调地址 */
|
||||
@Excel(name = "应用回调地址")
|
||||
private String appCallBackUrl;
|
||||
|
||||
/** 是否启用:0禁用,1启用 */
|
||||
@Excel(name = "是否启用:0禁用,1启用")
|
||||
private String status;
|
||||
|
||||
public void setAppId(Long appId)
|
||||
{
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Long getAppId()
|
||||
{
|
||||
return appId;
|
||||
}
|
||||
public void setAppName(String appName)
|
||||
{
|
||||
this.appName = appName;
|
||||
}
|
||||
|
||||
public String getAppName()
|
||||
{
|
||||
return appName;
|
||||
}
|
||||
public void setAppDesc(String appDesc)
|
||||
{
|
||||
this.appDesc = appDesc;
|
||||
}
|
||||
|
||||
public String getAppDesc()
|
||||
{
|
||||
return appDesc;
|
||||
}
|
||||
public void setAppKey(String appKey)
|
||||
{
|
||||
this.appKey = appKey;
|
||||
}
|
||||
|
||||
public String getAppKey()
|
||||
{
|
||||
return appKey;
|
||||
}
|
||||
public void setAppSecret(String appSecret)
|
||||
{
|
||||
this.appSecret = appSecret;
|
||||
}
|
||||
|
||||
public String getAppSecret()
|
||||
{
|
||||
return appSecret;
|
||||
}
|
||||
public void setAppCallBackUrl(String appCallBackUrl)
|
||||
{
|
||||
this.appCallBackUrl = appCallBackUrl;
|
||||
}
|
||||
|
||||
public String getAppCallBackUrl()
|
||||
{
|
||||
return appCallBackUrl;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("appId", getAppId())
|
||||
.append("appName", getAppName())
|
||||
.append("appDesc", getAppDesc())
|
||||
.append("appKey", getAppKey())
|
||||
.append("appSecret", getAppSecret())
|
||||
.append("appCallBackUrl", getAppCallBackUrl())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("status", getStatus())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
package com.ruoyi.sso.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sso.domain.SsoApplication;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* 单点登录应用Mapper接口
|
||||
*
|
||||
* @author shixueshu
|
||||
* @date 2020-03-23
|
||||
*/
|
||||
@Repository
|
||||
public interface SsoApplicationMapper
|
||||
{
|
||||
/**
|
||||
* 查询单点登录应用
|
||||
*
|
||||
* @param appId 单点登录应用ID
|
||||
* @return 单点登录应用
|
||||
*/
|
||||
public SsoApplication selectSsoApplicationById(Long appId);
|
||||
|
||||
/**
|
||||
* 查询单点登录应用列表
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 单点登录应用集合
|
||||
*/
|
||||
public List<SsoApplication> selectSsoApplicationList(SsoApplication ssoApplication);
|
||||
|
||||
/**
|
||||
* 新增单点登录应用
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSsoApplication(SsoApplication ssoApplication);
|
||||
|
||||
/**
|
||||
* 修改单点登录应用
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSsoApplication(SsoApplication ssoApplication);
|
||||
|
||||
/**
|
||||
* 删除单点登录应用
|
||||
*
|
||||
* @param appId 单点登录应用ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSsoApplicationById(Long appId);
|
||||
|
||||
/**
|
||||
* 批量删除单点登录应用
|
||||
*
|
||||
* @param appIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSsoApplicationByIds(String[] appIds);
|
||||
|
||||
/**
|
||||
* 根据应用标识与应用密钥查找应用
|
||||
* @param ssoApplication
|
||||
* @return
|
||||
*/
|
||||
List<SsoApplication> querySsoApplicationByAppKeyAndSecret(SsoApplication ssoApplication);
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
package com.ruoyi.sso.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sso.domain.SsoApplication;
|
||||
|
||||
/**
|
||||
* 单点登录应用Service接口
|
||||
*
|
||||
* @author shixueshu
|
||||
* @date 2020-03-23
|
||||
*/
|
||||
public interface ISsoApplicationService
|
||||
{
|
||||
/**
|
||||
* 查询单点登录应用
|
||||
*
|
||||
* @param appId 单点登录应用ID
|
||||
* @return 单点登录应用
|
||||
*/
|
||||
public SsoApplication selectSsoApplicationById(Long appId);
|
||||
|
||||
/**
|
||||
* 查询单点登录应用列表
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 单点登录应用集合
|
||||
*/
|
||||
public List<SsoApplication> selectSsoApplicationList(SsoApplication ssoApplication);
|
||||
|
||||
/**
|
||||
* 新增单点登录应用
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSsoApplication(SsoApplication ssoApplication);
|
||||
|
||||
/**
|
||||
* 修改单点登录应用
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSsoApplication(SsoApplication ssoApplication);
|
||||
|
||||
/**
|
||||
* 批量删除单点登录应用
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSsoApplicationByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除单点登录应用信息
|
||||
*
|
||||
* @param appId 单点登录应用ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSsoApplicationById(Long appId);
|
||||
|
||||
/**
|
||||
* 根据应用标识与应用密钥查找应用
|
||||
*
|
||||
* @param ssoApplication
|
||||
* @return
|
||||
*/
|
||||
List<SsoApplication> querySsoApplicationByAppKeyAndSecret(SsoApplication ssoApplication);
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
package com.ruoyi.sso.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sso.mapper.SsoApplicationMapper;
|
||||
import com.ruoyi.sso.domain.SsoApplication;
|
||||
import com.ruoyi.sso.service.ISsoApplicationService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 单点登录应用Service业务层处理
|
||||
*
|
||||
* @author shixueshu
|
||||
* @date 2020-03-23
|
||||
*/
|
||||
@Service
|
||||
public class SsoApplicationServiceImpl implements ISsoApplicationService
|
||||
{
|
||||
@Autowired
|
||||
private SsoApplicationMapper ssoApplicationMapper;
|
||||
|
||||
/**
|
||||
* 查询单点登录应用
|
||||
*
|
||||
* @param appId 单点登录应用ID
|
||||
* @return 单点登录应用
|
||||
*/
|
||||
@Override
|
||||
public SsoApplication selectSsoApplicationById(Long appId)
|
||||
{
|
||||
return ssoApplicationMapper.selectSsoApplicationById(appId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单点登录应用列表
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 单点登录应用
|
||||
*/
|
||||
@Override
|
||||
public List<SsoApplication> selectSsoApplicationList(SsoApplication ssoApplication)
|
||||
{
|
||||
return ssoApplicationMapper.selectSsoApplicationList(ssoApplication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单点登录应用
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSsoApplication(SsoApplication ssoApplication)
|
||||
{
|
||||
ssoApplication.setCreateTime(DateUtils.getNowDate());
|
||||
return ssoApplicationMapper.insertSsoApplication(ssoApplication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单点登录应用
|
||||
*
|
||||
* @param ssoApplication 单点登录应用
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSsoApplication(SsoApplication ssoApplication)
|
||||
{
|
||||
ssoApplication.setUpdateTime(DateUtils.getNowDate());
|
||||
return ssoApplicationMapper.updateSsoApplication(ssoApplication);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单点登录应用对象
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSsoApplicationByIds(String ids)
|
||||
{
|
||||
return ssoApplicationMapper.deleteSsoApplicationByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单点登录应用信息
|
||||
*
|
||||
* @param appId 单点登录应用ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSsoApplicationById(Long appId)
|
||||
{
|
||||
return ssoApplicationMapper.deleteSsoApplicationById(appId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SsoApplication> querySsoApplicationByAppKeyAndSecret(SsoApplication ssoApplication) {
|
||||
return ssoApplicationMapper.querySsoApplicationByAppKeyAndSecret(ssoApplication);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sso.mapper.SsoApplicationMapper">
|
||||
|
||||
<resultMap type="SsoApplication" id="SsoApplicationResult">
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="appName" column="app_name" />
|
||||
<result property="appDesc" column="app_desc" />
|
||||
<result property="appKey" column="app_key" />
|
||||
<result property="appSecret" column="app_secret" />
|
||||
<result property="appCallBackUrl" column="app_call_back_url" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSsoApplicationVo">
|
||||
select app_id, app_name, app_desc, app_key, app_secret, app_call_back_url, create_by, update_by, create_time, update_time, status from sso_application
|
||||
</sql>
|
||||
|
||||
<select id="selectSsoApplicationList" parameterType="SsoApplication" resultMap="SsoApplicationResult">
|
||||
<include refid="selectSsoApplicationVo"/>
|
||||
<where>
|
||||
<if test="appName != null and appName != ''"> and app_name like concat('%', #{appName}, '%')</if>
|
||||
<if test="appCallBackUrl != null and appCallBackUrl != ''"> and app_call_back_url like concat('%', #{appCallBackUrl}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSsoApplicationById" parameterType="Long" resultMap="SsoApplicationResult">
|
||||
<include refid="selectSsoApplicationVo"/>
|
||||
where app_id = #{appId}
|
||||
</select>
|
||||
|
||||
<select id="querySsoApplicationByAppKeyAndSecret" resultType="com.ruoyi.sso.domain.SsoApplication">
|
||||
<include refid="selectSsoApplicationVo"/>
|
||||
<where>
|
||||
<if test="appKey != null and appKey != ''"> and app_key = #{appKey}</if>
|
||||
<if test="appSecret != null and appSecret != ''"> and app_secret = #{appSecret}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertSsoApplication" parameterType="SsoApplication" useGeneratedKeys="true" keyProperty="appId">
|
||||
insert into sso_application
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="appName != null and appName != ''">app_name,</if>
|
||||
<if test="appDesc != null and appDesc != ''">app_desc,</if>
|
||||
<if test="appKey != null and appKey != ''">app_key,</if>
|
||||
<if test="appSecret != null and appSecret != ''">app_secret,</if>
|
||||
<if test="appCallBackUrl != null and appCallBackUrl != ''">app_call_back_url,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="appName != null and appName != ''">#{appName},</if>
|
||||
<if test="appDesc != null and appDesc != ''">#{appDesc},</if>
|
||||
<if test="appKey != null and appKey != ''">#{appKey},</if>
|
||||
<if test="appSecret != null and appSecret != ''">#{appSecret},</if>
|
||||
<if test="appCallBackUrl != null and appCallBackUrl != ''">#{appCallBackUrl},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSsoApplication" parameterType="SsoApplication">
|
||||
update sso_application
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="appName != null and appName != ''">app_name = #{appName},</if>
|
||||
<if test="appDesc != null and appDesc != ''">app_desc = #{appDesc},</if>
|
||||
<if test="appKey != null and appKey != ''">app_key = #{appKey},</if>
|
||||
<if test="appSecret != null and appSecret != ''">app_secret = #{appSecret},</if>
|
||||
<if test="appCallBackUrl != null and appCallBackUrl != ''">app_call_back_url = #{appCallBackUrl},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
</trim>
|
||||
where app_id = #{appId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSsoApplicationById" parameterType="Long">
|
||||
delete from sso_application where app_id = #{appId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSsoApplicationByIds" parameterType="String">
|
||||
delete from sso_application where app_id in
|
||||
<foreach item="appId" collection="array" open="(" separator="," close=")">
|
||||
#{appId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
-- 菜单 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('单点登录应用', '3', '1', '/sso/ssoApplication', 'C', '0', 'sso:ssoApplication:view', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '单点登录应用菜单');
|
||||
|
||||
-- 按钮父菜单ID
|
||||
SELECT @parentId := LAST_INSERT_ID();
|
||||
|
||||
-- 按钮 SQL
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('单点登录应用查询', @parentId, '1', '#', 'F', '0', 'sso:ssoApplication:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('单点登录应用新增', @parentId, '2', '#', 'F', '0', 'sso:ssoApplication:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('单点登录应用修改', @parentId, '3', '#', 'F', '0', 'sso:ssoApplication:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('单点登录应用删除', @parentId, '4', '#', 'F', '0', 'sso:ssoApplication:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
|
||||
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
|
||||
values('单点登录应用导出', @parentId, '5', '#', 'F', '0', 'sso:ssoApplication:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
|
||||
86
ry.sh
86
ry.sh
|
|
@ -1,86 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
AppName=RuoYi.jar
|
||||
|
||||
#JVM参数
|
||||
JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M -XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30 -XX:+UseParallelGC -XX:+UseParallelOldGC"
|
||||
APP_HOME=`pwd`
|
||||
LOG_PATH=$APP_HOME/logs/$AppName.log
|
||||
|
||||
if [ "$1" = "" ];
|
||||
then
|
||||
echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$AppName" = "" ];
|
||||
then
|
||||
echo -e "\033[0;31m 未输入应用名 \033[0m"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function start()
|
||||
{
|
||||
PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
|
||||
|
||||
if [ x"$PID" != x"" ]; then
|
||||
echo "$AppName is running..."
|
||||
else
|
||||
nohup java -jar $JVM_OPTS target/$AppName > /dev/null 2>&1 &
|
||||
echo "Start $AppName success..."
|
||||
fi
|
||||
}
|
||||
|
||||
function stop()
|
||||
{
|
||||
echo "Stop $AppName"
|
||||
|
||||
PID=""
|
||||
query(){
|
||||
PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
|
||||
}
|
||||
|
||||
query
|
||||
if [ x"$PID" != x"" ]; then
|
||||
kill -TERM $PID
|
||||
echo "$AppName (pid:$PID) exiting..."
|
||||
while [ x"$PID" != x"" ]
|
||||
do
|
||||
sleep 1
|
||||
query
|
||||
done
|
||||
echo "$AppName exited."
|
||||
else
|
||||
echo "$AppName already stopped."
|
||||
fi
|
||||
}
|
||||
|
||||
function restart()
|
||||
{
|
||||
stop
|
||||
sleep 2
|
||||
start
|
||||
}
|
||||
|
||||
function status()
|
||||
{
|
||||
PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l`
|
||||
if [ $PID != 0 ];then
|
||||
echo "$AppName is running..."
|
||||
else
|
||||
echo "$AppName is not running..."
|
||||
fi
|
||||
}
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start;;
|
||||
stop)
|
||||
stop;;
|
||||
restart)
|
||||
restart;;
|
||||
status)
|
||||
status;;
|
||||
*)
|
||||
|
||||
esac
|
||||
Loading…
Reference in New Issue