新增全部书签和回收站

This commit is contained in:
WangHao
2020-08-29 23:38:07 +08:00
parent 0af7ede907
commit fd957351e5
8 changed files with 172 additions and 12 deletions

View File

@ -23,6 +23,13 @@ public interface SqBookmarkMapper extends MyMapper<SqBookmark>
* @return 书签管理
*/
public List<SqBookmark> selectBymenuIdUserID(@Param("menuID") Long menuID, @Param("userID") Long userID);
/**
* @auther: Wang
* @date: 2020/08/29 23:03
* 功能描述: 回收站
*/
public List<SqBookmark> selectBydelete(@Param("userID") Long userID);
/**
* 查询书签管理
*

View File

@ -81,4 +81,15 @@ public interface ISqBookmarkService
* @return 结果
*/
public void updateSqBookmarkBymenuId(Long menuId);
/**
* 回收站
* @return
*/
public List<SqBookmark> selectBydelete(Long userId);
/**
* 用户全部书签
* @return
*/
List<SqBookmark> selectByUseridList(Long userId);
}

View File

@ -2,6 +2,7 @@ package com.ruoyi.bookmark.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.sun.org.apache.bcel.internal.generic.NEW;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -122,5 +123,24 @@ public class SqBookmarkServiceImpl implements ISqBookmarkService
@Override
public void updateSqBookmarkBymenuId(Long menuId) {
sqBookmarkMapper.updateSqBookmarkBymenuId(menuId);
}
/**
* 回收站
* @return
*/
@Override
public List<SqBookmark> selectBydelete(Long userId) {
return sqBookmarkMapper.selectBydelete(userId);
}
/**
* 用户全部书签
* @return
*/
@Override
public List<SqBookmark> selectByUseridList(Long userId) {
SqBookmark sqBookmark= new SqBookmark();
sqBookmark.setUserid(userId);
return sqBookmarkMapper.select(sqBookmark);
}
}

View File

@ -114,6 +114,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectBymenuIdUserID" parameterType="SqBookmark" resultMap="SqBookmarkResult">
<include refid="selectSqBookmarkVo"/>
where menu_id = #{menuID} and userid=#{userID}
where menu_id = #{menuID} and userid=#{userID} and IDelete=0
</select>
<select id="selectBydelete" parameterType="SqBookmark" resultMap="SqBookmarkResult">
<include refid="selectSqBookmarkVo"/>
where userid=#{userID} and IDelete=1
</select>
</mapper>