修复回收站和全部书签查看

This commit is contained in:
WangHao
2021-02-12 19:38:54 +08:00
parent 60f25fc199
commit 87b4e38462
7 changed files with 91 additions and 55 deletions

View File

@ -79,5 +79,10 @@ public interface SqBookmarkMapper extends MyMapper<SqBookmark>
* @return 结果
*/
public void updateSqBookmarkBymenuId(Long menuId);
/**
* 查询用户全部书签不包含删除的书签
* @param
* @return 结果
*/
public List<SqBookmark> selectByUseridList(Long userId);
}

View File

@ -261,10 +261,7 @@ public class SqBookmarkServiceImpl implements ISqBookmarkService
*/
@Override
public List<SqBookmark> selectByUseridList(Long userId) {
SqBookmark sqBookmark= new SqBookmark();
sqBookmark.setUserid(userId);
sqBookmark.setIdelete(0); //未删除的书签
return sqBookmarkMapper.select(sqBookmark);
return sqBookmarkMapper.selectByUseridList(userId);
}
/**

View File

@ -121,6 +121,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<select id="selectByUseridList" parameterType="Long" resultMap="SqBookmarkResult">
<include refid="selectSqBookmarkVo"/>
where userid = #{userId} and idelete = 0 order by create_time desc
</select>
<select id="selectBymenuIdUserID" parameterType="SqBookmark" resultMap="SqBookmarkResult">
<include refid="selectSqBookmarkVo"/>
where userid=#{userID}