Commit b384f83a by 罗绍泽

portal功能修改,应用映射中IS_DELETE参数缺失BUG

parent 3f86d474
...@@ -24,6 +24,7 @@ function getbaidu(contentid){ ...@@ -24,6 +24,7 @@ function getbaidu(contentid){
initialFrameHeight:300, initialFrameHeight:300,
//zindex基数 //zindex基数
zIndex :9999, zIndex :9999,
allowDivTransToP : false, //允许进入编辑器的div标签自动变成p标签
//更多其他参数,请参考ueditor.config.js中的配置项 //更多其他参数,请参考ueditor.config.js中的配置项
serverUrl: '/jfV4platform/js/ueditor1_4_3/jsp/controller.jsp' serverUrl: '/jfV4platform/js/ueditor1_4_3/jsp/controller.jsp'
}); });
......
...@@ -50,11 +50,16 @@ var v_yesno_data = [{CODE_ID:'1',CODE_NAME:'失效'},{CODE_ID:'0',CODE_NAME:'有 ...@@ -50,11 +50,16 @@ var v_yesno_data = [{CODE_ID:'1',CODE_NAME:'失效'},{CODE_ID:'0',CODE_NAME:'有
//数据来源 //数据来源
var v_entity_datasource = [{CODE_ID:'0',CODE_NAME:'手工录入'}, var v_entity_datasource = [{CODE_ID:'0',CODE_NAME:'手工录入'},
{CODE_ID:'1',CODE_NAME:'单点集成'}, {CODE_ID:'1',CODE_NAME:'单点集成'},
{CODE_ID:'2',CODE_NAME:'URL抓取'},
{CODE_ID:'3',CODE_NAME:'RSS订阅'}, {CODE_ID:'3',CODE_NAME:'RSS订阅'},
{CODE_ID:'4',CODE_NAME:'模拟登录'}, {CODE_ID:'4',CODE_NAME:'模拟登录'},
{CODE_ID:'5',CODE_NAME:'内容发布'}, {CODE_ID:'5',CODE_NAME:'内容发布'}];
{CODE_ID:'6',CODE_NAME:'集成应用'}]; //宽度
var v_entity_width = [{CODE_ID:'1',CODE_NAME:'1'},
{CODE_ID:'2',CODE_NAME:'2'},
{CODE_ID:'3',CODE_NAME:'3'}];
//宽度
var v_entity_maxBtn = [{CODE_ID:'0',CODE_NAME:'不支持'},
{CODE_ID:'1',CODE_NAME:'支持'}];
//授权角色 //授权角色
var v_gidquery = {}; var v_gidquery = {};
var v_gid_data = jwAppCommonModel.jwAppsCommonDataAction.listSysRoleAll(v_gidquery); var v_gid_data = jwAppCommonModel.jwAppsCommonDataAction.listSysRoleAll(v_gidquery);
...@@ -183,8 +188,8 @@ function inputInitialize(n){ ...@@ -183,8 +188,8 @@ function inputInitialize(n){
$('#end2').hide(); $('#end2').hide();
$('#encode1').hide(); $('#encode1').hide();
$('#encode2').hide(); $('#encode2').hide();
$('#task1').hide(); $('#task1').show();
$('#task2').hide(); $('#task2').show();
}else if(n=='5'){ }else if(n=='5'){
$('#blank1').hide(); $('#blank1').hide();
$('#blank2').show(); $('#blank2').show();
...@@ -405,6 +410,20 @@ function addRow(){ ...@@ -405,6 +410,20 @@ function addRow(){
} }
//加载增加子页面成功后的回调 //加载增加子页面成功后的回调
function addUrlOnloadCallback(is_row){ function addUrlOnloadCallback(is_row){
$('#MAX_BTN').combobox({
data : v_entity_maxBtn,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
$('#WIDTH').combobox({
data : v_entity_width,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
$('#P_TYPE').combobox({ $('#P_TYPE').combobox({
data : v_entity_datasource, data : v_entity_datasource,
valueField : 'CODE_ID', valueField : 'CODE_ID',
...@@ -447,7 +466,7 @@ function addUrlOnloadCallback(is_row){ ...@@ -447,7 +466,7 @@ function addUrlOnloadCallback(is_row){
$('#APP_ID').combobox({ $('#APP_ID').combobox({
data : v_app_data.rowSet, data : v_app_data.rowSet,
valueField : 'APP_ID', valueField : 'APP_ID',
textField : 'NAME', textField : 'APP_NAME',
multiple:false, multiple:false,
editable:false, editable:false,
panelHeight:'auto' panelHeight:'auto'
...@@ -471,7 +490,7 @@ function insertData(is_entity){ ...@@ -471,7 +490,7 @@ function insertData(is_entity){
var v_result = jwAppPortletModel.jwAppsPortletActAction.insertPTemplate(is_entity); var v_result = jwAppPortletModel.jwAppsPortletActAction.insertPTemplate(is_entity);
reloadTree(); reloadTree();
$('#list').datagrid('reload', {}); $('#list').datagrid('reload', {});
$.messager.alert('提示', v_result.VALUE); //$.messager.alert('提示', v_result.VALUE);
return v_result; return v_result;
} }
/** /**
...@@ -499,10 +518,24 @@ function editRow(index){ ...@@ -499,10 +518,24 @@ function editRow(index){
//加载修改子页面成功后的回调 //加载修改子页面成功后的回调
function updateUrlOnloadCallback(is_row){ function updateUrlOnloadCallback(is_row){
inputInitialize(); inputInitialize();
$('#MAX_BTN').combobox({
data : v_entity_maxBtn,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
$('#WIDTH').combobox({
data : v_entity_width,
valueField : 'CODE_ID',
textField : 'CODE_NAME',
editable:false,
panelHeight:'auto'
});
$('#APP_ID').combobox({ $('#APP_ID').combobox({
data : v_app_data.rowSet, data : v_app_data.rowSet,
valueField : 'APP_ID', valueField : 'APP_ID',
textField : 'NAME', textField : 'APP_NAME',
multiple:false, multiple:false,
editable:false, editable:false,
panelHeight:'auto' panelHeight:'auto'
...@@ -564,7 +597,7 @@ function updateData(is_entity){ ...@@ -564,7 +597,7 @@ function updateData(is_entity){
is_entity.FIELD_CONTENT=ue.getContent(); is_entity.FIELD_CONTENT=ue.getContent();
var v_result = jwAppPortletModel.jwAppsPortletActAction.updatePTemplate(is_entity); var v_result = jwAppPortletModel.jwAppsPortletActAction.updatePTemplate(is_entity);
reloadTree(); reloadTree();
$.messager.alert('提示', v_result.VALUE); //$.messager.alert('提示', v_result.VALUE);
$('#list').datagrid('reload', {}); $('#list').datagrid('reload', {});
return v_result; return v_result;
} }
...@@ -589,7 +622,7 @@ function deleteRow(index){ ...@@ -589,7 +622,7 @@ function deleteRow(index){
var v_query = {}; var v_query = {};
v_query.deletekey = code; v_query.deletekey = code;
var v_result = jwAppPortletModel.jwAppsPortletActAction.deletePTemplate(v_query); var v_result = jwAppPortletModel.jwAppsPortletActAction.deletePTemplate(v_query);
$.messager.alert('提示',v_result.VALUE); //$.messager.alert('提示',v_result.VALUE);
reloadTree(); reloadTree();
$('#list').datagrid('reload', {}); $('#list').datagrid('reload', {});
} }
...@@ -624,7 +657,7 @@ function deleteBatchRow(){ ...@@ -624,7 +657,7 @@ function deleteBatchRow(){
var v_query = {}; var v_query = {};
v_query.deletekey = code; v_query.deletekey = code;
var v_result = jwAppPortletModel.jwAppsPortletActAction.deletePTemplate(v_query); var v_result = jwAppPortletModel.jwAppsPortletActAction.deletePTemplate(v_query);
$.messager.alert('提示',v_result.VALUE); //$.messager.alert('提示',v_result.VALUE);
reloadTree(); reloadTree();
$('#list').datagrid('reload', {}); $('#list').datagrid('reload', {});
} }
......
...@@ -30,14 +30,58 @@ ...@@ -30,14 +30,58 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td style="width: 10%;" class="tableStyleLable"> <td style="width: 10%;" class="tableStyleLable">
<span> <span>
栏目类别: 栏目类别:
</span> </span>
</td> </td>
<td style="width: 20% "> <td style="width: 20% ">
<input class="easyui-combobox" id="COLUMN_ID" name="FIELD_COLUMN_ID" style="width:150px" value="${is_row.COLUMN_ID}"/> <input class="easyui-combobox" id="COLUMN_ID" name="FIELD_COLUMN_ID" style="width:150px" value="${is_row.COLUMN_ID}"/>
</td> </td>
<td style="width: 10%;" class="tableStyleLable">
<span>
插件主题(中文):
</span>
</td>
<td style="width: 20%;">
<input class="easyui-textbox" id="TITLE" name="FIELD_TITLE" style="width:150px" value="${is_row.TITLE}"/>
</td>
<td style="width: 10%;" class="tableStyleLable">
<span>
插件主题(英文):
</span>
</td>
<td style="width: 20%;">
<input class="easyui-textbox" id="ENG_TITLE" name="FIELD_ENG_TITLE" style="width:150px" value="${is_row.ENG_TITLE}"/>
</td>
</tr>
<tr>
<td style="width: 10%;" class="tableStyleLable">
<span>
宽度:
</span>
</td>
<td style="width: 20% ">
<input class="easyui-combobox" id="WIDTH" name="FIELD_WIDTH" style="width:150px" value="${is_row.WIDTH==null?'1':is_row.WIDTH}"/>
</td>
<td style="width: 10%;" class="tableStyleLable">
<span>
是否支持最大化:
</span>
</td>
<td style="width: 20%;">
<input class="easyui-textbox" id="MAX_BTN" name="FIELD_MAX_BTN" style="width:150px" value="${is_row.MAX_BTN==null?'0':is_row.MAX_BTN}"/>
</td>
<td style="width: 10%;" class="tableStyleLable">
<span>
图标:
</span>
</td>
<td style="width: 20%;">
<input class="easyui-textbox" id="ICON_CSS" name="FIELD_ICON_CSS" style="width:150px" value="${is_row.ICON_CSS}"/>
</td>
</tr>
<tr>
<td id="pop1" style="width: 10%; display: none" class="tableStyleLable"> <td id="pop1" style="width: 10%; display: none" class="tableStyleLable">
<span> <span>
点击动作: 点击动作:
...@@ -62,11 +106,6 @@ ...@@ -62,11 +106,6 @@
<td id="app2" style="width: 20%; display: none"> <td id="app2" style="width: 20%; display: none">
<input class="easyui-combobox" id="APP_ID" name="FIELD_APP_ID" style="width:150px" value="${is_row.APP_ID}"/> <input class="easyui-combobox" id="APP_ID" name="FIELD_APP_ID" style="width:150px" value="${is_row.APP_ID}"/>
</td> </td>
<td id="blank1" style="width: 70%; display: none" colspan="4" >
<div>
&nbsp;
</div>
</td>
<td id="blank2" style="width: 40%; display: none" colspan="2" > <td id="blank2" style="width: 40%; display: none" colspan="2" >
<div> <div>
&nbsp; &nbsp;
...@@ -83,16 +122,6 @@ ...@@ -83,16 +122,6 @@
<input class="easyui-textbox" id="URL" name="FIELD_URL" style="width:500px" value="${is_row.URL}"/> <input class="easyui-textbox" id="URL" name="FIELD_URL" style="width:500px" value="${is_row.URL}"/>
</td> </td>
</tr> </tr>
<tr>
<td style="width: 10%;" class="tableStyleLable">
<span>
插件主题:
</span>
</td>
<td style="width: 20%;" colspan = "5">
<input class="easyui-textbox" id="TITLE" name="FIELD_TITLE" style="width:500px" value="${is_row.TITLE}"/>
</td>
</tr>
<tr> <tr>
<td id="start1" style="width: 10%; display: none" class="tableStyleLable"> <td id="start1" style="width: 10%; display: none" class="tableStyleLable">
<span> <span>
......
...@@ -153,7 +153,7 @@ public class dataAction extends BasicAction{ ...@@ -153,7 +153,7 @@ public class dataAction extends BasicAction{
try { try {
query = QueryParamUtil.StringToDate(query); query = QueryParamUtil.StringToDate(query);
List<Map<String, Object>> listData = business.list_app(query); List<Map<String, Object>> listData = business.list_apps_portal(query);
int listDataCount = business.listCount_app(query); int listDataCount = business.listCount_app(query);
Map<String,Object> data = new HashMap<String,Object>(); Map<String,Object> data = new HashMap<String,Object>();
data.put("rowSet", QueryParamUtil.DateToString(listData)); data.put("rowSet", QueryParamUtil.DateToString(listData));
......
...@@ -35,6 +35,8 @@ public interface AppsBusiness { ...@@ -35,6 +35,8 @@ public interface AppsBusiness {
List<Map<String,Object>> list_app(Map<String, Object> query) throws BusinessException ; List<Map<String,Object>> list_app(Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_apps_portal(Map<String, Object> query) throws BusinessException ;
int listCount_app(Map<String, Object> query) throws BusinessException ; int listCount_app(Map<String, Object> query) throws BusinessException ;
//APPS_CATEGORY app分类信息 //APPS_CATEGORY app分类信息
...@@ -93,5 +95,4 @@ public interface AppsBusiness { ...@@ -93,5 +95,4 @@ public interface AppsBusiness {
//APPS_USERALLAPP_NEWUSER找出所有未安装app的信息 //APPS_USERALLAPP_NEWUSER找出所有未安装app的信息
List<Map<String,Object>> list_userallapp_newuser(Map<String,Object> query) throws BusinessException ; List<Map<String,Object>> list_userallapp_newuser(Map<String,Object> query) throws BusinessException ;
} }
...@@ -21,6 +21,8 @@ public interface PortletBusiness { ...@@ -21,6 +21,8 @@ public interface PortletBusiness {
List<Map<String,Object>> list_portlet_template(Map<String, Object> query) throws BusinessException ; List<Map<String,Object>> list_portlet_template(Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_portlet_template_by_user(Map<String, Object> query) throws BusinessException ;
int listCount_portlet_template(Map<String, Object> query) throws BusinessException ; int listCount_portlet_template(Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_portlet_mytemplate_notall(Map<String, Object> query) throws BusinessException ; List<Map<String,Object>> list_portlet_mytemplate_notall(Map<String, Object> query) throws BusinessException ;
......
...@@ -667,4 +667,9 @@ public class AppsBusinessImpl implements AppsBusiness { ...@@ -667,4 +667,9 @@ public class AppsBusinessImpl implements AppsBusiness {
return appsDAO.list_userallapp_newuser(query); return appsDAO.list_userallapp_newuser(query);
} }
@Override
public List<Map<String, Object>> list_apps_portal(Map<String, Object> query) throws BusinessException {
return appsDAO.list_apps_portal(query);
}
} }
...@@ -94,4 +94,5 @@ public interface AppsDAO { ...@@ -94,4 +94,5 @@ public interface AppsDAO {
//APPS_USERALLAPP_NEWUSER找出所有未安装app的信息 //APPS_USERALLAPP_NEWUSER找出所有未安装app的信息
List<Map<String,Object>> list_userallapp_newuser(Map<String,Object> query) throws BusinessException ; List<Map<String,Object>> list_userallapp_newuser(Map<String,Object> query) throws BusinessException ;
List<Map<String,Object>> list_apps_portal(Map<String,Object> query) throws BusinessException ;
} }
...@@ -575,5 +575,10 @@ ...@@ -575,5 +575,10 @@
select f.* from APPS_USERALLAPP_NEWUSER f where 1=1 select f.* from APPS_USERALLAPP_NEWUSER f where 1=1
]]> ]]>
</select> </select>
<select id="list_apps_portal" parameterType="map" resultType="upperCaseKeyMap">
<![CDATA[
select f.* from b_t_ufp_apps f where f.IS_DELETE=0
]]>
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -156,6 +156,22 @@ public class PortletBusinessImpl implements PortletBusiness { ...@@ -156,6 +156,22 @@ public class PortletBusinessImpl implements PortletBusiness {
} }
return listData; return listData;
} }
@Override
public List<Map<String, Object>> list_portlet_template_by_user(Map<String, Object> query)
throws BusinessException {
List<Map<String, Object>> listData=null;
try {
listData = QueryParamUtil.ClobToString(portletDAO.list_portlet_template_user(query));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return listData;
}
@Override @Override
public int listCount_portlet_template(Map<String, Object> query) public int listCount_portlet_template(Map<String, Object> query)
......
...@@ -21,6 +21,8 @@ public interface PortletDAO { ...@@ -21,6 +21,8 @@ public interface PortletDAO {
List<Map<String,Object>> list_portlet_template(Map<String,Object> query) throws BusinessException ; List<Map<String,Object>> list_portlet_template(Map<String,Object> query) throws BusinessException ;
List<Map<String,Object>> list_portlet_template_user(Map<String,Object> query) throws BusinessException ;
int listCount_portlet_template(Map<String, Object> query) throws BusinessException ; int listCount_portlet_template(Map<String, Object> query) throws BusinessException ;
List<Map<String,Object>> list_portlet_mytemplate_notall(Map<String, Object> query) throws BusinessException ; List<Map<String,Object>> list_portlet_mytemplate_notall(Map<String, Object> query) throws BusinessException ;
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<where> <where>
<if test="PORTLET_ID != null and PORTLET_ID != ''"> <if test="PORTLET_ID != null and PORTLET_ID != ''">
and PORTLET_ID = #{PORTLET_ID} and PORTLET_ID = #{PORTLET_ID}
</if> </if>
</where> </where>
</update> </update>
...@@ -41,8 +41,8 @@ ...@@ -41,8 +41,8 @@
]]> ]]>
<foreach collection="list" item="PORTLET_ID" open="(" <foreach collection="list" item="PORTLET_ID" open="("
separator="," close=")"> separator="," close=")">
#{PORTLET_ID} #{PORTLET_ID}
</foreach> </foreach>
</delete> </delete>
<select id="list_delete_portlet_template" parameterType="list" <select id="list_delete_portlet_template" parameterType="list"
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
]]> ]]>
<foreach collection="list" item="PORTLET_ID" open="(" <foreach collection="list" item="PORTLET_ID" open="("
separator="," close=")"> separator="," close=")">
#{PORTLET_ID} #{PORTLET_ID}
</foreach> </foreach>
</select> </select>
<select id="list_portlet_template" parameterType="map" <select id="list_portlet_template" parameterType="map"
...@@ -64,40 +64,88 @@ ...@@ -64,40 +64,88 @@
]]> ]]>
<if test="PORTLET_ID != null and PORTLET_ID != ''"> <if test="PORTLET_ID != null and PORTLET_ID != ''">
and f.PORTLET_ID = #{PORTLET_ID} and f.PORTLET_ID = #{PORTLET_ID}
</if> </if>
<if test="NAME != null and NAME != ''"> <if test="NAME != null and NAME != ''">
and f.NAME like '%${NAME}%' and f.NAME like '%${NAME}%'
</if> </if>
<if test="TITLE != null and TITLE != ''"> <if test="TITLE != null and TITLE != ''">
and f.TITLE like '%${TITLE}%' and f.TITLE like '%${TITLE}%'
</if> </if>
<if test="P_TYPE != null and P_TYPE != ''"> <if test="P_TYPE != null and P_TYPE != ''">
and f.P_TYPE = #{P_TYPE} and f.P_TYPE = #{P_TYPE}
</if> </if>
<if test="CREATOR_ID != null and CREATOR_ID != ''"> <if test="CREATOR_ID != null and CREATOR_ID != ''">
and f.CREATOR_ID = #{CREATOR_ID} and f.CREATOR_ID = #{CREATOR_ID}
</if> </if>
<if test="START_TIME != null and START_TIME != ''"> <if test="START_TIME != null and START_TIME != ''">
and f.CREATE_TIME &gt;= #{START_TIME} and f.CREATE_TIME &gt;= #{START_TIME}
</if> </if>
<if test="END_TIME != null and END_TIME != ''"> <if test="END_TIME != null and END_TIME != ''">
and f.CREATE_TIME &lt;= #{END_TIME} and f.CREATE_TIME &lt;= #{END_TIME}
</if> </if>
<if test="TASKTIMER != null and TASKTIMER != ''"> <if test="TASKTIMER != null and TASKTIMER != ''">
and f.TASKTIMER = #{TASKTIMER} and f.TASKTIMER = #{TASKTIMER}
</if> </if>
<if test="list != null and list != ''"> <if test="list != null and list != ''">
and f.PORTLET_ID in ( ${list} ) and f.PORTLET_ID in ( ${list} )
</if> </if>
<if test="G_ID != null and G_ID != ''"> <if test="G_ID != null and G_ID != ''">
and f.G_ID like '%${G_ID}%' and f.G_ID like '%${G_ID}%'
</if> </if>
<if test="COLUMN_ID != null and COLUMN_ID != ''"> <if test="COLUMN_ID != null and COLUMN_ID != ''">
and f.COLUMN_ID = #{COLUMN_ID} and f.COLUMN_ID = #{COLUMN_ID}
</if> </if>
order by f.PORTLET_ID order by f.PORTLET_ID
</select> </select>
<select id="list_portlet_template_user" parameterType="map"
resultType="upperCaseKeyMap">
<![CDATA[
select * from portlet_template_user ptu
left JOIN portlet_template pt ON ptu.portlet_id=pt.portlet_id
]]>
<trim prefix="WHERE" prefixOverrides="AND |OR">
and pt.PORTLET_ID IS NOT NULL
<if test="PORTLET_ID != null and PORTLET_ID != ''">
and pt.PORTLET_ID = #{PORTLET_ID}
</if>
<if test="NAME != null and NAME != ''">
and pt.NAME like '%${NAME}%'
</if>
<if test="TITLE != null and TITLE != ''">
and pt.TITLE like '%${TITLE}%'
</if>
<if test="P_TYPE != null and P_TYPE != ''">
and pt.P_TYPE = #{P_TYPE}
</if>
<if test="CREATOR_ID != null and CREATOR_ID != ''">
and pt.CREATOR_ID = #{CREATOR_ID}
</if>
<if test="START_TIME != null and START_TIME != ''">
and pt.CREATE_TIME &gt;= #{START_TIME}
</if>
<if test="END_TIME != null and END_TIME != ''">
and pt.CREATE_TIME &lt;= #{END_TIME}
</if>
<if test="TASKTIMER != null and TASKTIMER != ''">
and pt.TASKTIMER = #{TASKTIMER}
</if>
<if test="list != null and list != ''">
and pt.PORTLET_ID in ( ${list} )
</if>
<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>
</trim>
ORDER BY ptu.ORDER_NUM ASC
</select>
<select id="listCount_portlet_template" parameterType="map" <select id="listCount_portlet_template" parameterType="map"
resultType="int"> resultType="int">
<![CDATA[ <![CDATA[
...@@ -105,37 +153,37 @@ ...@@ -105,37 +153,37 @@
]]> ]]>
<if test="PORTLET_ID != null and PORTLET_ID != ''"> <if test="PORTLET_ID != null and PORTLET_ID != ''">
and f.PORTLET_ID = #{PORTLET_ID} and f.PORTLET_ID = #{PORTLET_ID}
</if> </if>
<if test="NAME != null and NAME != ''"> <if test="NAME != null and NAME != ''">
and f.NAME like '%${NAME}%' and f.NAME like '%${NAME}%'
</if> </if>
<if test="TITLE != null and TITLE != ''"> <if test="TITLE != null and TITLE != ''">
and f.TITLE like '%${TITLE}%' and f.TITLE like '%${TITLE}%'
</if> </if>
<if test="P_TYPE != null and P_TYPE != ''"> <if test="P_TYPE != null and P_TYPE != ''">
and f.P_TYPE = #{P_TYPE} and f.P_TYPE = #{P_TYPE}
</if> </if>
<if test="CREATOR_ID != null and CREATOR_ID != ''"> <if test="CREATOR_ID != null and CREATOR_ID != ''">
and f.CREATOR_ID = #{CREATOR_ID} and f.CREATOR_ID = #{CREATOR_ID}
</if> </if>
<if test="START_TIME != null and START_TIME != ''"> <if test="START_TIME != null and START_TIME != ''">
and f.CREATE_TIME &gt;= #{START_TIME} and f.CREATE_TIME &gt;= #{START_TIME}
</if> </if>
<if test="END_TIME != null and END_TIME != ''"> <if test="END_TIME != null and END_TIME != ''">
and f.CREATE_TIME &lt;= #{END_TIME} and f.CREATE_TIME &lt;= #{END_TIME}
</if> </if>
<if test="TASKTIMER != null and TASKTIMER != ''"> <if test="TASKTIMER != null and TASKTIMER != ''">
and f.TASKTIMER = #{TASKTIMER} and f.TASKTIMER = #{TASKTIMER}
</if> </if>
<if test="list != null and list != ''"> <if test="list != null and list != ''">
and f.PORTLET_ID in ( ${list} ) and f.PORTLET_ID in ( ${list} )
</if> </if>
<if test="G_ID != null and G_ID != ''"> <if test="G_ID != null and G_ID != ''">
and f.G_ID like '%${G_ID}%' and f.G_ID like '%${G_ID}%'
</if> </if>
<if test="COLUMN_ID != null and COLUMN_ID != ''"> <if test="COLUMN_ID != null and COLUMN_ID != ''">
and f.COLUMN_ID = #{COLUMN_ID} and f.COLUMN_ID = #{COLUMN_ID}
</if> </if>
</select> </select>
...@@ -144,9 +192,9 @@ ...@@ -144,9 +192,9 @@
<![CDATA[ <![CDATA[
select * from portlet_template t where t.g_id is null or t.g_id='all' select * from portlet_template t where t.g_id is null or t.g_id='all'
]]> ]]>
<if test="COLUMN_ID != null and COLUMN_ID != ''"> <if test="COLUMN_ID != null and COLUMN_ID != ''">
and t.COLUMN_ID = #{COLUMN_ID} and t.COLUMN_ID = #{COLUMN_ID}
</if> </if>
</select> </select>
<select id="list_portlet_mytemplate_notall" parameterType="map" <select id="list_portlet_mytemplate_notall" parameterType="map"
...@@ -154,9 +202,9 @@ ...@@ -154,9 +202,9 @@
<![CDATA[ <![CDATA[
select * from portlet_template t where t.g_id is not null and t.g_id!='all' and t.g_id like '%${G_ID}%' select * from portlet_template t where t.g_id is not null and t.g_id!='all' and t.g_id like '%${G_ID}%'
]]> ]]>
<if test="COLUMN_ID != null and COLUMN_ID != ''"> <if test="COLUMN_ID != null and COLUMN_ID != ''">
and t.COLUMN_ID = #{COLUMN_ID} and t.COLUMN_ID = #{COLUMN_ID}
</if> </if>
</select> </select>
<!-- PORTLET_SETUP --> <!-- PORTLET_SETUP -->
...@@ -188,13 +236,13 @@ ...@@ -188,13 +236,13 @@
<where> <where>
<if test="UUID != null and UUID != ''"> <if test="UUID != null and UUID != ''">
and UUID = #{UUID} and UUID = #{UUID}
</if> </if>
<if test="USER_ID != null and USER_ID != ''"> <if test="USER_ID != null and USER_ID != ''">
and USER_ID = #{USER_ID} and USER_ID = #{USER_ID}
</if> </if>
<if test="LOCATION != null and LOCATION != ''"> <if test="LOCATION != null and LOCATION != ''">
and LOCATION = #{LOCATION} and LOCATION = #{LOCATION}
</if> </if>
</where> </where>
</update> </update>
...@@ -204,8 +252,8 @@ ...@@ -204,8 +252,8 @@
]]> ]]>
<foreach collection="list" item="UUID" open="(" separator="," <foreach collection="list" item="UUID" open="(" separator=","
close=")"> close=")">
#{UUID} #{UUID}
</foreach> </foreach>
</delete> </delete>
<select id="list_portlet_setup" parameterType="map" resultType="upperCaseKeyMap"> <select id="list_portlet_setup" parameterType="map" resultType="upperCaseKeyMap">
...@@ -215,19 +263,19 @@ ...@@ -215,19 +263,19 @@
]]> ]]>
<if test="USER_ID != null and USER_ID != ''"> <if test="USER_ID != null and USER_ID != ''">
and f.USER_ID = #{USER_ID} and f.USER_ID = #{USER_ID}
</if> </if>
<if test="UUID != null and UUID != ''"> <if test="UUID != null and UUID != ''">
and f.UUID = #{UUID} and f.UUID = #{UUID}
</if> </if>
<if test="LOCATION != null and LOCATION != ''"> <if test="LOCATION != null and LOCATION != ''">
and f.LOCATION = #{LOCATION} and f.LOCATION = #{LOCATION}
</if> </if>
<if test="START_TIME != null and START_TIME != ''"> <if test="START_TIME != null and START_TIME != ''">
and f.CREATE_TIME &gt;= #{START_TIME} and f.CREATE_TIME &gt;= #{START_TIME}
</if> </if>
<if test="END_TIME != null and END_TIME != ''"> <if test="END_TIME != null and END_TIME != ''">
and f.CREATE_TIME &lt;= #{END_TIME} and f.CREATE_TIME &lt;= #{END_TIME}
</if> </if>
order by f.USER_ID order by f.USER_ID
</select> </select>
...@@ -238,19 +286,19 @@ ...@@ -238,19 +286,19 @@
]]> ]]>
<if test="USER_ID != null and USER_ID != ''"> <if test="USER_ID != null and USER_ID != ''">
and f.USER_ID = #{USER_ID} and f.USER_ID = #{USER_ID}
</if> </if>
<if test="UUID != null and UUID != ''"> <if test="UUID != null and UUID != ''">
and f.UUID = #{UUID} and f.UUID = #{UUID}
</if> </if>
<if test="LOCATION != null and LOCATION != ''"> <if test="LOCATION != null and LOCATION != ''">
and f.LOCATION = #{LOCATION} and f.LOCATION = #{LOCATION}
</if> </if>
<if test="START_TIME != null and START_TIME != ''"> <if test="START_TIME != null and START_TIME != ''">
and f.CREATE_TIME &gt;= #{START_TIME} and f.CREATE_TIME &gt;= #{START_TIME}
</if> </if>
<if test="END_TIME != null and END_TIME != ''"> <if test="END_TIME != null and END_TIME != ''">
and f.CREATE_TIME &lt;= #{END_TIME} and f.CREATE_TIME &lt;= #{END_TIME}
</if> </if>
</select> </select>
......
...@@ -121,6 +121,7 @@ public class actAction extends BasicAction { ...@@ -121,6 +121,7 @@ public class actAction extends BasicAction {
entity.put("USER_SYS_NAME", username); entity.put("USER_SYS_NAME", username);
entity.put("YIYONG_ID", appid); entity.put("YIYONG_ID", appid);
entity.put("tableName", "C_T_SYS_OTHERLOGIN"); entity.put("tableName", "C_T_SYS_OTHERLOGIN");
entity.put("IS_DELETE", 0);
entity = QueryParamUtil.StringToDate(entity); entity = QueryParamUtil.StringToDate(entity);
int count =business.listCount_table(entity); int count =business.listCount_table(entity);
if(count==0) if(count==0)
...@@ -154,6 +155,7 @@ public class actAction extends BasicAction { ...@@ -154,6 +155,7 @@ public class actAction extends BasicAction {
* } } } else { business.insert_table(entity); * } } } else { business.insert_table(entity);
* jsonObject.putAll(Status.getStatus(Status.INSERT_OK)); } * jsonObject.putAll(Status.getStatus(Status.INSERT_OK)); }
*/ */
entity.put("IS_DELETE", 0);
business.insert_table(entity); business.insert_table(entity);
jsonObject.putAll(Status.getStatus(Status.INSERT_OK)); jsonObject.putAll(Status.getStatus(Status.INSERT_OK));
} catch (Exception e) { } catch (Exception e) {
......
...@@ -3,7 +3,6 @@ package com.jw.app.portlet.action; ...@@ -3,7 +3,6 @@ package com.jw.app.portlet.action;
import java.io.File; import java.io.File;
import java.net.URL; import java.net.URL;
import java.net.URLConnection; import java.net.URLConnection;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -11,8 +10,6 @@ import java.util.zip.GZIPInputStream; ...@@ -11,8 +10,6 @@ import java.util.zip.GZIPInputStream;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import net.sf.json.JSONObject;
import com.gaowj.business.SystemOpeBusiness; import com.gaowj.business.SystemOpeBusiness;
import com.gaowj.business.action.BasicAction; import com.gaowj.business.action.BasicAction;
import com.gaowj.business.comp.BusinessManager; import com.gaowj.business.comp.BusinessManager;
...@@ -22,12 +19,13 @@ import com.jw.app.business.PortletBusiness; ...@@ -22,12 +19,13 @@ import com.jw.app.business.PortletBusiness;
import com.jw.app.business.utils.QueryParamUtil; import com.jw.app.business.utils.QueryParamUtil;
import com.jw.app.business.utils.Status; import com.jw.app.business.utils.Status;
import com.jw.app.util.RssUrlData; import com.jw.app.util.RssUrlData;
import com.sun.org.apache.bcel.internal.generic.NEW;
import com.sun.syndication.feed.synd.SyndEntry; import com.sun.syndication.feed.synd.SyndEntry;
import com.sun.syndication.feed.synd.SyndFeed; import com.sun.syndication.feed.synd.SyndFeed;
import com.sun.syndication.io.SyndFeedInput; import com.sun.syndication.io.SyndFeedInput;
import com.sun.syndication.io.XmlReader; import com.sun.syndication.io.XmlReader;
import net.sf.json.JSONObject;
public class actAction extends BasicAction { public class actAction extends BasicAction {
/** /**
...@@ -76,7 +74,8 @@ public class actAction extends BasicAction { ...@@ -76,7 +74,8 @@ public class actAction extends BasicAction {
entity = QueryParamUtil.StringToDate(entity); entity = QueryParamUtil.StringToDate(entity);
if(entity.get("PORTLET_ID")==null) if(entity.get("PORTLET_ID")==null)
entity.put("PORTLET_ID", java.util.UUID.randomUUID().toString()); entity.put("PORTLET_ID", java.util.UUID.randomUUID().toString());
if (entity.get("P_TYPE") != null //下述代码用于对RSS的后台解析
/*if (entity.get("P_TYPE") != null
&& StringUtils.equals((String) entity.get("P_TYPE"), "3")) { && StringUtils.equals((String) entity.get("P_TYPE"), "3")) {
String url = (String) entity.get("URL"); String url = (String) entity.get("URL");
String is_pop = (String) entity.get("IS_POP"); String is_pop = (String) entity.get("IS_POP");
...@@ -137,7 +136,7 @@ public class actAction extends BasicAction { ...@@ -137,7 +136,7 @@ public class actAction extends BasicAction {
} }
content_html = content_html + "</table>"; content_html = content_html + "</table>";
entity.put("TAKE_CONTENT", content_html); entity.put("TAKE_CONTENT", content_html);
} }*/
business.insert_portlet_template(entity); business.insert_portlet_template(entity);
// 操作日志 // 操作日志
SystemOpeBusiness sysbusiness = BusinessManager SystemOpeBusiness sysbusiness = BusinessManager
...@@ -160,10 +159,14 @@ public class actAction extends BasicAction { ...@@ -160,10 +159,14 @@ public class actAction extends BasicAction {
entity.remove("OPETYPE"); entity.remove("OPETYPE");
try { try {
entity = QueryParamUtil.StringToDate(entity); entity = QueryParamUtil.StringToDate(entity);
entity = RssUrlData.rssContent(entity); //目前版本不对RSS进行后台解析存储,所以将下述代码注释,如要开启,需要注意防止存储到日志表中的数据过大而产生data too long错误
//entity = RssUrlData.rssContent(entity);
business.update_portlet_template(entity); business.update_portlet_template(entity);
// 操作日志 // 操作日志
SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class); SystemOpeBusiness sysbusiness = BusinessManager.getBusiness(SystemOpeBusiness.class);
//将存储RSS的大文本内容删除,否则日志表数据量过大
/*entity.remove("TAKE_CONTENT");
entity.remove("RSS_CONTENT");*/
sysbusiness.insert_logBusiness("updatePTemplate", "" + entity, sysbusiness.insert_logBusiness("updatePTemplate", "" + entity,
"修改PORTLET记录", (String) entity.get("PORTLET_ID"), "修改PORTLET记录", (String) entity.get("PORTLET_ID"),
(String) entity.get("NAME"), "JW_APPS_PORTLET_TEMPLATE"); (String) entity.get("NAME"), "JW_APPS_PORTLET_TEMPLATE");
......
...@@ -145,6 +145,48 @@ public class dataAction extends BasicAction { ...@@ -145,6 +145,48 @@ public class dataAction extends BasicAction {
} }
return "json"; return "json";
} }
/**
* 获取用户的资源列表
* @return
* @throws BusinessException
*/
public String listAllPTemplateByUser() throws BusinessException {
PortletBusiness business = BusinessManager
.getBusiness(PortletBusiness.class);
Map<String, Object> query = RequestUtils.getUpdateFieldMap(request,
RequestUtils.UPDATEDATAFIELDPREFIX);
try {
query = QueryParamUtil.StringToDate(query);
List<Map<String, Object>> listData = business
.list_portlet_template_by_user(query);
for (Map<String, Object> rm : listData) {
if(rm.get("P_TYPE")==null||!rm.get("P_TYPE").equals("3"))
{
rm.remove("RSS_CONTENT");
rm.remove("TAKE_CONTENT");
}
}
Map<String, Object> data = new HashMap<String, Object>();
data.put("rowSet", QueryParamUtil.DateToString(listData));
data.put("pageNo", 1);
data.put("pageSize", listData.size());
data.put("pageCount", listData.size());
data.put("rows", data.get("rowSet"));
data.put("total", listData.size());
jsonObject = new JSONObject();
jsonObject.putAll(data);
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return "json";
}
/** /**
* 显示发布类型树 * 显示发布类型树
* @return * @return
......
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