Commit 6c8fd87e by 郑永强

匹配资讯

parent ca7c3213
...@@ -1205,7 +1205,14 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -1205,7 +1205,14 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
// 加载平台端自己选择的社群、方案、资讯等数据 // 加载平台端自己选择的社群、方案、资讯等数据
fillRightsSettingItemDetail(list); fillRightsSettingItemDetail(list);
// 筛选出没有选择 社群、方案、资讯 的数据 // 筛选出没有选择 社群、方案、资讯 的数据
List<RightsSettingItem> needFillAppletNews = list.stream().filter(x -> x.getServeType() == null).collect(Collectors.toList()); List<RightsSettingItem> needFillAppletNews = Lists.newArrayList();
for(RightsSettingItem rightsSettingItem : list){
if(rightsSettingItem.getServeType() == null
|| RightsServeTypeEnum.GROUP.name().equalsIgnoreCase(rightsSettingItem.getServeType()) && ListUtils.isEmpty(rightsSettingItem.getGroupActivity4AppletList())
|| RightsServeTypeEnum.NEWS.name().equalsIgnoreCase(rightsSettingItem.getServeType()) && ListUtils.isEmpty(rightsSettingItem.getAppletNewsDTOS())) {
needFillAppletNews.add(rightsSettingItem);
}
}
if(ListUtils.isEmpty(needFillAppletNews)){ if(ListUtils.isEmpty(needFillAppletNews)){
return list; return list;
} }
......
...@@ -58,9 +58,9 @@ ...@@ -58,9 +58,9 @@
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into book.rights_setting_item(rights_setting_id, rights_type, rights_classify_id, description, create_time,title,uuid,open_state,serve_type, insert into book.rights_setting_item(rights_setting_id, rights_type, rights_classify_id, description, create_time,title,uuid,open_state,service_desc,serve_type,
easy_read,efficient_read,deep_read) easy_read,efficient_read,deep_read)
values (#{rightsSettingId}, #{rightsType}, #{rightsClassifyId}, #{description}, NOW(), #{title},#{uuid},#{openState},#{serveType}, values (#{rightsSettingId}, #{rightsType}, #{rightsClassifyId}, #{description}, NOW(), #{title},#{uuid},#{openState},#{serviceDesc},#{serveType},
#{easyRead},#{efficientRead},#{deepRead}) #{easyRead},#{efficientRead},#{deepRead})
</insert> </insert>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<!--批量新增--> <!--批量新增-->
<insert id="batchInsert" useGeneratedKeys="true" parameterType="java.util.List"> <insert id="batchInsert" useGeneratedKeys="true" parameterType="java.util.List">
insert into book.rights_setting_item ( insert into book.rights_setting_item (
rights_setting_id, rights_type, rights_classify_id, description, create_time,title,uuid,open_state,serve_type, rights_setting_id, rights_type, rights_classify_id, description, create_time,title,uuid,open_state,service_desc,serve_type,
easy_read,efficient_read,deep_read easy_read,efficient_read,deep_read
) )
values values
...@@ -90,6 +90,7 @@ ...@@ -90,6 +90,7 @@
#{item.title}, #{item.title},
#{item.uuid}, #{item.uuid},
#{item.openState}, #{item.openState},
#{item.serviceDesc},
#{item.serveType}, #{item.serveType},
#{item.easyRead},#{item.efficientRead},#{item.deepRead} #{item.easyRead},#{item.efficientRead},#{item.deepRead}
) )
......
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