Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
self-service
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
self-service
Commits
20a4250c
Commit
20a4250c
authored
Jan 09, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复用户站点列表接口
parent
ec0b50a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstBasicController.java
...va/com/mortals/xhx/module/sst/web/SstBasicController.java
+48
-0
No files found.
sst-manager/src/main/java/com/mortals/xhx/module/sst/web/SstBasicController.java
View file @
20a4250c
...
@@ -156,4 +156,52 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
...
@@ -156,4 +156,52 @@ public class SstBasicController extends BaseCRUDJsonBodyMappingController<SstBas
return
ret
;
return
ret
;
}
}
@PostMapping
({
"site/list"
})
public
Rest
<
Object
>
list
()
{
IUser
user
=
this
.
getCurUser
();
if
(
user
==
null
)
{
throw
new
AppException
(
"用户未登录"
);
}
Rest
<
Object
>
ret
=
new
Rest
();
Map
<
String
,
Object
>
model
=
new
HashMap
();
String
busiDesc
=
"查询用户站点列表"
;
int
code
=
1
;
try
{
if
(
StringUtils
.
isNotEmpty
(
user
.
getSiteIds
()))
{
SitePdu
sitePdu
=
new
SitePdu
();
List
<
String
>
siteIds
=
Arrays
.
asList
(
user
.
getSiteIds
().
split
(
","
));
List
<
Long
>
idList
=
new
ArrayList
<>();
siteIds
.
forEach
(
s
->
{
idList
.
add
(
DataUtil
.
converStr2Long
(
s
,
0
));
});
sitePdu
.
setIdList
(
idList
);
String
resp
=
iApiBaseManagerFeign
.
getSitesByQuery
(
sitePdu
);
ApiResp
<
JSONObject
>
apiResp
=
JSON
.
parseObject
(
resp
,
ApiResp
.
class
);
if
(
apiResp
.
getCode
()
!=
YesNoEnum
.
YES
.
getValue
())
{
throw
new
AppException
(
"获取用户站点列表树数据失败:"
+
apiResp
.
getMsg
());
}
if
(
apiResp
.
getData
().
get
(
"data"
)
!=
null
)
{
model
.
put
(
"data"
,
apiResp
.
getData
().
get
(
"data"
));
}
else
{
model
.
put
(
"data"
,
Collections
.
emptyList
());
}
}
else
{
model
.
put
(
"data"
,
Collections
.
emptyList
());
}
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】"
);
}
catch
(
Exception
var9
)
{
code
=
-
1
;
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var9
);
}
ret
.
setCode
(
code
);
ret
.
setData
(
model
);
ret
.
setDict
(
model
.
get
(
"dict"
));
ret
.
setMsg
(
model
.
get
(
"message_info"
)
==
null
?
""
:
model
.
remove
(
"message_info"
).
toString
());
return
ret
;
}
}
}
\ No newline at end of file
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