Commit e7044f3c by 阮思源

修改内部接口

parent a0f473c0
...@@ -2257,6 +2257,8 @@ public class BookGroupBizImpl implements BookGroupBiz { ...@@ -2257,6 +2257,8 @@ public class BookGroupBizImpl implements BookGroupBiz {
if (ListUtils.isEmpty(keywordDTOS)) { if (ListUtils.isEmpty(keywordDTOS)) {
return; return;
} }
//按照社群码id集合把关键词逻辑删除
bookKeywordDao.deleteByBookGroupIds(bookGroupIds);
Map<Long, List<KeywordDTO>> map = keywordDTOS.stream().filter(s -> s.getBookGroupId() != null).collect(Collectors.groupingBy(KeywordDTO::getBookGroupId)); Map<Long, List<KeywordDTO>> map = keywordDTOS.stream().filter(s -> s.getBookGroupId() != null).collect(Collectors.groupingBy(KeywordDTO::getBookGroupId));
for (BookGroup bookGroup : bookGroups) { for (BookGroup bookGroup : bookGroups) {
Long bookGroupId = bookGroup.getId(); Long bookGroupId = bookGroup.getId();
......
...@@ -122,4 +122,9 @@ public interface BookKeywordDao extends BaseDao<BookKeyword> { ...@@ -122,4 +122,9 @@ public interface BookKeywordDao extends BaseDao<BookKeyword> {
* 根据社群码id集合获取列表 * 根据社群码id集合获取列表
*/ */
List<KeywordDTO> getListByBookGroupIdsAndType(List<Long> bookGroupIds, Integer replyType); List<KeywordDTO> getListByBookGroupIdsAndType(List<Long> bookGroupIds, Integer replyType);
/**
* 根据社群码id逻辑删除
*/
void deleteByBookGroupIds(List<Long> bookGroupIds);
} }
...@@ -157,4 +157,9 @@ public class BookKeywordDaoImpl extends BaseDaoImpl<BookKeyword> implements Book ...@@ -157,4 +157,9 @@ public class BookKeywordDaoImpl extends BaseDaoImpl<BookKeyword> implements Book
paramMap.put("replyType", replyType); paramMap.put("replyType", replyType);
return this.getSqlSession().selectList(this.getStatement("getListByBookGroupIdsAndType"), paramMap); return this.getSqlSession().selectList(this.getStatement("getListByBookGroupIdsAndType"), paramMap);
} }
@Override
public void deleteByBookGroupIds(List<Long> bookGroupIds) {
this.getSqlSession().update(this.getStatement("deleteByBookGroupIds"), bookGroupIds);
}
} }
...@@ -452,4 +452,13 @@ ...@@ -452,4 +452,13 @@
</foreach> </foreach>
and k.reply_type=#{replyType} and k.reply_type=#{replyType}
</select> </select>
<!--根据社群码id逻辑删除-->
<update id="deleteByBookGroupIds" parameterType="list">
update book_keyword set is_delete=1,update_time=now()
where book_group_id in
<foreach collection="list" separator="," index="index" item="item" open="(" close=")">
#{item}
</foreach>
</update>
</mapper> </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