标签管理
This commit is contained in:
@ -6,6 +6,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.bookmark.domain.SqBookmark;
|
||||
import com.ruoyi.bookmark.pojo.SqBookmarkReq;
|
||||
import com.ruoyi.bookmark.service.ISqBookmarkService;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.bookmarkhtml.ImportHtml;
|
||||
@ -13,14 +14,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
@ -126,7 +120,6 @@ public class SqBookmarkController extends BaseController
|
||||
/**
|
||||
* 查询书签管理列表 聚合>> 星标 稍后看 最新书签
|
||||
*/
|
||||
// @PreAuthorize("@ss.hasPermi('bookmark:bookmark:list')")
|
||||
@GetMapping("/listByUserAndPolymerization")
|
||||
public TableDataInfo listByUserAndPolymerization(SqBookmark sqBookmark)
|
||||
{
|
||||
@ -207,4 +200,15 @@ public class SqBookmarkController extends BaseController
|
||||
{
|
||||
return toAjax(sqBookmarkService.deleteSqBookmarkByIds(bookmarkIds));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户-根据标签查询书签分页
|
||||
*/
|
||||
@GetMapping(value = "/listByTag")
|
||||
public TableDataInfo listByTag(SqBookmarkReq sqBookmarkReq){
|
||||
sqBookmarkReq.setUserid(getAuthUser().getUserId());
|
||||
startPage();
|
||||
return getDataTable(sqBookmarkService.getlistByTag(sqBookmarkReq));
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,9 @@ package com.ruoyi.web.controller.yunbookmark;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.bookmark.pojo.SqTagReq;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -53,14 +55,40 @@ public class SqTagController extends BaseController
|
||||
* 模糊查书签TAG
|
||||
*/
|
||||
@GetMapping("/listByUserLike")
|
||||
public TableDataInfo listByUserLike()
|
||||
public TableDataInfo listByUserLike(SqTagReq req)
|
||||
{
|
||||
SqTag sqTag = new SqTag();
|
||||
BeanUtils.copyProperties(req,sqTag);
|
||||
sqTag.setUserId(getAuthUser().getUserId());
|
||||
startPage();
|
||||
List<SqTag> list = sqTagService.selectSqTagList(new SqTag(getAuthUser().getUserId()));
|
||||
List<SqTag> list = sqTagService.selectSqTagList(sqTag);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增书签_标签
|
||||
*/
|
||||
@PostMapping("/addByUser")
|
||||
public AjaxResult addByUser(SqTagReq req)
|
||||
{
|
||||
SqTag sqTag = new SqTag();
|
||||
BeanUtils.copyProperties(req,sqTag);
|
||||
sqTag.setUserId(getAuthUser().getUserId());
|
||||
return toAjax(sqTagService.insertSqTag(sqTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改书签_标签
|
||||
*/
|
||||
@PutMapping("/editByUser")
|
||||
public AjaxResult editByUser(SqTagReq req)
|
||||
{
|
||||
SqTag sqTag = new SqTag();
|
||||
BeanUtils.copyProperties(req,sqTag);
|
||||
sqTag.setUserId(getAuthUser().getUserId());
|
||||
return toAjax(sqTagService.updateSqTag(sqTag));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user