书签查看
This commit is contained in:
@ -3,6 +3,7 @@ package com.ruoyi.web.controller.note;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.sun.org.apache.bcel.internal.generic.NEW;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -37,20 +38,61 @@ public class NmNoteController extends BaseController
|
||||
|
||||
|
||||
/**
|
||||
* 查看栏目下 用户的便签
|
||||
* 用户查看栏目下的所有便签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('note:note:list')")
|
||||
|
||||
@GetMapping("/selectBymenuNote")
|
||||
public TableDataInfo selectBymenuNote(NmNote nmNote)
|
||||
public TableDataInfo selectBymenuNote(Long menuId)
|
||||
{
|
||||
SysUser sysUser=getAuthUser();
|
||||
NmNote nmNote= new NmNote();
|
||||
nmNote.setUserId(sysUser.getUserId());
|
||||
nmNote.setMenuId(menuId);
|
||||
startPage();
|
||||
List<NmNote> list = nmNoteService.selectNmNoteList(nmNote);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 用户新增便签
|
||||
*/
|
||||
@PostMapping("/addUserNote")
|
||||
public AjaxResult userAddNote(@RequestBody NmNote nmNote)
|
||||
{
|
||||
SysUser sysUser=getAuthUser();
|
||||
nmNote.setUserId(sysUser.getUserId());
|
||||
return toAjax(nmNoteService.insertNmNote(nmNote));
|
||||
}
|
||||
|
||||
/**
|
||||
*用户 获取便签详细信息 然后修改
|
||||
*/
|
||||
|
||||
@GetMapping(value = "/user/{noteId}")
|
||||
public AjaxResult userGetInfo(@PathVariable("noteId") Long noteId)
|
||||
{
|
||||
SysUser sysUser=getAuthUser();
|
||||
return AjaxResult.success(nmNoteService.selectNmNoteuserById(noteId,sysUser.getUserId()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户修改便签
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 用户删除便签
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -66,6 +108,7 @@ public class NmNoteController extends BaseController
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出便签管理列表
|
||||
*/
|
||||
@ -79,6 +122,7 @@ public class NmNoteController extends BaseController
|
||||
return util.exportExcel(list, "note");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取便签管理详细信息
|
||||
*/
|
||||
@ -89,6 +133,7 @@ public class NmNoteController extends BaseController
|
||||
return AjaxResult.success(nmNoteService.selectNmNoteById(noteId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增便签管理
|
||||
*/
|
||||
|
Reference in New Issue
Block a user