Compare commits
37 Commits
Author | SHA1 | Date | |
---|---|---|---|
9d02f8f7e7 | |||
70205922fc | |||
f3d1f0afe2 | |||
7ee6ad8aec | |||
4ff9afac23 | |||
167970e5c4 | |||
29395be19a | |||
da01f093f8 | |||
f53515eb70 | |||
84dde0dcf2 | |||
df1c283335 | |||
faa4bfaef3 | |||
eef7ef6544 | |||
22d42048ab | |||
e5b905c455 | |||
c64f027e66 | |||
96934ca139 | |||
f4c763c84d | |||
8cd0d9f366 | |||
6a7f727f70 | |||
62381f0472 | |||
2952337f15 | |||
c719be609a | |||
6253e41658 | |||
bd0e574268 | |||
6e176c807c | |||
2bdf12b1e1 | |||
67f2ba2aa9 | |||
c105f44eb9 | |||
e23a6919af | |||
b362e58646 | |||
db3e571af0 | |||
52fe19e933 | |||
7b3ab45ecc | |||
e337f685bc | |||
13287e02eb | |||
d4a33eab94 |
@ -1,11 +1,11 @@
|
||||
<p align="center">
|
||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-dd77653d7c9f197dd9d93684f3c8dcfbab6.png">
|
||||
</p>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v4.7.5</h1>
|
||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v4.7.6</h1>
|
||||
<h4 align="center">基于SpringBoot开发的轻量级Java快速开发框架</h4>
|
||||
<p align="center">
|
||||
<a href="https://gitee.com/y_project/RuoYi/stargazers"><img src="https://gitee.com/y_project/RuoYi/badge/star.svg?theme=gvp"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi"><img src="https://img.shields.io/badge/RuoYi-v4.7.5-brightgreen.svg"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi"><img src="https://img.shields.io/badge/RuoYi-v4.7.6-brightgreen.svg"></a>
|
||||
<a href="https://gitee.com/y_project/RuoYi/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||
</p>
|
||||
|
||||
@ -99,4 +99,4 @@
|
||||
|
||||
## 若依交流群
|
||||
|
||||
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) [](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ) [](https://jq.qq.com/?_wv=1027&k=540WfdEr) [](https://jq.qq.com/?_wv=1027&k=ss91fC4t) [](https://jq.qq.com/?_wv=1027&k=uUQpdY7J)
|
||||
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) [](https://jq.qq.com/?_wv=1027&k=qPIKBb7s) [](https://jq.qq.com/?_wv=1027&k=4NsjKbtU) [](https://jq.qq.com/?_wv=1027&k=VD2pkz2G) [](https://jq.qq.com/?_wv=1027&k=HlshFwkJ) [](https://jq.qq.com/?_wv=1027&k=0ARRrO9V) [](https://jq.qq.com/?_wv=1027&k=up9k3ZXJ) [](https://jq.qq.com/?_wv=1027&k=540WfdEr) [](https://jq.qq.com/?_wv=1027&k=ss91fC4t) [](https://jq.qq.com/?_wv=1027&k=Cqd66IKe)
|
24
pom.xml
24
pom.xml
@ -5,28 +5,27 @@
|
||||
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<version>4.7.5</version>
|
||||
<version>4.7.6</version>
|
||||
|
||||
<name>ruoyi</name>
|
||||
<url>http://www.ruoyi.vip</url>
|
||||
<description>若依管理系统</description>
|
||||
|
||||
<properties>
|
||||
<ruoyi.version>4.7.5</ruoyi.version>
|
||||
<ruoyi.version>4.7.6</ruoyi.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
|
||||
<shiro.version>1.9.1</shiro.version>
|
||||
<shiro.version>1.10.1</shiro.version>
|
||||
<thymeleaf.extras.shiro.version>2.1.0</thymeleaf.extras.shiro.version>
|
||||
<druid.version>1.2.11</druid.version>
|
||||
<druid.version>1.2.15</druid.version>
|
||||
<bitwalker.version>1.21</bitwalker.version>
|
||||
<kaptcha.version>2.3.2</kaptcha.version>
|
||||
<kaptcha.version>2.3.3</kaptcha.version>
|
||||
<swagger.version>3.0.0</swagger.version>
|
||||
<mybatis-spring-boot.version>2.2.2</mybatis-spring-boot.version>
|
||||
<pagehelper.boot.version>1.4.3</pagehelper.boot.version>
|
||||
<pagehelper.boot.version>1.4.6</pagehelper.boot.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<oshi.version>6.2.2</oshi.version>
|
||||
<oshi.version>6.4.0</oshi.version>
|
||||
<commons.io.version>2.11.0</commons.io.version>
|
||||
<commons.fileupload.version>1.4</commons.fileupload.version>
|
||||
<poi.version>4.1.2</poi.version>
|
||||
@ -55,7 +54,7 @@
|
||||
|
||||
<!-- 验证码 -->
|
||||
<dependency>
|
||||
<groupId>com.github.penggle</groupId>
|
||||
<groupId>pro.fessional</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<version>${kaptcha.version}</version>
|
||||
</dependency>
|
||||
@ -95,13 +94,6 @@
|
||||
<version>${bitwalker.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringBoot集成mybatis框架 -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>${mybatis-spring-boot.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pagehelper 分页插件 -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.5</version>
|
||||
<version>4.7.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<packaging>jar</packaging>
|
||||
|
@ -63,11 +63,7 @@ public class SysProfileController extends BaseController
|
||||
public boolean checkPassword(String password)
|
||||
{
|
||||
SysUser user = getSysUser();
|
||||
if (passwordService.matches(user, password))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return passwordService.matches(user, password);
|
||||
}
|
||||
|
||||
@GetMapping("/resetPwd")
|
||||
|
@ -130,7 +130,7 @@ public class SysUserController extends BaseController
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(@Validated SysUser user)
|
||||
{
|
||||
if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user.getLoginName())))
|
||||
if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user)))
|
||||
{
|
||||
return error("新增用户'" + user.getLoginName() + "'失败,登录账号已存在");
|
||||
}
|
||||
@ -176,7 +176,11 @@ public class SysUserController extends BaseController
|
||||
{
|
||||
userService.checkUserAllowed(user);
|
||||
userService.checkUserDataScope(user.getUserId());
|
||||
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||
if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user)))
|
||||
{
|
||||
return error("修改用户'" + user.getLoginName() + "'失败,登录账号已存在");
|
||||
}
|
||||
else if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(user)))
|
||||
{
|
||||
return error("修改用户'" + user.getLoginName() + "'失败,手机号码已存在");
|
||||
@ -269,7 +273,7 @@ public class SysUserController extends BaseController
|
||||
@ResponseBody
|
||||
public String checkLoginNameUnique(SysUser user)
|
||||
{
|
||||
return userService.checkLoginNameUnique(user.getLoginName());
|
||||
return userService.checkLoginNameUnique(user);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3,7 +3,7 @@ ruoyi:
|
||||
# 名称
|
||||
name: RuoYi
|
||||
# 版本
|
||||
version: 4.7.5
|
||||
version: 4.7.6
|
||||
# 版权年份
|
||||
copyrightYear: 2022
|
||||
# 实例演示开关
|
||||
|
@ -1,11 +1,11 @@
|
||||
/*!
|
||||
* bootstrap-fileinput v5.2.4
|
||||
* bootstrap-fileinput v5.5.2
|
||||
* http://plugins.krajee.com/file-input
|
||||
*
|
||||
* Krajee default styling for bootstrap-fileinput.
|
||||
*
|
||||
* Author: Kartik Visweswaran
|
||||
* Copyright: 2014 - 2021, Kartik Visweswaran, Krajee.com
|
||||
* Copyright: 2014 - 2022, Kartik Visweswaran, Krajee.com
|
||||
*
|
||||
* Licensed under the BSD-3-Clause
|
||||
* https://github.com/kartik-v/bootstrap-fileinput/blob/master/LICENSE.md
|
||||
@ -50,6 +50,10 @@ input[type=file].file-loading {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.file-caption .input-group {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.btn-file input[type=file],
|
||||
.file-caption-icon,
|
||||
.file-preview .fileinput-remove,
|
||||
@ -274,6 +278,7 @@ input[type=file].file-loading {
|
||||
padding: 6px;
|
||||
float: left;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.krajee-default.file-preview-frame .kv-file-content {
|
||||
@ -281,12 +286,6 @@ input[type=file].file-loading {
|
||||
height: 160px;
|
||||
}
|
||||
|
||||
.krajee-default .file-preview-other-frame {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.krajee-default.file-preview-frame .kv-file-content.kv-pdf-rendered {
|
||||
width: 400px;
|
||||
}
|
||||
@ -330,7 +329,7 @@ input[type=file].file-loading {
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
font-size: 11px;
|
||||
color: #777;
|
||||
color: #999;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
@ -406,7 +405,7 @@ input[type=file].file-loading {
|
||||
height: 2.4rem;
|
||||
top: 50%;
|
||||
border-radius: 50%;
|
||||
text-align:center;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.btn-navigate * {
|
||||
@ -426,19 +425,12 @@ input[type=file].file-loading {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.file-zoom-dialog .kv-zoom-caption {
|
||||
max-width: 50%;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.file-zoom-dialog .kv-zoom-header {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.file-zoom-dialog .kv-zoom-body {
|
||||
padding: 0.25rem 0.5rem 0.25rem 0;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.file-zoom-dialog .kv-zoom-description {
|
||||
@ -554,6 +546,10 @@ input[type=file].file-loading {
|
||||
z-index: 3000;
|
||||
}
|
||||
|
||||
.kv-zoom-actions {
|
||||
min-width: 140px;
|
||||
}
|
||||
|
||||
.kv-zoom-actions .btn-kv {
|
||||
margin-left: 3px;
|
||||
}
|
||||
@ -568,15 +564,6 @@ input[type=file].file-loading {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.file-zoom-content > * {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.file-zoom-content .kv-spacer {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.file-zoom-content .file-preview-image {
|
||||
max-height: 100%;
|
||||
}
|
||||
@ -668,4 +655,34 @@ input[type=file].file-loading {
|
||||
|
||||
.file-preview .kv-zoom-cache {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.file-preview-other-frame, .file-preview-object, .kv-file-content, .kv-zoom-body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.btn-kv-rotate,
|
||||
.kv-file-rotate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rotatable:not(.hide-rotate) .btn-kv-rotate,
|
||||
.rotatable:not(.hide-rotate) .kv-file-rotate {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.rotatable .file-zoom-detail,
|
||||
.rotatable .kv-file-content,
|
||||
.rotatable .kv-file-content > :first-child {
|
||||
transform-origin: center center;
|
||||
}
|
||||
|
||||
.rotate-animate {
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.kv-overflow-hidden {
|
||||
overflow: hidden;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -698,7 +698,8 @@
|
||||
if (_ls && _ls.length > 0) {
|
||||
$.each(_ls, function(index, item) {
|
||||
var _p_icon = $("#" + $(item).attr("pid")).children().eq(options.expandColumn).find(".treetable-expander");
|
||||
if (_p_icon.hasClass(options.expanderExpandedClass)) {
|
||||
var _p_display = $("#" + $(item).attr("pid")).css('display');
|
||||
if (_p_icon.hasClass(options.expanderExpandedClass) && _p_display == 'table') {
|
||||
$(item).css("display", "table");
|
||||
}
|
||||
});
|
||||
|
File diff suppressed because one or more lines are too long
@ -338,7 +338,7 @@ label.error {
|
||||
|
||||
.input-group label.error {
|
||||
z-index:99;
|
||||
right: 42px
|
||||
right: 42px;
|
||||
}
|
||||
|
||||
.input-group input.error + label.error + .input-group-addon>i {
|
||||
@ -347,10 +347,14 @@ label.error {
|
||||
|
||||
.input-group.date label.error {
|
||||
z-index:99;
|
||||
right: 42px
|
||||
right: 42px;
|
||||
}
|
||||
|
||||
.Validform_error,input.error,textarea.error,select.error {
|
||||
.select2-hidden-accessible + label.error {
|
||||
right: 38px;
|
||||
}
|
||||
|
||||
.Validform_error,input.error,textarea.error,select.error,label.error+.select2-container--bootstrap .select2-selection--single {
|
||||
background-color: #fbe2e2;
|
||||
border-color: #c66161;
|
||||
color: #c00
|
||||
|
@ -10,7 +10,7 @@ var table = {
|
||||
options: {},
|
||||
// 设置实例配置
|
||||
set: function(id) {
|
||||
if($.common.getLength(table.config) > 1 && $.common.isNotEmpty(event)) {
|
||||
if ($.common.getLength(table.config) > 1 && $.common.isNotEmpty(event)) {
|
||||
var tableId = $.common.isEmpty(id) ? $(event.currentTarget).parents(".bootstrap-table").find("table.table").attr("id") || $(event.currentTarget).parents(".bootstrap-tree-table").find("table.table").attr("id") : id;
|
||||
if ($.common.isNotEmpty(tableId)) {
|
||||
table.options = table.get(tableId);
|
||||
@ -221,13 +221,13 @@ var table = {
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
func = $.inArray(e.type, ['check', 'check-all']) > -1 ? 'union' : 'difference';
|
||||
var selectedIds = table.rememberSelectedIds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedIds)) {
|
||||
if ($.common.isNotEmpty(selectedIds)) {
|
||||
table.rememberSelectedIds[table.options.id] = _[func](selectedIds, rowIds);
|
||||
} else {
|
||||
table.rememberSelectedIds[table.options.id] = _[func]([], rowIds);
|
||||
}
|
||||
var selectedRows = table.rememberSelecteds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedRows)) {
|
||||
if ($.common.isNotEmpty(selectedRows)) {
|
||||
table.rememberSelecteds[table.options.id] = _[func](selectedRows, rows);
|
||||
} else {
|
||||
table.rememberSelecteds[table.options.id] = _[func]([], rows);
|
||||
@ -249,7 +249,7 @@ var table = {
|
||||
$(optionsIds).off("click").on("click", '.img-circle', function() {
|
||||
var src = $(this).attr('src');
|
||||
var target = $(this).data('target');
|
||||
if($.common.equals("self", target)) {
|
||||
if ($.common.equals("self", target)) {
|
||||
var height = $(this).data('height');
|
||||
var width = $(this).data('width');
|
||||
top.layer.open({
|
||||
@ -363,7 +363,7 @@ var table = {
|
||||
if ($.common.isNotEmpty(pageSize)) {
|
||||
params.pageSize = pageSize;
|
||||
}
|
||||
if($.common.isNotEmpty(tableId)){
|
||||
if ($.common.isNotEmpty(tableId)){
|
||||
$("#" + tableId).bootstrapTable('refresh', params);
|
||||
} else{
|
||||
$("#" + table.options.id).bootstrapTable('refresh', params);
|
||||
@ -493,7 +493,7 @@ var table = {
|
||||
});
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
var selectedRows = table.rememberSelecteds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedRows)) {
|
||||
if ($.common.isNotEmpty(selectedRows)) {
|
||||
rows = $.map(table.rememberSelecteds[table.options.id], function (row) {
|
||||
return $.common.getItemField(row, column);
|
||||
});
|
||||
@ -522,7 +522,7 @@ var table = {
|
||||
});
|
||||
if ($.common.isNotEmpty(table.options.rememberSelected) && table.options.rememberSelected) {
|
||||
var selectedRows = table.rememberSelecteds[table.options.id];
|
||||
if($.common.isNotEmpty(selectedRows)) {
|
||||
if ($.common.isNotEmpty(selectedRows)) {
|
||||
rows = $.map(selectedRows, function (row) {
|
||||
return $.common.getItemField(row, table.options.columns[1].field);
|
||||
});
|
||||
@ -812,7 +812,7 @@ var table = {
|
||||
},
|
||||
// 获取iframe页的DOM
|
||||
getChildFrame: function (index) {
|
||||
if($.common.isEmpty(index)){
|
||||
if ($.common.isEmpty(index)){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
return parent.layer.getChildFrame('body', index);
|
||||
} else {
|
||||
@ -821,7 +821,7 @@ var table = {
|
||||
},
|
||||
// 关闭窗体
|
||||
close: function (index) {
|
||||
if($.common.isEmpty(index)){
|
||||
if ($.common.isEmpty(index)){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);
|
||||
} else {
|
||||
@ -907,7 +907,7 @@ var table = {
|
||||
}
|
||||
}
|
||||
var btnCallback = {};
|
||||
if(options.btn instanceof Array){
|
||||
if (options.btn instanceof Array){
|
||||
for (var i = 1, len = options.btn.length; i < len; i++) {
|
||||
var btn = options["btn" + (i + 1)];
|
||||
if (btn) {
|
||||
@ -1095,7 +1095,7 @@ var table = {
|
||||
table.set();
|
||||
$.modal.confirm("确定删除该条" + table.options.modalName + "信息吗?", function() {
|
||||
var url = $.common.isEmpty(id) ? table.options.removeUrl : table.options.removeUrl.replace("{id}", id);
|
||||
if(table.options.type == table_type.bootstrapTreeTable) {
|
||||
if (table.options.type == table_type.bootstrapTreeTable) {
|
||||
$.operate.get(url);
|
||||
} else {
|
||||
var data = { "ids": id };
|
||||
@ -1148,7 +1148,7 @@ var table = {
|
||||
// 修改信息
|
||||
edit: function(id) {
|
||||
table.set();
|
||||
if($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
|
||||
if ($.common.isEmpty(id) && table.options.type == table_type.bootstrapTreeTable) {
|
||||
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
|
||||
if ($.common.isEmpty(row)) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
@ -1172,7 +1172,7 @@ var table = {
|
||||
if ($.common.isNotEmpty(id)) {
|
||||
url = table.options.updateUrl.replace("{id}", id);
|
||||
} else {
|
||||
if(table.options.type == table_type.bootstrapTreeTable) {
|
||||
if (table.options.type == table_type.bootstrapTreeTable) {
|
||||
var row = $("#" + table.options.id).bootstrapTreeTable('getSelections')[0];
|
||||
if ($.common.isEmpty(row)) {
|
||||
$.modal.alertWarning("请至少选择一条记录");
|
||||
@ -1298,7 +1298,7 @@ var table = {
|
||||
successCallback: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
var parent = activeWindow();
|
||||
if($.common.isEmpty(parent.table)) {
|
||||
if ($.common.isEmpty(parent.table)) {
|
||||
$.modal.msgSuccessReload(result.msg);
|
||||
} else if (parent.table.options.type == table_type.bootstrapTable) {
|
||||
$.modal.close();
|
||||
@ -1322,15 +1322,20 @@ var table = {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
var topWindow = $(window.parent.document);
|
||||
var currentId = $('.page-tabs-content', topWindow).find('.active').attr('data-panel');
|
||||
var $contentWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0].contentWindow;
|
||||
$.modal.close();
|
||||
$contentWindow.$.modal.msgSuccess(result.msg);
|
||||
$contentWindow.$(".layui-layer-padding").removeAttr("style");
|
||||
if ($contentWindow.table.options.type == table_type.bootstrapTable) {
|
||||
$contentWindow.$.table.refresh();
|
||||
} else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) {
|
||||
$contentWindow.$.treeTable.refresh();
|
||||
var topWindow = $('.RuoYi_iframe[data-id="' + currentId + '"]', topWindow)[0];
|
||||
if ($.common.isNotEmpty(topWindow) && $.common.isNotEmpty(currentId)) {
|
||||
var $contentWindow = topWindow.contentWindow;
|
||||
$contentWindow.$.modal.msgSuccess(result.msg);
|
||||
$contentWindow.$(".layui-layer-padding").removeAttr("style");
|
||||
if ($contentWindow.table.options.type == table_type.bootstrapTable) {
|
||||
$contentWindow.$.table.refresh();
|
||||
} else if ($contentWindow.table.options.type == table_type.bootstrapTreeTable) {
|
||||
$contentWindow.$.treeTable.refresh();
|
||||
}
|
||||
} else {
|
||||
$.modal.msgSuccess(result.msg);
|
||||
}
|
||||
$.modal.close();
|
||||
$.modal.closeTab();
|
||||
} else if (result.code == web_status.WARNING) {
|
||||
$.modal.alertWarning(result.msg)
|
||||
@ -1413,7 +1418,7 @@ var table = {
|
||||
var node = tree.getNodesByParam("id", treeId, null)[0];
|
||||
$.tree.selectByIdName(treeId, node);
|
||||
// 回调tree方法
|
||||
if(typeof(options.callBack) === "function"){
|
||||
if (typeof(options.callBack) === "function"){
|
||||
options.callBack(tree);
|
||||
}
|
||||
});
|
||||
@ -1502,7 +1507,7 @@ var table = {
|
||||
// 不允许根父节点选择
|
||||
notAllowParents: function(_tree) {
|
||||
var nodes = _tree.getSelectedNodes();
|
||||
if(nodes.length == 0){
|
||||
if (nodes.length == 0){
|
||||
$.modal.msgError("请选择节点后提交");
|
||||
return false;
|
||||
}
|
||||
@ -1690,7 +1695,7 @@ var table = {
|
||||
formToJSON: function(formId) {
|
||||
var json = {};
|
||||
$.each($("#" + formId).serializeArray(), function(i, field) {
|
||||
if(json[field.name]) {
|
||||
if (json[field.name]) {
|
||||
json[field.name] += ("," + field.value);
|
||||
} else {
|
||||
json[field.name] = field.value;
|
||||
|
@ -17,7 +17,7 @@
|
||||
<h2>若依后台管理系统</h2>
|
||||
<p>ruoyi是一个完全响应式,基于Bootstrap3.3.7最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
|
||||
<p>
|
||||
<b>当前版本:</b>v4.7.5
|
||||
<b>当前版本:</b>v4.7.6
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">免费开源</span>
|
||||
@ -56,7 +56,7 @@
|
||||
<h3>你好,若依 </h3>
|
||||
<p>H+是一个完全响应式,基于Bootstrap3.3.7最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术,她提供了诸多的强大的可以重新组合的UI组件,并集成了最新的jQuery版本(v2.1.1),当然,也集成了很多功能强大,用途广泛的就jQuery插件,她可以用于所有的Web应用程序,如<b>网站管理后台</b>,<b>网站会员中心</b>,<b>CMS</b>,<b>CRM</b>,<b>OA</b>等等,当然,您也可以对她进行深度定制,以做出更强系统。</p>
|
||||
<p>
|
||||
<b>当前版本:</b>v4.7.5
|
||||
<b>当前版本:</b>v4.7.6
|
||||
</p>
|
||||
<p>
|
||||
<span class="label label-warning">开源免费</span>
|
||||
|
@ -181,7 +181,7 @@ $('#smartwizard').smartWizard({
|
||||
enableURLhash: true, // Enable selection of the step based on url hash
|
||||
transition: {
|
||||
animation: 'none', // Effect on navigation, none/fade/slide-horizontal/slide-vertical/slide-swing
|
||||
speed: '400', // Transion animation speed
|
||||
speed: '400', // Transition animation speed
|
||||
easing:'' // Transition animation easing. Not supported without a jQuery easing plugin
|
||||
},
|
||||
toolbarSettings: {
|
||||
|
@ -12,7 +12,7 @@
|
||||
<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css?v=1.18.3}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/animate.min.css?v=20210831}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.min.css?v=20210831}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.5}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
</head>
|
||||
|
||||
<!-- 通用JS -->
|
||||
@ -36,8 +36,8 @@
|
||||
<script th:src="@{/ajax/libs/iCheck/icheck.min.js?v=1.0.3}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js?v=3.5.1}"></script>
|
||||
<script th:src="@{/ajax/libs/layui/layui.min.js?v=2.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
</div>
|
||||
|
||||
<!-- ztree树插件 -->
|
||||
@ -108,10 +108,10 @@
|
||||
|
||||
<!-- fileinput文件上传插件 -->
|
||||
<div th:fragment="bootstrap-fileinput-css">
|
||||
<link th:href="@{/ajax/libs/bootstrap-fileinput/fileinput.min.css?v=5.2.4}" rel="stylesheet"/>
|
||||
<link th:href="@{/ajax/libs/bootstrap-fileinput/fileinput.min.css?v=5.5.2}" rel="stylesheet"/>
|
||||
</div>
|
||||
<div th:fragment="bootstrap-fileinput-js">
|
||||
<script th:src="@{/ajax/libs/bootstrap-fileinput/fileinput.min.js?v=5.2.4}"></script>
|
||||
<script th:src="@{/ajax/libs/bootstrap-fileinput/fileinput.min.js?v=5.5.2}"></script>
|
||||
</div>
|
||||
|
||||
<!-- duallistbox双列表框插件 -->
|
||||
|
@ -14,8 +14,8 @@
|
||||
<link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css?v=20200902}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.5}" rel="stylesheet"/>
|
||||
<style type="text/css">.fixed-sidebar .nav:not(.navbar-toolbar)>li.active{border-left:0px!important;</style>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
<style type="text/css">.fixed-sidebar .nav:not(.navbar-toolbar)>li.active{border-left:0px!important;}</style>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" th:classappend="${isMobile} ? 'canvas-menu'" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
@ -318,8 +318,8 @@
|
||||
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/index.js?v=20201208}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:src="@{/js/resize-tabs.js}"></script>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/style.min.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/css/skins.css}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.5}" rel="stylesheet"/>
|
||||
<link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="fixed-sidebar full-height-layout gray-bg" th:classappend="${isMobile} ? 'canvas-menu'" style="overflow: hidden">
|
||||
<div id="wrapper">
|
||||
@ -264,8 +264,8 @@
|
||||
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/ruoyi/index.js?v=20201208}"></script>
|
||||
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
|
@ -38,7 +38,7 @@
|
||||
<script src="../static/js/bootstrap.min.js" th:src="@{/js/bootstrap.min.js}"></script>
|
||||
<script src="../static/js/three.min.js" th:src="@{/js/three.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.5}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
</body>
|
||||
<script th:inline="javascript">
|
||||
var ctx = [[@{/}]];
|
||||
|
@ -9,7 +9,7 @@
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.7.5}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
@ -76,7 +76,7 @@
|
||||
<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.5}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
<script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -79,7 +79,7 @@
|
||||
<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> <s>满339522636</s> <s>满130035985</s> <s>满143151071</s> <s>满158781320</s> <s>满201531282</s> <s>满101526938</s> <s>满264355400</s> <s>满298522656</s> <s>满139845794</s> <a href="https://jq.qq.com/?_wv=1027&k=p86p2AJX" target="_blank">213650505</a>
|
||||
<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> <s>满339522636</s> <s>满130035985</s> <s>满143151071</s> <s>满158781320</s> <s>满201531282</s> <s>满101526938</s> <s>满264355400</s> <s>满298522656</s> <s>满139845794</s> <a href="https://jq.qq.com/?_wv=1027&k=Cqd66IKe" target="_blank">185760789</a>
|
||||
</p>
|
||||
<p><i class="fa fa-weixin"></i> 微信:<a href="javascript:;">/ *若依</a>
|
||||
</p>
|
||||
@ -96,13 +96,49 @@
|
||||
<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="#v476">v4.7.6</a><code class="pull-right">2022.12.16</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v476" class="panel-collapse collapse in">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>定时任务违规的字符</li>
|
||||
<li>忽略不必要的属性数据返回</li>
|
||||
<li>导入更新用户数据前校验数据权限</li>
|
||||
<li>修改参数键名时移除前缓存配置</li>
|
||||
<li>修改用户登录账号进行重复验证</li>
|
||||
<li>兼容Excel下拉框内容过多无法显示</li>
|
||||
<li>升级oshi到最新版本6.4.0</li>
|
||||
<li>升级kaptcha到最新版2.3.3</li>
|
||||
<li>升级druid到最新版本1.2.15</li>
|
||||
<li>升级shiro到最新版本1.10.1</li>
|
||||
<li>升级pagehelper到最新版1.4.6</li>
|
||||
<li>升级bootstrap-fileinput到最新版本5.5.2</li>
|
||||
<li>修复sheet超出最大行数异常问题</li>
|
||||
<li>修复关闭父页签后提交无法跳转的问题</li>
|
||||
<li>修复操作日志类型多选导出不生效问题</li>
|
||||
<li>修复导出包含空子列表数据异常的问题</li>
|
||||
<li>优化树形表格层级显示</li>
|
||||
<li>优化SQL关键字检查防止注入</li>
|
||||
<li>优化用户管理重置时取消部门选择</li>
|
||||
<li>优化代码生成同步后字典值NULL问题</li>
|
||||
<li>优化导出对象的子列表为空会出现[]问题</li>
|
||||
<li>优化select2搜索下拉后校验必填样式问题</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="#v475">v4.7.5</a><code class="pull-right">2022.09.05</code>
|
||||
</h5>
|
||||
</div>
|
||||
<div id="v475" class="panel-collapse collapse in">
|
||||
<div id="v475" class="panel-collapse collapse">
|
||||
<div class="panel-body">
|
||||
<ol>
|
||||
<li>Excel支持导出对象的子列表方法</li>
|
||||
|
@ -18,7 +18,7 @@
|
||||
<label>操作人员: </label><input type="text" name="operName"/>
|
||||
</li>
|
||||
<li class="select-selectpicker">
|
||||
<label>操作类型: </label><select id="businessTypes" th:with="type=${@dict.getType('sys_oper_type')}" class="selectpicker" data-none-selected-text="请选择" multiple>
|
||||
<label>操作类型: </label><select id="businessTypes" name="businessTypes" th:with="type=${@dict.getType('sys_oper_type')}" class="selectpicker" data-none-selected-text="请选择" multiple>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/style.min.css" th:href="@{/css/style.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/css/login.min.css" th:href="@{/css/login.min.css}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.7.5}" rel="stylesheet"/>
|
||||
<link href="../static/ruoyi/css/ry-ui.css" th:href="@{/ruoyi/css/ry-ui.css?v=4.7.6}" rel="stylesheet"/>
|
||||
<!-- 360浏览器急速模式 -->
|
||||
<meta name="renderer" content="webkit">
|
||||
<!-- 避免IE使用兼容模式 -->
|
||||
@ -74,7 +74,7 @@
|
||||
<script src="../static/ajax/libs/validate/jquery.validate.min.js" th:src="@{/ajax/libs/validate/jquery.validate.min.js}"></script>
|
||||
<script src="../static/ajax/libs/layer/layer.min.js" th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.5}"></script>
|
||||
<script src="../static/ruoyi/js/ry-ui.js" th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
<script src="../static/ruoyi/register.js" th:src="@{/ruoyi/register.js}"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -140,7 +140,7 @@
|
||||
</ul>
|
||||
</body>
|
||||
<script th:src="@{/js/jquery.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/common.js?v=4.7.6}"></script>
|
||||
<script type="text/javascript">
|
||||
//皮肤样式列表
|
||||
var skins = ["skin-blue", "skin-green", "skin-purple", "skin-red", "skin-yellow"];
|
||||
|
@ -54,7 +54,7 @@
|
||||
</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>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="resetPre()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -221,6 +221,15 @@
|
||||
$('#btnRefresh').click(function() {
|
||||
queryDeptTree();
|
||||
});
|
||||
|
||||
/* 自定义重置-表单重置/隐藏框/树节点选择色/搜索 */
|
||||
function resetPre() {
|
||||
$("#user-form")[0].reset();
|
||||
$("#deptId").val("");
|
||||
$("#parentId").val("");
|
||||
$(".curSelectedNode").removeClass("curSelectedNode");
|
||||
$.table.search();
|
||||
}
|
||||
|
||||
/* 用户管理-部门 */
|
||||
function dept() {
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.5</version>
|
||||
<version>4.7.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -111,5 +111,5 @@ public class Constants
|
||||
* 定时任务违规的字符
|
||||
*/
|
||||
public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml",
|
||||
"org.springframework", "org.apache", "com.ruoyi.common.utils.file" };
|
||||
"org.springframework", "org.apache", "com.ruoyi.common.utils.file", "com.ruoyi.common.config" };
|
||||
}
|
@ -5,6 +5,8 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
/**
|
||||
* Entity基类
|
||||
@ -16,6 +18,7 @@ public class BaseEntity implements Serializable
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 搜索值 */
|
||||
@JsonIgnore
|
||||
private String searchValue;
|
||||
|
||||
/** 创建者 */
|
||||
@ -36,6 +39,7 @@ public class BaseEntity implements Serializable
|
||||
private String remark;
|
||||
|
||||
/** 请求参数 */
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
private Map<String, Object> params;
|
||||
|
||||
public String getSearchValue()
|
||||
|
@ -101,4 +101,14 @@ public class R<T> implements Serializable
|
||||
{
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static <T> Boolean isError(R<T> ret)
|
||||
{
|
||||
return !isSuccess(ret);
|
||||
}
|
||||
|
||||
public static <T> Boolean isSuccess(R<T> ret)
|
||||
{
|
||||
return R.SUCCESS == ret.getCode();
|
||||
}
|
||||
}
|
||||
|
@ -713,7 +713,7 @@ public class Convert
|
||||
}
|
||||
if (value instanceof Double)
|
||||
{
|
||||
return new BigDecimal((Double) value);
|
||||
return BigDecimal.valueOf((Double) value);
|
||||
}
|
||||
if (value instanceof Integer)
|
||||
{
|
||||
|
@ -1,87 +0,0 @@
|
||||
package com.ruoyi.common.utils;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import org.yaml.snakeyaml.DumperOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* 配置处理工具类
|
||||
*
|
||||
* @author yml
|
||||
*/
|
||||
public class YamlUtil
|
||||
{
|
||||
public static Map<?, ?> loadYaml(String fileName) throws FileNotFoundException
|
||||
{
|
||||
InputStream in = YamlUtil.class.getClassLoader().getResourceAsStream(fileName);
|
||||
return StringUtils.isNotEmpty(fileName) ? (LinkedHashMap<?, ?>) new Yaml().load(in) : null;
|
||||
}
|
||||
|
||||
public static void dumpYaml(String fileName, Map<?, ?> map) throws IOException
|
||||
{
|
||||
if (StringUtils.isNotEmpty(fileName))
|
||||
{
|
||||
FileWriter fileWriter = new FileWriter(YamlUtil.class.getResource(fileName).getFile());
|
||||
DumperOptions options = new DumperOptions();
|
||||
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
Yaml yaml = new Yaml(options);
|
||||
yaml.dump(map, fileWriter);
|
||||
}
|
||||
}
|
||||
|
||||
public static Object getProperty(Map<?, ?> map, Object qualifiedKey)
|
||||
{
|
||||
if (map != null && !map.isEmpty() && qualifiedKey != null)
|
||||
{
|
||||
String input = String.valueOf(qualifiedKey);
|
||||
if (!"".equals(input))
|
||||
{
|
||||
if (input.contains("."))
|
||||
{
|
||||
int index = input.indexOf(".");
|
||||
String left = input.substring(0, index);
|
||||
String right = input.substring(index + 1, input.length());
|
||||
return getProperty((Map<?, ?>) map.get(left), right);
|
||||
}
|
||||
else if (map.containsKey(input))
|
||||
{
|
||||
return map.get(input);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void setProperty(Map<?, ?> map, Object qualifiedKey, Object value)
|
||||
{
|
||||
if (map != null && !map.isEmpty() && qualifiedKey != null)
|
||||
{
|
||||
String input = String.valueOf(qualifiedKey);
|
||||
if (!input.equals(""))
|
||||
{
|
||||
if (input.contains("."))
|
||||
{
|
||||
int index = input.indexOf(".");
|
||||
String left = input.substring(0, index);
|
||||
String right = input.substring(index + 1, input.length());
|
||||
setProperty((Map<?, ?>) map.get(left), right, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
((Map<Object, Object>) map).put(qualifiedKey, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -102,8 +102,8 @@ public class FileUploadUtils
|
||||
throws FileSizeLimitExceededException, IOException, FileNameLengthLimitExceededException,
|
||||
InvalidExtensionException
|
||||
{
|
||||
int fileNamelength = Objects.requireNonNull(file.getOriginalFilename()).length();
|
||||
if (fileNamelength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH)
|
||||
int fileNameLength = Objects.requireNonNull(file.getOriginalFilename()).length();
|
||||
if (fileNameLength > FileUploadUtils.DEFAULT_FILE_NAME_LENGTH)
|
||||
{
|
||||
throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
|
||||
}
|
||||
|
@ -116,8 +116,7 @@ public class FileUtils
|
||||
// 路径为文件且不为空则进行删除
|
||||
if (file.isFile() && file.exists())
|
||||
{
|
||||
file.delete();
|
||||
flag = true;
|
||||
flag = file.delete();
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ import org.apache.poi.ss.usermodel.FillPatternType;
|
||||
import org.apache.poi.ss.usermodel.Font;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.IndexedColors;
|
||||
import org.apache.poi.ss.usermodel.Name;
|
||||
import org.apache.poi.ss.usermodel.PictureData;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
@ -689,17 +690,24 @@ public class ExcelUtil<T>
|
||||
int rowNo = (1 + rownum) - startNo;
|
||||
for (int i = startNo; i < endNo; i++)
|
||||
{
|
||||
rowNo = i > 1 ? rowNo + 1 : rowNo + i;
|
||||
rowNo = isSubList() ? (i > 1 ? rowNo + 1 : rowNo + i) : i + 1 + rownum - startNo;
|
||||
row = sheet.createRow(rowNo);
|
||||
// 得到导出对象.
|
||||
T vo = (T) list.get(i);
|
||||
Collection<?> subList = null;
|
||||
if (isSubListValue(vo))
|
||||
if (isSubList())
|
||||
{
|
||||
subList = getListCellValue(vo);
|
||||
subMergedLastRowNum = subMergedLastRowNum + subList.size();
|
||||
if (isSubListValue(vo))
|
||||
{
|
||||
subList = getListCellValue(vo);
|
||||
subMergedLastRowNum = subMergedLastRowNum + subList.size();
|
||||
}
|
||||
else
|
||||
{
|
||||
subMergedFirstRowNum++;
|
||||
subMergedLastRowNum++;
|
||||
}
|
||||
}
|
||||
|
||||
int column = 0;
|
||||
for (Object[] os : fields)
|
||||
{
|
||||
@ -808,7 +816,6 @@ public class ExcelUtil<T>
|
||||
if (!headerStyles.containsKey(key))
|
||||
{
|
||||
CellStyle style = wb.createCellStyle();
|
||||
style = wb.createCellStyle();
|
||||
style.cloneStyleFrom(styles.get("data"));
|
||||
style.setAlignment(HorizontalAlignment.CENTER);
|
||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
@ -842,7 +849,6 @@ public class ExcelUtil<T>
|
||||
if (!styles.containsKey(key))
|
||||
{
|
||||
CellStyle style = wb.createCellStyle();
|
||||
style = wb.createCellStyle();
|
||||
style.setAlignment(excel.align());
|
||||
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
style.setBorderRight(BorderStyle.THIN);
|
||||
@ -906,6 +912,10 @@ public class ExcelUtil<T>
|
||||
{
|
||||
cellValue = RegExUtils.replaceFirst(cellValue, FORMULA_REGEX_STR, "\t$0");
|
||||
}
|
||||
if (value instanceof Collection && StringUtils.equals("[]", cellValue))
|
||||
{
|
||||
cellValue = StringUtils.EMPTY;
|
||||
}
|
||||
cell.setCellValue(StringUtils.isNull(cellValue) ? attr.defaultValue() : cellValue + attr.suffix());
|
||||
}
|
||||
else if (ColumnType.NUMERIC == attr.cellType())
|
||||
@ -973,8 +983,16 @@ public class ExcelUtil<T>
|
||||
}
|
||||
if (StringUtils.isNotEmpty(attr.prompt()) || attr.combo().length > 0)
|
||||
{
|
||||
// 提示信息或只能选择不能输入的列内容.
|
||||
setPromptOrValidation(sheet, attr.combo(), attr.prompt(), 1, 100, column, column);
|
||||
if (attr.combo().length > 15 || StringUtils.join(attr.combo()).length() > 255)
|
||||
{
|
||||
// 如果下拉数大于15或字符串长度大于255,则使用一个新sheet存储,避免生成的模板下拉值获取不到
|
||||
setXSSFValidationWithHidden(sheet, attr.combo(), attr.prompt(), 1, 100, column, column);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 提示信息或只能选择不能输入的列内容.
|
||||
setPromptOrValidation(sheet, attr.combo(), attr.prompt(), 1, 100, column, column);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1078,6 +1096,58 @@ public class ExcelUtil<T>
|
||||
sheet.addValidationData(dataValidation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置某些列的值只能输入预制的数据,显示下拉框(兼容超出一定数量的下拉框).
|
||||
*
|
||||
* @param sheet 要设置的sheet.
|
||||
* @param textlist 下拉框显示的内容
|
||||
* @param promptContent 提示内容
|
||||
* @param firstRow 开始行
|
||||
* @param endRow 结束行
|
||||
* @param firstCol 开始列
|
||||
* @param endCol 结束列
|
||||
*/
|
||||
public void setXSSFValidationWithHidden(Sheet sheet, String[] textlist, String promptContent, int firstRow, int endRow, int firstCol, int endCol)
|
||||
{
|
||||
String hideSheetName = "combo_" + firstCol + "_" + endCol;
|
||||
Sheet hideSheet = wb.createSheet(hideSheetName); // 用于存储 下拉菜单数据
|
||||
for (int i = 0; i < textlist.length; i++)
|
||||
{
|
||||
hideSheet.createRow(i).createCell(0).setCellValue(textlist[i]);
|
||||
}
|
||||
// 创建名称,可被其他单元格引用
|
||||
Name name = wb.createName();
|
||||
name.setNameName(hideSheetName + "_data");
|
||||
name.setRefersToFormula(hideSheetName + "!$A$1:$A$" + textlist.length);
|
||||
DataValidationHelper helper = sheet.getDataValidationHelper();
|
||||
// 加载下拉列表内容
|
||||
DataValidationConstraint constraint = helper.createFormulaListConstraint(hideSheetName + "_data");
|
||||
// 设置数据有效性加载在哪个单元格上,四个参数分别是:起始行、终止行、起始列、终止列
|
||||
CellRangeAddressList regions = new CellRangeAddressList(firstRow, endRow, firstCol, endCol);
|
||||
// 数据有效性对象
|
||||
DataValidation dataValidation = helper.createValidation(constraint, regions);
|
||||
if (StringUtils.isNotEmpty(promptContent))
|
||||
{
|
||||
// 如果设置了提示信息则鼠标放上去提示
|
||||
dataValidation.createPromptBox("", promptContent);
|
||||
dataValidation.setShowPromptBox(true);
|
||||
}
|
||||
// 处理Excel兼容性问题
|
||||
if (dataValidation instanceof XSSFDataValidation)
|
||||
{
|
||||
dataValidation.setSuppressDropDownArrow(true);
|
||||
dataValidation.setShowErrorBox(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
dataValidation.setSuppressDropDownArrow(false);
|
||||
}
|
||||
|
||||
sheet.addValidationData(dataValidation);
|
||||
// 设置hiddenSheet隐藏
|
||||
wb.setSheetHidden(wb.getSheetIndex(hideSheet), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解析导出值 0=男,1=女,2=未知
|
||||
*
|
||||
|
@ -13,7 +13,7 @@ public class SqlUtil
|
||||
/**
|
||||
* 定义常用的 sql关键字
|
||||
*/
|
||||
public static String SQL_REGEX = "select |insert |delete |update |drop |count |exec |chr |mid |master |truncate |char |and |declare ";
|
||||
public static String SQL_REGEX = "and |extractvalue|updatexml|exec |insert |select |delete |update |drop |count |chr |mid |master |truncate |char |declare |or |+|user()";
|
||||
|
||||
/**
|
||||
* 仅支持字母、数字、下划线、空格、逗号、小数点(支持多个字段排序)
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.5</version>
|
||||
<version>4.7.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -17,8 +17,8 @@
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- SpringBoot Web容器 -->
|
||||
<dependency>
|
||||
<!-- SpringBoot Web容器 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
@ -37,7 +37,7 @@
|
||||
|
||||
<!-- 验证码 -->
|
||||
<dependency>
|
||||
<groupId>com.github.penggle</groupId>
|
||||
<groupId>pro.fessional</groupId>
|
||||
<artifactId>kaptcha</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
|
@ -82,7 +82,7 @@ public class LogAspect
|
||||
// 请求的地址
|
||||
String ip = ShiroUtils.getIp();
|
||||
operLog.setOperIp(ip);
|
||||
operLog.setOperUrl(ServletUtils.getRequest().getRequestURI());
|
||||
operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255));
|
||||
if (currentUser != null)
|
||||
{
|
||||
operLog.setOperName(currentUser.getLoginName());
|
||||
|
@ -58,7 +58,7 @@ public class SysRegisterService
|
||||
{
|
||||
msg = "账户长度必须在2到20个字符之间";
|
||||
}
|
||||
else if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(loginName)))
|
||||
else if (UserConstants.USER_NAME_NOT_UNIQUE.equals(userService.checkLoginNameUnique(user)))
|
||||
{
|
||||
msg = "保存用户'" + loginName + "'失败,注册账号已存在";
|
||||
}
|
||||
@ -67,7 +67,7 @@ public class SysRegisterService
|
||||
user.setPwdUpdateDate(DateUtils.getNowDate());
|
||||
user.setUserName(loginName);
|
||||
user.setSalt(ShiroUtils.randomSalt());
|
||||
user.setPassword(passwordService.encryptPassword(user.getLoginName(), user.getPassword(), user.getSalt()));
|
||||
user.setPassword(passwordService.encryptPassword(loginName, password, user.getSalt()));
|
||||
boolean regFlag = userService.registerUser(user);
|
||||
if (!regFlag)
|
||||
{
|
||||
|
@ -7,7 +7,6 @@ import org.apache.shiro.session.mgt.SessionFactory;
|
||||
import org.apache.shiro.web.session.mgt.WebSessionContext;
|
||||
import org.springframework.stereotype.Component;
|
||||
import com.ruoyi.common.utils.IpUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import eu.bitwalker.useragentutils.UserAgent;
|
||||
|
||||
/**
|
||||
@ -28,7 +27,7 @@ public class OnlineSessionFactory implements SessionFactory
|
||||
HttpServletRequest request = (HttpServletRequest) sessionContext.getServletRequest();
|
||||
if (request != null)
|
||||
{
|
||||
UserAgent userAgent = UserAgent.parseUserAgentString(ServletUtils.getRequest().getHeader("User-Agent"));
|
||||
UserAgent userAgent = UserAgent.parseUserAgentString(request.getHeader("User-Agent"));
|
||||
// 获取客户端操作系统
|
||||
String os = userAgent.getOperatingSystem().getName();
|
||||
// 获取客户端浏览器
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.5</version>
|
||||
<version>4.7.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -222,7 +222,7 @@ public class GenController extends BaseController
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.error(e.getMessage(), e);
|
||||
return AjaxResult.error("创建表结构异常[" + e.getMessage() + "]");
|
||||
return AjaxResult.error("创建表结构异常");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ public class GenTableColumn extends BaseEntity
|
||||
private String htmlType;
|
||||
|
||||
/** 字典类型 */
|
||||
private String dictType;
|
||||
private String dictType = "";
|
||||
|
||||
/** 排序 */
|
||||
private Integer sort;
|
||||
|
@ -130,9 +130,9 @@ public class GenTableServiceImpl implements IGenTableService
|
||||
int row = genTableMapper.updateGenTable(genTable);
|
||||
if (row > 0)
|
||||
{
|
||||
for (GenTableColumn cenTableColumn : genTable.getColumns())
|
||||
for (GenTableColumn genTableColumn : genTable.getColumns())
|
||||
{
|
||||
genTableColumnMapper.updateGenTableColumn(cenTableColumn);
|
||||
genTableColumnMapper.updateGenTableColumn(genTableColumn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.5</version>
|
||||
<version>4.7.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -66,7 +66,7 @@ public abstract class AbstractQuartzJob implements Job
|
||||
* 执行后
|
||||
*
|
||||
* @param context 工作执行上下文对象
|
||||
* @param sysScheduleJob 系统计划任务
|
||||
* @param sysJob 系统计划任务
|
||||
*/
|
||||
protected void after(JobExecutionContext context, SysJob sysJob, Exception e)
|
||||
{
|
||||
|
@ -1131,7 +1131,7 @@
|
||||
<script th:src="@{/js/jquery.min.js}"></script>
|
||||
<script th:src="@{/js/bootstrap.min.js}"></script>
|
||||
<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.5}"></script>
|
||||
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.6}"></script>
|
||||
<script th:src="@{/js/cron.js}"></script>
|
||||
<script th:inline="javascript">
|
||||
var prefix = [[@{/}]] + "monitor/job";
|
||||
|
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>ruoyi</artifactId>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<version>4.7.5</version>
|
||||
<version>4.7.6</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
@ -18,6 +18,14 @@ public interface SysConfigMapper
|
||||
*/
|
||||
public SysConfig selectConfig(SysConfig config);
|
||||
|
||||
/**
|
||||
* 通过ID查询配置
|
||||
*
|
||||
* @param configId 参数ID
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
public SysConfig selectConfigById(Long configId);
|
||||
|
||||
/**
|
||||
* 查询参数配置列表
|
||||
*
|
||||
|
@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.entity.SysDept;
|
||||
public interface SysDeptMapper
|
||||
{
|
||||
/**
|
||||
* 查询部门人数
|
||||
* 查询下级部门数量
|
||||
*
|
||||
* @param dept 部门信息
|
||||
* @return 结果
|
||||
|
@ -104,7 +104,7 @@ public interface SysUserMapper
|
||||
* @param loginName 登录名称
|
||||
* @return 结果
|
||||
*/
|
||||
public int checkLoginNameUnique(String loginName);
|
||||
public SysUser checkLoginNameUnique(String loginName);
|
||||
|
||||
/**
|
||||
* 校验手机号码是否唯一
|
||||
|
@ -45,7 +45,7 @@ public interface ISysDeptService
|
||||
public List<Ztree> roleDeptTreeData(SysRole role);
|
||||
|
||||
/**
|
||||
* 查询部门人数
|
||||
* 根据父部门ID查询下级部门数量
|
||||
*
|
||||
* @param parentId 父部门ID
|
||||
* @return 结果
|
||||
|
@ -143,10 +143,10 @@ public interface ISysUserService
|
||||
/**
|
||||
* 校验用户名称是否唯一
|
||||
*
|
||||
* @param loginName 登录名称
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
public String checkLoginNameUnique(String loginName);
|
||||
public String checkLoginNameUnique(SysUser user);
|
||||
|
||||
/**
|
||||
* 校验手机号码是否唯一
|
||||
|
@ -111,6 +111,12 @@ public class SysConfigServiceImpl implements ISysConfigService
|
||||
@Override
|
||||
public int updateConfig(SysConfig config)
|
||||
{
|
||||
SysConfig temp = configMapper.selectConfigById(config.getConfigId());
|
||||
if (!StringUtils.equals(temp.getConfigKey(), config.getConfigKey()))
|
||||
{
|
||||
CacheUtils.remove(getCacheName(), getCacheKey(temp.getConfigKey()));
|
||||
}
|
||||
|
||||
int row = configMapper.updateConfig(config);
|
||||
if (row > 0)
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询部门人数
|
||||
* 根据父部门ID查询下级部门数量
|
||||
*
|
||||
* @param parentId 部门ID
|
||||
* @return 结果
|
||||
|
@ -347,16 +347,17 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验登录名称是否唯一
|
||||
* 校验用户名称是否唯一
|
||||
*
|
||||
* @param loginName 用户名
|
||||
* @return
|
||||
* @param user 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public String checkLoginNameUnique(String loginName)
|
||||
public String checkLoginNameUnique(SysUser user)
|
||||
{
|
||||
int count = userMapper.checkLoginNameUnique(loginName);
|
||||
if (count > 0)
|
||||
Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId();
|
||||
SysUser info = userMapper.checkLoginNameUnique(user.getLoginName());
|
||||
if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue())
|
||||
{
|
||||
return UserConstants.USER_NAME_NOT_UNIQUE;
|
||||
}
|
||||
@ -505,6 +506,8 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
else if (isUpdateSupport)
|
||||
{
|
||||
BeanValidators.validateWithException(validator, user);
|
||||
checkUserAllowed(user);
|
||||
checkUserDataScope(user.getUserId());
|
||||
user.setUpdateBy(operName);
|
||||
this.updateUser(user);
|
||||
successNum++;
|
||||
|
@ -59,6 +59,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectConfigById" parameterType="Long" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
where config_id = #{configId}
|
||||
</select>
|
||||
|
||||
<select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
where config_key = #{configKey} limit 1
|
||||
|
@ -138,8 +138,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where u.email = #{email} and u.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="checkLoginNameUnique" parameterType="String" resultType="int">
|
||||
select count(1) from sys_user where login_name=#{loginName} and del_flag = '0' limit 1
|
||||
<select id="checkLoginNameUnique" parameterType="String" resultMap="SysUserResult">
|
||||
select user_id, login_name from sys_user where login_name=#{loginName} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
|
||||
|
Reference in New Issue
Block a user