Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
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
platform
hp-smart
Commits
50efed8b
Commit
50efed8b
authored
Oct 17, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.fixBug:解决admin无法获取到公司编码的问题
parent
8fd3aa7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
UserSessionUtils.java
...ava/com/baosight/hpjx/core/security/UserSessionUtils.java
+2
-2
ServiceHPXSUser.java
...java/com/baosight/hpjx/hp/xs/service/ServiceHPXSUser.java
+35
-0
No files found.
src/main/java/com/baosight/hpjx/core/security/UserSessionUtils.java
View file @
50efed8b
...
...
@@ -32,9 +32,9 @@ public class UserSessionUtils extends UserSession {
*/
public
static
User
getUser
()
{
EiInfo
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"
userId"
,
UserSession
.
getUserId
());
eiInfo
.
set
(
"
loginName"
,
UserSession
.
getLoginName
());
eiInfo
.
set
(
EiConstant
.
serviceName
,
"HPXSUser"
);
eiInfo
.
set
(
EiConstant
.
methodName
,
"getUser"
);
eiInfo
.
set
(
EiConstant
.
methodName
,
"getUser
ByLogin
"
);
EiInfo
outInfo
=
XLocalManager
.
call
(
eiInfo
);
// -1表示报错
if
(
outInfo
.
getStatus
()
==
-
1
)
{
...
...
src/main/java/com/baosight/hpjx/hp/xs/service/ServiceHPXSUser.java
View file @
50efed8b
...
...
@@ -58,6 +58,41 @@ public class ServiceHPXSUser extends ServiceBase {
return
outInfo
;
}
/**
* 获取用户信息
*
* @param eiInfo
* @return
*/
public
EiInfo
getUserByLogin
(
EiInfo
eiInfo
)
{
EiInfo
outInfo
=
new
EiInfo
();
int
status
=
0
;
String
msg
=
""
;
try
{
String
loginName
=
eiInfo
.
getString
(
"loginName"
);
if
(
StringUtils
.
isNotEmpty
(
loginName
))
{
Map
map
=
new
HashMap
();
map
.
put
(
"loginName"
,
loginName
);
List
<
User
>
users
=
dao
.
query
(
"HGXSUser.query"
,
map
);
if
(
users
!=
null
&&
users
.
size
()
>
0
)
{
status
=
1
;
msg
=
"用户存在!"
;
outInfo
.
set
(
"result"
,
users
.
get
(
0
));
}
else
{
msg
=
"用户信息不存在!"
;
}
}
else
{
msg
=
"传入用户名不能为空!"
;
}
outInfo
.
setStatus
(
status
);
outInfo
.
setMsg
(
msg
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
outInfo
,
e
,
"平台调用用户信息异常"
);
}
return
outInfo
;
}
/**
* 查询用户下拉框
*
...
...
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