书签管理模块
This commit is contained in:
@ -72,10 +72,7 @@
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-generator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-bookmark</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
@ -95,17 +92,17 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.0.0</version>
|
||||
<configuration>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
@ -1,97 +0,0 @@
|
||||
package com.ruoyi.web.controller.bookmark;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.sq.domain.SqLabel;
|
||||
import com.ruoyi.sq.service.ISqLabelService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 书签_标签Controller
|
||||
*
|
||||
* @author wanghao
|
||||
* @date 2020-07-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bookmark/label")
|
||||
public class SqLabelController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISqLabelService sqLabelService;
|
||||
|
||||
/**
|
||||
* 查询书签_标签列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:label:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SqLabel sqLabel)
|
||||
{
|
||||
startPage();
|
||||
List<SqLabel> list = sqLabelService.selectSqLabelList(sqLabel);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出书签_标签列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:label:export')")
|
||||
@Log(title = "书签_标签", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(SqLabel sqLabel)
|
||||
{
|
||||
List<SqLabel> list = sqLabelService.selectSqLabelList(sqLabel);
|
||||
ExcelUtil<SqLabel> util = new ExcelUtil<SqLabel>(SqLabel.class);
|
||||
return util.exportExcel(list, "label");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取书签_标签详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:label:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(sqLabelService.selectSqLabelById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增书签_标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:label:add')")
|
||||
@Log(title = "书签_标签", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SqLabel sqLabel)
|
||||
{
|
||||
return toAjax(sqLabelService.insertSqLabel(sqLabel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改书签_标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:label:edit')")
|
||||
@Log(title = "书签_标签", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SqLabel sqLabel)
|
||||
{
|
||||
return toAjax(sqLabelService.updateSqLabel(sqLabel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除书签_标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:label:remove')")
|
||||
@Log(title = "书签_标签", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(sqLabelService.deleteSqLabelByIds(ids));
|
||||
}
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
package com.ruoyi.web.controller.bookmark;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.sq.domain.SqMenu;
|
||||
import com.ruoyi.sq.service.ISqMenuService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 书签_菜单Controller
|
||||
*
|
||||
* @author wanghao
|
||||
* @date 2020-07-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bookmark/menu")
|
||||
public class SqMenuController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ISqMenuService sqMenuService;
|
||||
|
||||
/**
|
||||
* 查询书签_菜单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:menu:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SqMenu sqMenu)
|
||||
{
|
||||
startPage();
|
||||
List<SqMenu> list = sqMenuService.selectSqMenuList(sqMenu);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出书签_菜单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:menu:export')")
|
||||
@Log(title = "书签_菜单", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(SqMenu sqMenu)
|
||||
{
|
||||
List<SqMenu> list = sqMenuService.selectSqMenuList(sqMenu);
|
||||
ExcelUtil<SqMenu> util = new ExcelUtil<SqMenu>(SqMenu.class);
|
||||
return util.exportExcel(list, "menu");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取书签_菜单详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:menu:query')")
|
||||
@GetMapping(value = "/{menuId}")
|
||||
public AjaxResult getInfo(@PathVariable("menuId") Long menuId)
|
||||
{
|
||||
return AjaxResult.success(sqMenuService.selectSqMenuById(menuId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增书签_菜单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:menu:add')")
|
||||
@Log(title = "书签_菜单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SqMenu sqMenu)
|
||||
{
|
||||
return toAjax(sqMenuService.insertSqMenu(sqMenu));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改书签_菜单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:menu:edit')")
|
||||
@Log(title = "书签_菜单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SqMenu sqMenu)
|
||||
{
|
||||
return toAjax(sqMenuService.updateSqMenu(sqMenu));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除书签_菜单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:menu:remove')")
|
||||
@Log(title = "书签_菜单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{menuIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] menuIds)
|
||||
{
|
||||
return toAjax(sqMenuService.deleteSqMenuByIds(menuIds));
|
||||
}
|
||||
}
|
@ -1,26 +1,32 @@
|
||||
package com.ruoyi.web.controller.bookmark;
|
||||
|
||||
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.sq.domain.SqBookmark;
|
||||
import com.ruoyi.sq.service.ISqBookmarkService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
package com.ruoyi.web.controller.yunbookmark;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.bookmark.domain.SqBookmark;
|
||||
import com.ruoyi.bookmark.service.ISqBookmarkService;
|
||||
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 com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 书签Controller
|
||||
*
|
||||
* 书签管理Controller
|
||||
*
|
||||
* @author wanghao
|
||||
* @date 2020-07-26
|
||||
* @date 2020-08-02
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bookmark/bookmark")
|
||||
@ -29,10 +35,23 @@ public class SqBookmarkController extends BaseController
|
||||
@Autowired
|
||||
private ISqBookmarkService sqBookmarkService;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询书签列表
|
||||
* 查询用户栏目下的书签
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/selectBymenuIdUserID")
|
||||
public TableDataInfo selectBymenuIdUserID(Long menuID, Long userID) {
|
||||
startPage();
|
||||
List<SqBookmark> list = sqBookmarkService.selectBymenuIdUserID(menuID,userID);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询书签管理列表
|
||||
*/
|
||||
@Log(title = "用户管理", businessType = BusinessType.SELECT)
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SqBookmark sqBookmark)
|
||||
@ -43,10 +62,10 @@ public class SqBookmarkController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出书签列表
|
||||
* 导出书签管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:export')")
|
||||
@Log(title = "书签", businessType = BusinessType.EXPORT)
|
||||
@Log(title = "书签管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(SqBookmark sqBookmark)
|
||||
{
|
||||
@ -56,9 +75,8 @@ public class SqBookmarkController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取书签详细信息
|
||||
* 获取书签管理详细信息
|
||||
*/
|
||||
@Log(title = "查询书签信息ID", businessType = BusinessType.SELECT)
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:query')")
|
||||
@GetMapping(value = "/{bookmarkId}")
|
||||
public AjaxResult getInfo(@PathVariable("bookmarkId") Long bookmarkId)
|
||||
@ -67,10 +85,10 @@ public class SqBookmarkController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增书签
|
||||
* 新增书签管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:add')")
|
||||
@Log(title = "新增书签", businessType = BusinessType.INSERT)
|
||||
@Log(title = "书签管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody SqBookmark sqBookmark)
|
||||
{
|
||||
@ -78,10 +96,10 @@ public class SqBookmarkController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改书签
|
||||
* 修改书签管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:edit')")
|
||||
@Log(title = "修改书签", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "书签管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody SqBookmark sqBookmark)
|
||||
{
|
||||
@ -89,10 +107,10 @@ public class SqBookmarkController extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除书签
|
||||
* 删除书签管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bookmark:bookmark:remove')")
|
||||
@Log(title = "删除书签", businessType = BusinessType.DELETE)
|
||||
@Log(title = "书签管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{bookmarkIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] bookmarkIds)
|
||||
{
|
Reference in New Issue
Block a user