Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
A
auth-master
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Members
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
吴超
auth-master
Commits
31b2cf2a
Commit
31b2cf2a
authored
Dec 01, 2025
by
周海峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
db76d466
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
2 行增加
和
8 行删除
+2
-8
src/main/java/com/metro/auth/platform/metrointerface/ExternalController.java
+2
-8
没有找到文件。
src/main/java/com/metro/auth/platform/metrointerface/ExternalController.java
View file @
31b2cf2a
...
@@ -94,16 +94,15 @@ public class ExternalController {
...
@@ -94,16 +94,15 @@ public class ExternalController {
public
ResultJson
queryActivitiList
(
NoticeManageActivitiDTO
noticeManageActivitiDTO
,
@PathVariable
String
userid
,
HttpServletRequest
request
){
public
ResultJson
queryActivitiList
(
NoticeManageActivitiDTO
noticeManageActivitiDTO
,
@PathVariable
String
userid
,
HttpServletRequest
request
){
String
token
=
request
.
getHeader
(
"Auth3"
);
String
token
=
request
.
getHeader
(
"Auth3"
);
String
url
=
SpringUtil
.
getBean
(
PlatformUrlManager
.
class
).
getPlatformURI
(
PlatformUrlManager
.
API_ACTIVITI_URL
);
String
url
=
SpringUtil
.
getBean
(
PlatformUrlManager
.
class
).
getPlatformURI
(
PlatformUrlManager
.
API_ACTIVITI_URL
);
String
result
=
null
;
String
result
=
null
;
try
{
try
{
result
=
this
.
doPost
(
url
,
noticeManageActivitiDTO
,
token
);
result
=
this
.
doPost
(
url
,
noticeManageActivitiDTO
,
token
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
ResultJson
.
ok
(
JSONObject
.
parseObject
(
result
));
return
ResultJson
.
ok
(
JSONObject
.
parseObject
(
result
));
}
}
@GetMapping
(
"/law/list/{userid}"
)
@GetMapping
(
"/law/list/{userid}"
)
public
ResultJson
lawlisttoindex
(
LawPolicylistDTO
lawPolicylistDTO
,
@PathVariable
String
userid
,
HttpServletRequest
request
){
public
ResultJson
lawlisttoindex
(
LawPolicylistDTO
lawPolicylistDTO
,
@PathVariable
String
userid
,
HttpServletRequest
request
){
String
token
=
request
.
getHeader
(
tokenHeader
);
String
token
=
request
.
getHeader
(
tokenHeader
);
...
@@ -169,26 +168,21 @@ public class ExternalController {
...
@@ -169,26 +168,21 @@ public class ExternalController {
public
ResultJson
queryCommentsPageList
(
@PathVariable
String
noticeId
,
NoticeManageActivitiDTO
noticeManageActivitiDTO
,
int
pageIndex
,
int
pageSize
,
@PathVariable
String
userid
,
HttpServletRequest
request
){
public
ResultJson
queryCommentsPageList
(
@PathVariable
String
noticeId
,
NoticeManageActivitiDTO
noticeManageActivitiDTO
,
int
pageIndex
,
int
pageSize
,
@PathVariable
String
userid
,
HttpServletRequest
request
){
int
p
=
Integer
.
parseInt
(
noticeManageActivitiDTO
.
getPageIndex
());
int
p
=
Integer
.
parseInt
(
noticeManageActivitiDTO
.
getPageIndex
());
int
b
=
Integer
.
parseInt
(
noticeManageActivitiDTO
.
getPageSize
());
int
b
=
Integer
.
parseInt
(
noticeManageActivitiDTO
.
getPageSize
());
noticeManageActivitiDTO
.
setPageSize
(
String
.
valueOf
(
b
));
noticeManageActivitiDTO
.
setPageIndex
(
String
.
valueOf
((
p
-
1
)*
b
));
noticeManageActivitiDTO
.
setPageIndex
(
String
.
valueOf
((
p
-
1
)*
b
));
String
url
=
SpringUtil
.
getBean
(
PlatformUrlManager
.
class
).
getPlatformURI
(
PlatformUrlManager
.
API_COMMENTS_PAGE_URL
);
String
url
=
SpringUtil
.
getBean
(
PlatformUrlManager
.
class
).
getPlatformURI
(
PlatformUrlManager
.
API_COMMENTS_PAGE_URL
);
String
token
=
request
.
getHeader
(
"Auth3"
);
String
token
=
request
.
getHeader
(
"Auth3"
);
String
result
=
null
;
String
result
=
null
;
try
{
try
{
result
=
this
.
doPost
(
url
+
"/"
+
noticeId
,
noticeManageActivitiDTO
,
token
);
result
=
this
.
doPost
(
url
+
"/"
+
noticeId
,
noticeManageActivitiDTO
,
token
);
log
.
info
(
"调用公告列表接口返回结果为:"
+
result
+
" pageSize="
+
noticeManageActivitiDTO
.
getPageSize
()+
" --- "
+
noticeManageActivitiDTO
.
getPageIndex
());
JSONObject
json
=
JSONUtil
.
getJSONFromString
(
result
);
JSONObject
json
=
JSONUtil
.
getJSONFromString
(
result
);
int
resultCode
=
json
.
getIntValue
(
"resultCode"
);
int
resultCode
=
json
.
getIntValue
(
"resultCode"
);
String
resultMsg
=
json
.
getString
(
"resultMs"
);
String
resultMsg
=
json
.
getString
(
"resultMs"
);
int
dataCount
=
json
.
getIntValue
(
"dataCount"
);
int
dataCount
=
json
.
getIntValue
(
"dataCount"
);
List
<
CommentsDTO
>
list
=
new
ArrayList
<
CommentsDTO
>();
List
<
CommentsDTO
>
list
=
new
ArrayList
<
CommentsDTO
>();
if
(
resultCode
==
1
){
if
(
resultCode
==
1
){
JSONArray
jsonArray
=
json
.
getJSONArray
(
"obj"
);
JSONArray
jsonArray
=
json
.
getJSONArray
(
"obj"
);
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()>
0
){
if
(
jsonArray
!=
null
&&
jsonArray
.
size
()>
0
){
jsonArray
.
stream
().
forEach
(
jsons
->{
jsonArray
.
stream
().
forEach
(
jsons
->{
JSONObject
jsonObject
=
(
JSONObject
)
jsons
;
JSONObject
jsonObject
=
(
JSONObject
)
jsons
;
CommentsDTO
commentsDTO
=
new
CommentsDTO
();
CommentsDTO
commentsDTO
=
new
CommentsDTO
();
commentsDTO
.
setId
(
jsonObject
.
getString
(
"id"
));
commentsDTO
.
setId
(
jsonObject
.
getString
(
"id"
));
...
@@ -219,7 +213,7 @@ public class ExternalController {
...
@@ -219,7 +213,7 @@ public class ExternalController {
});
});
}
}
}
}
Pagination
pagination
=
new
Pagination
(
list
,
new
Long
(
dataCount
),
pageSize
,
pageIndex
);
Pagination
pagination
=
new
Pagination
(
list
,
(
long
)
dataCount
,
b
,
p
);
return
ResultJson
.
ok
(
pagination
);
return
ResultJson
.
ok
(
pagination
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论