Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5portal
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
管理员
jfV5portal
Commits
f2a8eefd
Commit
f2a8eefd
authored
Apr 26, 2018
by
罗绍泽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拓展信息发布和模拟登录的必要信息
parent
0a833b4b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
8 deletions
+49
-8
portletApi.jsp
WebContent/jwapp/pages/portlet/portletApi.jsp
+4
-2
PortletBusinessImpl.java
...wapp/com/jw/app/business/portlet/PortletBusinessImpl.java
+20
-0
PortletDAO.java
src_jwapp/com/jw/app/business/portlet/PortletDAO.java
+4
-0
PortletDAO.xml
src_jwapp/com/jw/app/business/portlet/PortletDAO.xml
+21
-6
No files found.
WebContent/jwapp/pages/portlet/portletApi.jsp
View file @
f2a8eefd
...
...
@@ -113,11 +113,13 @@ table tr td pre {
</tr>
<tr>
<td>
调用
</td>
<td>
jwAppPortletModel.jwAppsPortletDataAction.listAllPTemplate()
</td>
<td>
jwAppPortletModel.jwAppsPortletDataAction.listAllPTemplate({
<br
/>
FIELD_COLUMN_ID:'d6926714-c220-4a7e-9ec0-3a23caebb179'
<br
/>
})
</td>
</tr>
<tr>
<td>
参数备注
</td>
<td></td>
<td>
FIELD_COLUMN_ID:栏目id
</td>
</tr>
<tr>
<td><span
class=
"look"
>
结果查看
</span></td>
...
...
src_jwapp/com/jw/app/business/portlet/PortletBusinessImpl.java
View file @
f2a8eefd
...
...
@@ -2,6 +2,7 @@ package com.jw.app.business.portlet;
import
java.io.IOException
;
import
java.sql.SQLException
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -34,6 +35,25 @@ public class PortletBusinessImpl implements PortletBusiness {
query
.
put
(
"USER_ID"
,
"default"
);
listData
=
QueryParamUtil
.
ClobToString
(
portletDAO
.
list_portlet_template_user
(
query
));
}
for
(
Map
<
String
,
Object
>
map:
listData
){
if
(
"5"
.
equals
(
map
.
get
(
"P_TYPE"
))){
//如果是内容发布,则将内容发布的信息传回去
Map
<
String
,
Object
>
contentQuery
=
new
HashMap
<
String
,
Object
>();
contentQuery
.
put
(
"PORTAL_ID"
,
map
.
get
(
"PORTLET_ID"
));
List
<
Map
<
String
,
Object
>>
listInfo
=
portletDAO
.
list_portlet_content
(
contentQuery
);
map
.
put
(
"INFOS"
,
listInfo
);
}
else
if
(
"4"
.
equals
(
map
.
get
(
"P_TYPE"
))){
//如果是模拟登陆,则把登录的url和用户密码传回去
Map
<
String
,
Object
>
appQuery
=
new
HashMap
<
String
,
Object
>();
//当前登陆人,当前需要模拟登录的APP_ID
appQuery
.
put
(
"APP_ID"
,
map
.
get
(
"APP_ID"
));
appQuery
.
put
(
"USER_ID"
,
SessionUtil
.
getEmid
());
List
<
Map
<
String
,
Object
>>
listWebInfo
=
portletDAO
.
list_app_acount
(
appQuery
);
if
(
listWebInfo
.
size
()>
0
){
map
.
put
(
"WEB_INFO"
,
listWebInfo
.
get
(
0
));
}
}
}
}
catch
(
IOException
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
...
...
src_jwapp/com/jw/app/business/portlet/PortletDAO.java
View file @
f2a8eefd
...
...
@@ -13,4 +13,8 @@ public interface PortletDAO {
List
<
Map
<
String
,
Object
>>
list_portlet_template
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_portlet_columns
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_portlet_content
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
List
<
Map
<
String
,
Object
>>
list_app_acount
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
;
}
src_jwapp/com/jw/app/business/portlet/PortletDAO.xml
View file @
f2a8eefd
...
...
@@ -10,6 +10,8 @@
<trim
prefix=
"WHERE"
prefixOverrides=
"AND |OR"
>
<!-- 不得省略,用于剔除portlet_template中被删除的模块 -->
and pt.PORTLET_ID IS NOT NULL
<!-- 必须过滤栏目id -->
and pt.COLUMN_ID = #{COLUMN_ID}
<if
test=
"PORTLET_ID != null and PORTLET_ID != ''"
>
and pt.PORTLET_ID = #{PORTLET_ID}
</if>
...
...
@@ -40,9 +42,6 @@
<if
test=
"G_ID != null and G_ID != ''"
>
and pt.G_ID like '%${G_ID}%'
</if>
<if
test=
"COLUMN_ID != null and COLUMN_ID != ''"
>
and pt.COLUMN_ID = #{COLUMN_ID}
</if>
<if
test=
"USER_ID != null and USER_ID != ''"
>
and ptu.USER_ID = #{USER_ID}
</if>
...
...
@@ -56,6 +55,8 @@
select * from portlet_template pt
]]>
<trim
prefix=
"WHERE"
prefixOverrides=
"AND |OR"
>
<!-- 必须过滤栏目id -->
and pt.COLUMN_ID = #{COLUMN_ID}
<if
test=
"PORTLET_ID != null and PORTLET_ID != ''"
>
and pt.PORTLET_ID = #{PORTLET_ID}
</if>
...
...
@@ -86,9 +87,6 @@
<if
test=
"G_ID != null and G_ID != ''"
>
and pt.G_ID like '%${G_ID}%'
</if>
<if
test=
"COLUMN_ID != null and COLUMN_ID != ''"
>
and pt.COLUMN_ID = #{COLUMN_ID}
</if>
</trim>
ORDER BY pt.create_time DESC
</select>
...
...
@@ -106,4 +104,20 @@
</trim> -->
ORDER BY pc.order_id ASC
</select>
<select
id=
"list_portlet_content"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
select * from portlet_content pc
WHERE pc.is_public=1
ORDER BY pc.create_time DESC
LIMIT 0,10
</select>
<select
id=
"list_app_acount"
parameterType=
"map"
resultType=
"upperCaseKeyMap"
>
select btua.*,btumu.USER_NAME,btumu.USER_PWD,btumu.USER_ID from b_t_ufp_apps btua
left join b_t_ufp_mapper_user btumu
on btua.APP_ID=btumu.APP_ID
WHERE btumu.USER_ID=#{USER_ID} AND btua.APP_ID=#{APP_ID}
</select>
</mapper>
\ 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