Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
511ff0f1
Commit
511ff0f1
authored
Feb 28, 2025
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
bf46e38c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
33 additions
and
17 deletions
+33
-17
TableDataInfo.java
...c/main/java/com/ruoyi/common/core/page/TableDataInfo.java
+1
-1
Arith.java
ruoyi-common/src/main/java/com/ruoyi/common/utils/Arith.java
+1
-2
StringUtils.java
...mon/src/main/java/com/ruoyi/common/utils/StringUtils.java
+26
-0
ExcelUtil.java
...n/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
+1
-2
LogAspect.java
.../src/main/java/com/ruoyi/framework/aspectj/LogAspect.java
+1
-1
SysPermissionService.java
...com/ruoyi/framework/web/service/SysPermissionService.java
+1
-1
TokenService.java
...in/java/com/ruoyi/framework/web/service/TokenService.java
+1
-0
JobInvokeUtil.java
...tz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java
+1
-1
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+0
-1
index.vue
ruoyi-ui/src/views/index.vue
+0
-8
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/core/page/TableDataInfo.java
View file @
511ff0f1
...
@@ -37,7 +37,7 @@ public class TableDataInfo implements Serializable
...
@@ -37,7 +37,7 @@ public class TableDataInfo implements Serializable
* @param list 列表数据
* @param list 列表数据
* @param total 总记录数
* @param total 总记录数
*/
*/
public
TableDataInfo
(
List
<?>
list
,
int
total
)
public
TableDataInfo
(
List
<?>
list
,
long
total
)
{
{
this
.
rows
=
list
;
this
.
rows
=
list
;
this
.
total
=
total
;
this
.
total
=
total
;
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/Arith.java
View file @
511ff0f1
...
@@ -108,7 +108,6 @@ public class Arith
...
@@ -108,7 +108,6 @@ public class Arith
"The scale must be a positive integer or zero"
);
"The scale must be a positive integer or zero"
);
}
}
BigDecimal
b
=
new
BigDecimal
(
Double
.
toString
(
v
));
BigDecimal
b
=
new
BigDecimal
(
Double
.
toString
(
v
));
BigDecimal
one
=
BigDecimal
.
ONE
;
return
b
.
divide
(
BigDecimal
.
ONE
,
scale
,
RoundingMode
.
HALF_UP
).
doubleValue
();
return
b
.
divide
(
one
,
scale
,
RoundingMode
.
HALF_UP
).
doubleValue
();
}
}
}
}
ruoyi-common/src/main/java/com/ruoyi/common/utils/StringUtils.java
View file @
511ff0f1
...
@@ -286,6 +286,32 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
...
@@ -286,6 +286,32 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
return
str
.
substring
(
start
,
end
);
return
str
.
substring
(
start
,
end
);
}
}
/**
* 在字符串中查找第一个出现的 `open` 和最后一个出现的 `close` 之间的子字符串
*
* @param str 要截取的字符串
* @param open 起始字符串
* @param close 结束字符串
* @return 截取结果
*/
public
static
String
substringBetweenLast
(
final
String
str
,
final
String
open
,
final
String
close
)
{
if
(
isEmpty
(
str
)
||
isEmpty
(
open
)
||
isEmpty
(
close
))
{
return
NULLSTR
;
}
final
int
start
=
str
.
indexOf
(
open
);
if
(
start
!=
INDEX_NOT_FOUND
)
{
final
int
end
=
str
.
lastIndexOf
(
close
);
if
(
end
!=
INDEX_NOT_FOUND
)
{
return
str
.
substring
(
start
+
open
.
length
(),
end
);
}
}
return
NULLSTR
;
}
/**
/**
* 判断是否为空,并且不是空白字符
* 判断是否为空,并且不是空白字符
*
*
...
...
ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java
View file @
511ff0f1
...
@@ -1448,8 +1448,7 @@ public class ExcelUtil<T>
...
@@ -1448,8 +1448,7 @@ public class ExcelUtil<T>
*/
*/
public
String
encodingFilename
(
String
filename
)
public
String
encodingFilename
(
String
filename
)
{
{
filename
=
UUID
.
randomUUID
()
+
"_"
+
filename
+
".xlsx"
;
return
UUID
.
randomUUID
()
+
"_"
+
filename
+
".xlsx"
;
return
filename
;
}
}
/**
/**
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java
View file @
511ff0f1
...
@@ -52,7 +52,7 @@ public class LogAspect
...
@@ -52,7 +52,7 @@ public class LogAspect
* 处理请求前执行
* 处理请求前执行
*/
*/
@Before
(
value
=
"@annotation(controllerLog)"
)
@Before
(
value
=
"@annotation(controllerLog)"
)
public
void
b
oBefore
(
JoinPoint
joinPoint
,
Log
controllerLog
)
public
void
d
oBefore
(
JoinPoint
joinPoint
,
Log
controllerLog
)
{
{
TIME_THREADLOCAL
.
set
(
System
.
currentTimeMillis
());
TIME_THREADLOCAL
.
set
(
System
.
currentTimeMillis
());
}
}
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysPermissionService.java
View file @
511ff0f1
...
@@ -70,7 +70,7 @@ public class SysPermissionService
...
@@ -70,7 +70,7 @@ public class SysPermissionService
// 多角色设置permissions属性,以便数据权限匹配权限
// 多角色设置permissions属性,以便数据权限匹配权限
for
(
SysRole
role
:
roles
)
for
(
SysRole
role
:
roles
)
{
{
if
(
StringUtils
.
equals
(
role
.
getStatus
(),
UserConstants
.
ROLE_NORMAL
))
if
(
StringUtils
.
equals
(
role
.
getStatus
(),
UserConstants
.
ROLE_NORMAL
)
&&
!
role
.
isAdmin
()
)
{
{
Set
<
String
>
rolePerms
=
menuService
.
selectMenuPermsByRoleId
(
role
.
getRoleId
());
Set
<
String
>
rolePerms
=
menuService
.
selectMenuPermsByRoleId
(
role
.
getRoleId
());
role
.
setPermissions
(
rolePerms
);
role
.
setPermissions
(
rolePerms
);
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/TokenService.java
View file @
511ff0f1
...
@@ -120,6 +120,7 @@ public class TokenService
...
@@ -120,6 +120,7 @@ public class TokenService
Map
<
String
,
Object
>
claims
=
new
HashMap
<>();
Map
<
String
,
Object
>
claims
=
new
HashMap
<>();
claims
.
put
(
Constants
.
LOGIN_USER_KEY
,
token
);
claims
.
put
(
Constants
.
LOGIN_USER_KEY
,
token
);
claims
.
put
(
Constants
.
JWT_USERNAME
,
loginUser
.
getUsername
());
return
createToken
(
claims
);
return
createToken
(
claims
);
}
}
...
...
ruoyi-quartz/src/main/java/com/ruoyi/quartz/util/JobInvokeUtil.java
View file @
511ff0f1
...
@@ -105,7 +105,7 @@ public class JobInvokeUtil
...
@@ -105,7 +105,7 @@ public class JobInvokeUtil
*/
*/
public
static
List
<
Object
[]>
getMethodParams
(
String
invokeTarget
)
public
static
List
<
Object
[]>
getMethodParams
(
String
invokeTarget
)
{
{
String
methodStr
=
StringUtils
.
substringBetween
(
invokeTarget
,
"("
,
")"
);
String
methodStr
=
StringUtils
.
substringBetween
Last
(
invokeTarget
,
"("
,
")"
);
if
(
StringUtils
.
isEmpty
(
methodStr
))
if
(
StringUtils
.
isEmpty
(
methodStr
))
{
{
return
null
;
return
null
;
...
...
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
511ff0f1
...
@@ -178,7 +178,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -178,7 +178,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_user
update sys_user
<set>
<set>
<if
test=
"deptId != null and deptId != 0"
>
dept_id = #{deptId},
</if>
<if
test=
"deptId != null and deptId != 0"
>
dept_id = #{deptId},
</if>
<if
test=
"userName != null and userName != ''"
>
user_name = #{userName},
</if>
<if
test=
"nickName != null and nickName != ''"
>
nick_name = #{nickName},
</if>
<if
test=
"nickName != null and nickName != ''"
>
nick_name = #{nickName},
</if>
<if
test=
"email != null "
>
email = #{email},
</if>
<if
test=
"email != null "
>
email = #{email},
</if>
<if
test=
"phonenumber != null "
>
phonenumber = #{phonenumber},
</if>
<if
test=
"phonenumber != null "
>
phonenumber = #{phonenumber},
</if>
...
...
ruoyi-ui/src/views/index.vue
View file @
511ff0f1
<
template
>
<
template
>
<div
class=
"app-container home"
>
<div
class=
"app-container home"
>
<el-row
:gutter=
"20"
>
<el-col
:sm=
"24"
:lg=
"24"
>
<blockquote
class=
"text-warning"
style=
"font-size: 14px"
>
阿里云服务器折扣区
<el-link
href=
"http://aly.ruoyi.vip"
type=
"primary"
target=
"_blank"
>
☛☛点我进入☚☚
</el-link>
腾讯云服务器秒杀区
<el-link
href=
"http://txy.ruoyi.vip"
type=
"primary"
target=
"_blank"
>
☛☛点我进入☚☚
</el-link>
</blockquote>
<hr
/>
</el-col>
</el-row>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
>
<el-col
:sm=
"24"
:lg=
"12"
style=
"padding-left: 20px"
>
<el-col
:sm=
"24"
:lg=
"12"
style=
"padding-left: 20px"
>
<h2>
若依后台管理框架
</h2>
<h2>
若依后台管理框架
</h2>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment