Commit f2a8eefd by 罗绍泽

拓展信息发布和模拟登录的必要信息

parent 0a833b4b
......@@ -113,11 +113,13 @@ table tr td pre {
</tr>
<tr>
<td>调用</td>
<td>jwAppPortletModel.jwAppsPortletDataAction.listAllPTemplate()</td>
<td>jwAppPortletModel.jwAppsPortletDataAction.listAllPTemplate({<br />
&nbsp;&nbsp;&nbsp;&nbsp; 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>
......
......@@ -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();
......
......@@ -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 ;
}
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment