Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fgqyxxlr
Overview
Overview
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
yaru
fgqyxxlr
Commits
fc862841
Commit
fc862841
authored
Aug 01, 2018
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化条件判断
parent
f6798b90
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
21 additions
and
15 deletions
+21
-15
src/main/java/com/ruoyi/project/monitor/online/service/UserOnlineServiceImpl.java
+3
-2
src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java
+2
-1
src/main/java/com/ruoyi/project/system/dept/controller/DeptController.java
+2
-1
src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java
+2
-1
src/main/java/com/ruoyi/project/system/dict/service/DictTypeServiceImpl.java
+1
-1
src/main/java/com/ruoyi/project/system/menu/controller/MenuController.java
+2
-1
src/main/java/com/ruoyi/project/system/post/service/PostServiceImpl.java
+1
-1
src/main/java/com/ruoyi/project/system/role/controller/RoleController.java
+3
-2
src/main/java/com/ruoyi/project/system/role/service/RoleServiceImpl.java
+1
-1
src/main/java/com/ruoyi/project/system/user/controller/LoginController.java
+1
-1
src/main/java/com/ruoyi/project/system/user/controller/UserController.java
+3
-3
No files found.
src/main/java/com/ruoyi/project/monitor/online/service/UserOnlineServiceImpl.java
View file @
fc862841
...
...
@@ -6,6 +6,7 @@ import org.apache.shiro.session.Session;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.ruoyi.common.utils.DateUtils
;
import
com.ruoyi.common.utils.StringUtils
;
import
com.ruoyi.framework.shiro.session.OnlineSessionDAO
;
import
com.ruoyi.project.monitor.online.domain.UserOnline
;
import
com.ruoyi.project.monitor.online.mapper.UserOnlineMapper
;
...
...
@@ -46,7 +47,7 @@ public class UserOnlineServiceImpl implements IUserOnlineService
public
void
deleteOnlineById
(
String
sessionId
)
{
UserOnline
userOnline
=
selectOnlineById
(
sessionId
);
if
(
userOnline
!=
null
)
if
(
StringUtils
.
isNotNull
(
userOnline
)
)
{
userOnlineDao
.
deleteOnlineById
(
sessionId
);
}
...
...
@@ -64,7 +65,7 @@ public class UserOnlineServiceImpl implements IUserOnlineService
for
(
String
sessionId
:
sessions
)
{
UserOnline
userOnline
=
selectOnlineById
(
sessionId
);
if
(
userOnline
!=
null
)
if
(
StringUtils
.
isNotNull
(
userOnline
)
)
{
userOnlineDao
.
deleteOnlineById
(
sessionId
);
}
...
...
src/main/java/com/ruoyi/project/system/config/controller/ConfigController.java
View file @
fc862841
...
...
@@ -10,6 +10,7 @@ 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.utils.StringUtils
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.constant.BusinessType
;
...
...
@@ -134,7 +135,7 @@ public class ConfigController extends BaseController
public
String
checkConfigKeyUnique
(
Config
config
)
{
String
uniqueFlag
=
"0"
;
if
(
config
!=
null
)
if
(
StringUtils
.
isNotNull
(
config
)
)
{
uniqueFlag
=
configService
.
checkConfigKeyUnique
(
config
);
}
...
...
src/main/java/com/ruoyi/project/system/dept/controller/DeptController.java
View file @
fc862841
...
...
@@ -11,6 +11,7 @@ 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.utils.StringUtils
;
import
com.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.constant.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
@@ -120,7 +121,7 @@ public class DeptController extends BaseController
public
String
checkDeptNameUnique
(
Dept
dept
)
{
String
uniqueFlag
=
"0"
;
if
(
dept
!=
null
)
if
(
StringUtils
.
isNotNull
(
dept
)
)
{
uniqueFlag
=
deptService
.
checkDeptNameUnique
(
dept
);
}
...
...
src/main/java/com/ruoyi/project/system/dict/controller/DictTypeController.java
View file @
fc862841
...
...
@@ -10,6 +10,7 @@ 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.utils.StringUtils
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.constant.BusinessType
;
...
...
@@ -147,7 +148,7 @@ public class DictTypeController extends BaseController
public
String
checkDictTypeUnique
(
DictType
dictType
)
{
String
uniqueFlag
=
"0"
;
if
(
dictType
!=
null
)
if
(
StringUtils
.
isNotNull
(
dictType
)
)
{
uniqueFlag
=
dictTypeService
.
checkDictTypeUnique
(
dictType
);
}
...
...
src/main/java/com/ruoyi/project/system/dict/service/DictTypeServiceImpl.java
View file @
fc862841
...
...
@@ -133,7 +133,7 @@ public class DictTypeServiceImpl implements IDictTypeService
{
Long
dictId
=
StringUtils
.
isNull
(
dict
.
getDictId
())
?
-
1L
:
dict
.
getDictId
();
DictType
dictType
=
dictTypeMapper
.
checkDictTypeUnique
(
dict
.
getDictType
());
if
(
StringUtils
.
isNotNull
(
dictType
)
&&
dictType
.
getDictId
()
!=
dictId
)
if
(
StringUtils
.
isNotNull
(
dictType
)
&&
dictType
.
getDictId
()
.
longValue
()
!=
dictId
.
longValue
()
)
{
return
UserConstants
.
DICT_TYPE_NOT_UNIQUE
;
}
...
...
src/main/java/com/ruoyi/project/system/menu/controller/MenuController.java
View file @
fc862841
...
...
@@ -11,6 +11,7 @@ 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.utils.StringUtils
;
import
com.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.constant.BusinessType
;
import
com.ruoyi.framework.web.controller.BaseController
;
...
...
@@ -142,7 +143,7 @@ public class MenuController extends BaseController
public
String
checkMenuNameUnique
(
Menu
menu
)
{
String
uniqueFlag
=
"0"
;
if
(
menu
!=
null
)
if
(
StringUtils
.
isNotNull
(
menu
)
)
{
uniqueFlag
=
menuService
.
checkMenuNameUnique
(
menu
);
}
...
...
src/main/java/com/ruoyi/project/system/post/service/PostServiceImpl.java
View file @
fc862841
...
...
@@ -61,7 +61,7 @@ public class PostServiceImpl implements IPostService
{
for
(
Post
userRole
:
userPosts
)
{
if
(
post
.
getPostId
()
==
userRole
.
getPostId
())
if
(
post
.
getPostId
()
.
longValue
()
==
userRole
.
getPostId
().
longValue
())
{
post
.
setFlag
(
true
);
break
;
...
...
src/main/java/com/ruoyi/project/system/role/controller/RoleController.java
View file @
fc862841
...
...
@@ -11,6 +11,7 @@ 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.utils.StringUtils
;
import
com.ruoyi.common.utils.poi.ExcelUtil
;
import
com.ruoyi.framework.aspectj.lang.annotation.Log
;
import
com.ruoyi.framework.aspectj.lang.constant.BusinessType
;
...
...
@@ -140,7 +141,7 @@ public class RoleController extends BaseController
public
String
checkRoleNameUnique
(
Role
role
)
{
String
uniqueFlag
=
"0"
;
if
(
role
!=
null
)
if
(
StringUtils
.
isNotNull
(
role
)
)
{
uniqueFlag
=
roleService
.
checkRoleNameUnique
(
role
);
}
...
...
@@ -155,7 +156,7 @@ public class RoleController extends BaseController
public
String
checkRoleKeyUnique
(
Role
role
)
{
String
uniqueFlag
=
"0"
;
if
(
role
!=
null
)
if
(
StringUtils
.
isNotNull
(
role
)
)
{
uniqueFlag
=
roleService
.
checkRoleKeyUnique
(
role
);
}
...
...
src/main/java/com/ruoyi/project/system/role/service/RoleServiceImpl.java
View file @
fc862841
...
...
@@ -83,7 +83,7 @@ public class RoleServiceImpl implements IRoleService
{
for
(
Role
userRole
:
userRoles
)
{
if
(
role
.
getRoleId
()
==
userRole
.
getRoleId
())
if
(
role
.
getRoleId
()
.
longValue
()
==
userRole
.
getRoleId
().
longValue
())
{
role
.
setFlag
(
true
);
break
;
...
...
src/main/java/com/ruoyi/project/system/user/controller/LoginController.java
View file @
fc862841
...
...
@@ -28,7 +28,7 @@ public class LoginController extends BaseController
public
String
login
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
// 如果是Ajax请求,返回Json字符串。
if
(
ServletUtils
.
isAjaxRequest
(
(
HttpServletRequest
)
request
))
if
(
ServletUtils
.
isAjaxRequest
(
request
))
{
return
ServletUtils
.
renderString
(
response
,
"{\"code\":\"1\",\"msg\":\"未登录或登录超时。请重新登录\"}"
);
}
...
...
src/main/java/com/ruoyi/project/system/user/controller/UserController.java
View file @
fc862841
...
...
@@ -177,7 +177,7 @@ public class UserController extends BaseController
public
String
checkLoginNameUnique
(
User
user
)
{
String
uniqueFlag
=
"0"
;
if
(
user
!=
null
)
if
(
StringUtils
.
isNotNull
(
user
)
)
{
uniqueFlag
=
userService
.
checkLoginNameUnique
(
user
.
getLoginName
());
}
...
...
@@ -192,7 +192,7 @@ public class UserController extends BaseController
public
String
checkPhoneUnique
(
User
user
)
{
String
uniqueFlag
=
"0"
;
if
(
user
!=
null
)
if
(
StringUtils
.
isNotNull
(
user
)
)
{
uniqueFlag
=
userService
.
checkPhoneUnique
(
user
);
}
...
...
@@ -207,7 +207,7 @@ public class UserController extends BaseController
public
String
checkEmailUnique
(
User
user
)
{
String
uniqueFlag
=
"0"
;
if
(
user
!=
null
)
if
(
StringUtils
.
isNotNull
(
user
)
)
{
uniqueFlag
=
userService
.
checkEmailUnique
(
user
);
}
...
...
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