标签表 用户标签表 书签表和标签表中间表

This commit is contained in:
WangHao
2020-09-04 23:03:15 +08:00
parent 302f0f9886
commit d44732c6dc
19 changed files with 1388 additions and 0 deletions

View File

@ -0,0 +1,103 @@
package com.ruoyi.web.controller.yunbookmark;
import java.util.List;
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.bookmark.domain.SqBookmarkTag;
import com.ruoyi.bookmark.service.ISqBookmarkTagService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 书签标签管理Controller
*
* @author ruoyi
* @date 2020-09-04
*/
@RestController
@RequestMapping("/tag/tag")
public class SqBookmarkTagController extends BaseController
{
@Autowired
private ISqBookmarkTagService sqBookmarkTagService;
/**
* 查询书签标签管理列表
*/
@PreAuthorize("@ss.hasPermi('tag:tag:list')")
@GetMapping("/list")
public TableDataInfo list(SqBookmarkTag sqBookmarkTag)
{
startPage();
List<SqBookmarkTag> list = sqBookmarkTagService.selectSqBookmarkTagList(sqBookmarkTag);
return getDataTable(list);
}
/**
* 导出书签标签管理列表
*/
@PreAuthorize("@ss.hasPermi('tag:tag:export')")
@Log(title = "书签标签管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(SqBookmarkTag sqBookmarkTag)
{
List<SqBookmarkTag> list = sqBookmarkTagService.selectSqBookmarkTagList(sqBookmarkTag);
ExcelUtil<SqBookmarkTag> util = new ExcelUtil<SqBookmarkTag>(SqBookmarkTag.class);
return util.exportExcel(list, "tag");
}
/**
* 获取书签标签管理详细信息
*/
@PreAuthorize("@ss.hasPermi('tag:tag:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sqBookmarkTagService.selectSqBookmarkTagById(id));
}
/**
* 新增书签标签管理
*/
@PreAuthorize("@ss.hasPermi('tag:tag:add')")
@Log(title = "书签标签管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SqBookmarkTag sqBookmarkTag)
{
return toAjax(sqBookmarkTagService.insertSqBookmarkTag(sqBookmarkTag));
}
/**
* 修改书签标签管理
*/
@PreAuthorize("@ss.hasPermi('tag:tag:edit')")
@Log(title = "书签标签管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SqBookmarkTag sqBookmarkTag)
{
return toAjax(sqBookmarkTagService.updateSqBookmarkTag(sqBookmarkTag));
}
/**
* 删除书签标签管理
*/
@PreAuthorize("@ss.hasPermi('tag:tag:remove')")
@Log(title = "书签标签管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sqBookmarkTagService.deleteSqBookmarkTagByIds(ids));
}
}

View File

@ -0,0 +1,103 @@
package com.ruoyi.web.controller.yunbookmark;
import java.util.List;
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.bookmark.domain.SqTag;
import com.ruoyi.bookmark.service.ISqTagService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 书签_标签Controller
*
* @author ruoyi
* @date 2020-09-04
*/
@RestController
@RequestMapping("/system/tag")
public class SqTagController extends BaseController
{
@Autowired
private ISqTagService sqTagService;
/**
* 查询书签_标签列表
*/
@PreAuthorize("@ss.hasPermi('system:tag:list')")
@GetMapping("/list")
public TableDataInfo list(SqTag sqTag)
{
startPage();
List<SqTag> list = sqTagService.selectSqTagList(sqTag);
return getDataTable(list);
}
/**
* 导出书签_标签列表
*/
@PreAuthorize("@ss.hasPermi('system:tag:export')")
@Log(title = "书签_标签", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(SqTag sqTag)
{
List<SqTag> list = sqTagService.selectSqTagList(sqTag);
ExcelUtil<SqTag> util = new ExcelUtil<SqTag>(SqTag.class);
return util.exportExcel(list, "tag");
}
/**
* 获取书签_标签详细信息
*/
@PreAuthorize("@ss.hasPermi('system:tag:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sqTagService.selectSqTagById(id));
}
/**
* 新增书签_标签
*/
@PreAuthorize("@ss.hasPermi('system:tag:add')")
@Log(title = "书签_标签", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SqTag sqTag)
{
return toAjax(sqTagService.insertSqTag(sqTag));
}
/**
* 修改书签_标签
*/
@PreAuthorize("@ss.hasPermi('system:tag:edit')")
@Log(title = "书签_标签", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SqTag sqTag)
{
return toAjax(sqTagService.updateSqTag(sqTag));
}
/**
* 删除书签_标签
*/
@PreAuthorize("@ss.hasPermi('system:tag:remove')")
@Log(title = "书签_标签", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sqTagService.deleteSqTagByIds(ids));
}
}

View File

@ -0,0 +1,103 @@
package com.ruoyi.web.controller.yunbookmark;
import java.util.List;
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.bookmark.domain.SqUserTag;
import com.ruoyi.bookmark.service.ISqUserTagService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 标签管理Controller
*
* @author wang
* @date 2020-09-04
*/
@RestController
@RequestMapping("/system/usertag")
public class SqUserTagController extends BaseController
{
@Autowired
private ISqUserTagService sqUserTagService;
/**
* 查询标签管理列表
*/
@PreAuthorize("@ss.hasPermi('system:tag:list')")
@GetMapping("/list")
public TableDataInfo list(SqUserTag sqUserTag)
{
startPage();
List<SqUserTag> list = sqUserTagService.selectSqUserTagList(sqUserTag);
return getDataTable(list);
}
/**
* 导出标签管理列表
*/
@PreAuthorize("@ss.hasPermi('system:tag:export')")
@Log(title = "标签管理", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(SqUserTag sqUserTag)
{
List<SqUserTag> list = sqUserTagService.selectSqUserTagList(sqUserTag);
ExcelUtil<SqUserTag> util = new ExcelUtil<SqUserTag>(SqUserTag.class);
return util.exportExcel(list, "tag");
}
/**
* 获取标签管理详细信息
*/
@PreAuthorize("@ss.hasPermi('system:tag:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(sqUserTagService.selectSqUserTagById(id));
}
/**
* 新增标签管理
*/
@PreAuthorize("@ss.hasPermi('system:tag:add')")
@Log(title = "标签管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SqUserTag sqUserTag)
{
return toAjax(sqUserTagService.insertSqUserTag(sqUserTag));
}
/**
* 修改标签管理
*/
@PreAuthorize("@ss.hasPermi('system:tag:edit')")
@Log(title = "标签管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SqUserTag sqUserTag)
{
return toAjax(sqUserTagService.updateSqUserTag(sqUserTag));
}
/**
* 删除标签管理
*/
@PreAuthorize("@ss.hasPermi('system:tag:remove')")
@Log(title = "标签管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(sqUserTagService.deleteSqUserTagByIds(ids));
}
}