Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
bcc3ae4e
Commit
bcc3ae4e
authored
Apr 19, 2019
by
qiankunpingtai
Browse files
异常封装之用户信息后台修改
parent
fed6bd0f
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/controller/UserController.java
View file @
bcc3ae4e
...
...
@@ -59,7 +59,7 @@ public class UserController {
@PostMapping
(
value
=
"/login"
)
public
BaseResponseInfo
login
(
@RequestParam
(
value
=
"loginame"
,
required
=
false
)
String
loginame
,
@RequestParam
(
value
=
"password"
,
required
=
false
)
String
password
,
HttpServletRequest
request
)
{
HttpServletRequest
request
)
throws
Exception
{
logger
.
info
(
"============用户登录 login 方法调用开始=============="
);
String
msgTip
=
""
;
User
user
=
null
;
...
...
@@ -150,7 +150,7 @@ public class UserController {
}
@GetMapping
(
value
=
"/getUserSession"
)
public
BaseResponseInfo
getSessionUser
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getSessionUser
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -171,7 +171,7 @@ public class UserController {
}
@GetMapping
(
value
=
"/logout"
)
public
BaseResponseInfo
logout
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
BaseResponseInfo
logout
(
HttpServletRequest
request
,
HttpServletResponse
response
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
request
.
getSession
().
removeAttribute
(
"user"
);
...
...
@@ -206,7 +206,7 @@ public class UserController {
@PostMapping
(
value
=
"/updatePwd"
)
public
String
updatePwd
(
@RequestParam
(
"userId"
)
Long
userId
,
@RequestParam
(
"password"
)
String
password
,
@RequestParam
(
"oldpwd"
)
String
oldpwd
,
HttpServletRequest
request
)
{
@RequestParam
(
"oldpwd"
)
String
oldpwd
,
HttpServletRequest
request
)
throws
Exception
{
Integer
flag
=
0
;
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<
String
,
Object
>();
try
{
...
...
@@ -242,7 +242,7 @@ public class UserController {
* @return
*/
@GetMapping
(
value
=
"/getAllList"
)
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getAllList
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -425,7 +425,7 @@ public class UserController {
}
@GetMapping
(
"/getTenantStatus"
)
public
BaseResponseInfo
getTenantStatus
(
HttpServletRequest
request
)
{
public
BaseResponseInfo
getTenantStatus
(
HttpServletRequest
request
)
throws
Exception
{
BaseResponseInfo
res
=
new
BaseResponseInfo
();
try
{
Map
<
String
,
Object
>
data
=
new
HashMap
<
String
,
Object
>();
...
...
src/main/java/com/jsh/erp/service/user/UserComponent.java
View file @
bcc3ae4e
...
...
@@ -18,16 +18,16 @@ public class UserComponent implements ICommonQuery {
private
UserService
userService
;
@Override
public
Object
selectOne
(
String
condition
)
{
public
Object
selectOne
(
String
condition
)
throws
Exception
{
return
null
;
}
@Override
public
List
<?>
select
(
Map
<
String
,
String
>
map
)
{
public
List
<?>
select
(
Map
<
String
,
String
>
map
)
throws
Exception
{
return
getUserList
(
map
);
}
private
List
<?>
getUserList
(
Map
<
String
,
String
>
map
)
{
private
List
<?>
getUserList
(
Map
<
String
,
String
>
map
)
throws
Exception
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
userName
=
StringUtil
.
getInfo
(
search
,
"userName"
);
String
loginName
=
StringUtil
.
getInfo
(
search
,
"loginName"
);
...
...
@@ -37,7 +37,7 @@ public class UserComponent implements ICommonQuery {
}
@Override
public
Long
counts
(
Map
<
String
,
String
>
map
)
{
public
Long
counts
(
Map
<
String
,
String
>
map
)
throws
Exception
{
String
search
=
map
.
get
(
Constants
.
SEARCH
);
String
userName
=
StringUtil
.
getInfo
(
search
,
"userName"
);
String
loginName
=
StringUtil
.
getInfo
(
search
,
"loginName"
);
...
...
@@ -45,27 +45,27 @@ public class UserComponent implements ICommonQuery {
}
@Override
public
int
insert
(
String
beanJson
,
HttpServletRequest
request
)
{
public
int
insert
(
String
beanJson
,
HttpServletRequest
request
)
throws
Exception
{
return
userService
.
insertUser
(
beanJson
,
request
);
}
@Override
public
int
update
(
String
beanJson
,
Long
id
)
{
public
int
update
(
String
beanJson
,
Long
id
)
throws
Exception
{
return
userService
.
updateUser
(
beanJson
,
id
);
}
@Override
public
int
delete
(
Long
id
)
{
public
int
delete
(
Long
id
)
throws
Exception
{
return
userService
.
deleteUser
(
id
);
}
@Override
public
int
batchDelete
(
String
ids
)
{
public
int
batchDelete
(
String
ids
)
throws
Exception
{
return
userService
.
batchDeleteUser
(
ids
);
}
@Override
public
int
checkIsNameExist
(
Long
id
,
String
name
)
{
public
int
checkIsNameExist
(
Long
id
,
String
name
)
throws
Exception
{
return
userService
.
checkIsNameExist
(
id
,
name
);
}
...
...
src/main/java/com/jsh/erp/service/user/UserService.java
View file @
bcc3ae4e
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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