Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zhny
Project
Project
Details
Activity
Releases
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
王夏晖
zhny
Commits
6f47a7b6
Commit
6f47a7b6
authored
May 25, 2018
by
王夏晖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
3a9fe5b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
6 deletions
+13
-6
UserRepository.java
.../org/rcisoft/business/system/user/dao/UserRepository.java
+7
-3
SysUser.java
...java/org/rcisoft/business/system/user/entity/SysUser.java
+1
-1
UserServiceImpl.java
...ft/business/system/user/service/impl/UserServiceImpl.java
+5
-2
No files found.
src/main/java/org/rcisoft/business/system/user/dao/UserRepository.java
View file @
6f47a7b6
...
@@ -41,11 +41,15 @@ public interface UserRepository extends BaseMapper<SysUser>{
...
@@ -41,11 +41,15 @@ public interface UserRepository extends BaseMapper<SysUser>{
* 查询所有用户
* 查询所有用户
* @return
* @return
*/
*/
@Select
(
"<script>select a.USER_ID,a.USER_NM,a.USER_TP,b.* from sys_user a left join ${stable} b on a.USER_ID = b.USER_ID where"
+
@Select
(
"<script>select a.USER_ID,a.USER_NM,a.USER_TP "
+
" 1=1"
+
"<if test=\"stable != null\">,b.*</if> "
+
"from sys_user a "
+
"<if test=\"stable != null\">left join ${stable} b on a.USER_ID = b.USER_ID </if> "
+
"where 1=1"
+
"<if test = \"userTp=='1'.toString()\"> and (user_tp = '1' or user_tp = '2')</if>"
+
"<if test = \"userTp=='1'.toString()\"> and (user_tp = '1' or user_tp = '2')</if>"
+
"<if test = \"userTp=='2'.toString()\"> and user_tp = '3'</if>"
+
"<if test = \"userTp=='2'.toString()\"> and user_tp = '3'</if>"
+
"<if test = \"userTp=='3'.toString()\"> and user_tp = '4'</if></script>"
)
"<if test = \"userTp=='3'.toString()\"> and user_tp = '4'</if>"
+
"<if test = \"userTp=='5'.toString()\"> and user_tp = '5'</if></script>"
)
List
<
Map
<
String
,
Object
>>
listUserAll
(
@Param
(
"stable"
)
String
stable
,
@Param
(
"userTp"
)
String
userTp
);
List
<
Map
<
String
,
Object
>>
listUserAll
(
@Param
(
"stable"
)
String
stable
,
@Param
(
"userTp"
)
String
userTp
);
}
}
src/main/java/org/rcisoft/business/system/user/entity/SysUser.java
View file @
6f47a7b6
...
@@ -33,7 +33,7 @@ public class SysUser {
...
@@ -33,7 +33,7 @@ public class SysUser {
private
String
userTp
;
private
String
userTp
;
private
String
userNick
n
ame
;
private
String
userNick
N
ame
;
private
String
openid
;
private
String
openid
;
...
...
src/main/java/org/rcisoft/business/system/user/service/impl/UserServiceImpl.java
View file @
6f47a7b6
...
@@ -135,7 +135,7 @@ public class UserServiceImpl implements UserService {
...
@@ -135,7 +135,7 @@ public class UserServiceImpl implements UserService {
flag
=
1
;
flag
=
1
;
}
}
if
(
UserTpConstant
.
TP_INSPECTPERSON
.
equals
(
userTp
)){
if
(
UserTpConstant
.
TP_INSPECTPERSON
.
equals
(
userTp
)){
userRepository
.
insertSelective
(
sysUser
);
flag
=
userRepository
.
insertSelective
(
sysUser
);
}
}
return
flag
;
return
flag
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -175,6 +175,9 @@ public class UserServiceImpl implements UserService {
...
@@ -175,6 +175,9 @@ public class UserServiceImpl implements UserService {
flag
=
1
;
flag
=
1
;
}
}
}
}
if
(
UserTpConstant
.
TP_INSPECTPERSON
.
equals
(
userTp
))
{
flag
=
userRepository
.
updateByPrimaryKeySelective
(
sysUser
);
}
return
flag
;
return
flag
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -339,7 +342,7 @@ public class UserServiceImpl implements UserService {
...
@@ -339,7 +342,7 @@ public class UserServiceImpl implements UserService {
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
listUserAllByPagination
(
PageUtil
<
SysUser
>
paginationUtility
,
String
userTp
)
{
public
List
<
Map
<
String
,
Object
>>
listUserAllByPagination
(
PageUtil
<
SysUser
>
paginationUtility
,
String
userTp
)
{
String
table
=
""
;
String
table
=
null
;
if
(
userTp
!=
null
&&
userTp
.
equals
(
"1"
)){
table
=
"sys_admins"
;}
if
(
userTp
!=
null
&&
userTp
.
equals
(
"1"
)){
table
=
"sys_admins"
;}
if
(
userTp
!=
null
&&
userTp
.
equals
(
"2"
)){
table
=
"sys_owner"
;}
if
(
userTp
!=
null
&&
userTp
.
equals
(
"2"
)){
table
=
"sys_owner"
;}
if
(
userTp
!=
null
&&
userTp
.
equals
(
"3"
)){
table
=
"sys_principal"
;}
if
(
userTp
!=
null
&&
userTp
.
equals
(
"3"
)){
table
=
"sys_principal"
;}
...
...
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