去除notetag生成的信息
This commit is contained in:
@ -1,103 +0,0 @@
|
||||
package com.ruoyi.web.controller.note;
|
||||
|
||||
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.note.domain.NmNoteTag;
|
||||
import com.ruoyi.note.service.INmNoteTagService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 便签标签Controller
|
||||
*
|
||||
* @author wang
|
||||
* @date 2020-09-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/note/tag")
|
||||
public class NmNoteTagController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private INmNoteTagService nmNoteTagService;
|
||||
|
||||
/**
|
||||
* 查询便签标签列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('note:tag:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(NmNoteTag nmNoteTag)
|
||||
{
|
||||
startPage();
|
||||
List<NmNoteTag> list = nmNoteTagService.selectNmNoteTagList(nmNoteTag);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出便签标签列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('note:tag:export')")
|
||||
@Log(title = "便签标签", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(NmNoteTag nmNoteTag)
|
||||
{
|
||||
List<NmNoteTag> list = nmNoteTagService.selectNmNoteTagList(nmNoteTag);
|
||||
ExcelUtil<NmNoteTag> util = new ExcelUtil<NmNoteTag>(NmNoteTag.class);
|
||||
return util.exportExcel(list, "tag");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取便签标签详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('note:tag:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(nmNoteTagService.selectNmNoteTagById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增便签标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('note:tag:add')")
|
||||
@Log(title = "便签标签", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody NmNoteTag nmNoteTag)
|
||||
{
|
||||
return toAjax(nmNoteTagService.insertNmNoteTag(nmNoteTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改便签标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('note:tag:edit')")
|
||||
@Log(title = "便签标签", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody NmNoteTag nmNoteTag)
|
||||
{
|
||||
return toAjax(nmNoteTagService.updateNmNoteTag(nmNoteTag));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除便签标签
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('note:tag:remove')")
|
||||
@Log(title = "便签标签", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(nmNoteTagService.deleteNmNoteTagByIds(ids));
|
||||
}
|
||||
}
|
@ -19,7 +19,6 @@ import com.ruoyi.common.core.domain.BaseEntity;
|
||||
@NoArgsConstructor
|
||||
public class NmNoteContent
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 便签主键ID */
|
||||
private Long noteId;
|
||||
|
@ -1,35 +0,0 @@
|
||||
package com.ruoyi.note.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 便签标签对象 nm_note_tag
|
||||
*
|
||||
* @author wang
|
||||
* @date 2020-09-12
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class NmNoteTag
|
||||
{
|
||||
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 便签id */
|
||||
@Excel(name = "便签id")
|
||||
private Long noteId;
|
||||
|
||||
/** 标签Id */
|
||||
@Excel(name = "标签Id")
|
||||
private Long tagId;
|
||||
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.note.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.note.domain.NmNoteTag;
|
||||
|
||||
/**
|
||||
* 便签标签Mapper接口
|
||||
*
|
||||
* @author wang
|
||||
* @date 2020-09-12
|
||||
*/
|
||||
public interface NmNoteTagMapper
|
||||
{
|
||||
/**
|
||||
* 查询便签标签
|
||||
*
|
||||
* @param id 便签标签ID
|
||||
* @return 便签标签
|
||||
*/
|
||||
public NmNoteTag selectNmNoteTagById(Long id);
|
||||
|
||||
/**
|
||||
* 查询便签标签列表
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 便签标签集合
|
||||
*/
|
||||
public List<NmNoteTag> selectNmNoteTagList(NmNoteTag nmNoteTag);
|
||||
|
||||
/**
|
||||
* 新增便签标签
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNmNoteTag(NmNoteTag nmNoteTag);
|
||||
|
||||
/**
|
||||
* 修改便签标签
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNmNoteTag(NmNoteTag nmNoteTag);
|
||||
|
||||
/**
|
||||
* 删除便签标签
|
||||
*
|
||||
* @param id 便签标签ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNmNoteTagById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除便签标签
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNmNoteTagByIds(Long[] ids);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.note.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.note.domain.NmNoteTag;
|
||||
|
||||
/**
|
||||
* 便签标签Service接口
|
||||
*
|
||||
* @author wang
|
||||
* @date 2020-09-12
|
||||
*/
|
||||
public interface INmNoteTagService
|
||||
{
|
||||
/**
|
||||
* 查询便签标签
|
||||
*
|
||||
* @param id 便签标签ID
|
||||
* @return 便签标签
|
||||
*/
|
||||
public NmNoteTag selectNmNoteTagById(Long id);
|
||||
|
||||
/**
|
||||
* 查询便签标签列表
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 便签标签集合
|
||||
*/
|
||||
public List<NmNoteTag> selectNmNoteTagList(NmNoteTag nmNoteTag);
|
||||
|
||||
/**
|
||||
* 新增便签标签
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertNmNoteTag(NmNoteTag nmNoteTag);
|
||||
|
||||
/**
|
||||
* 修改便签标签
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateNmNoteTag(NmNoteTag nmNoteTag);
|
||||
|
||||
/**
|
||||
* 批量删除便签标签
|
||||
*
|
||||
* @param ids 需要删除的便签标签ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNmNoteTagByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除便签标签信息
|
||||
*
|
||||
* @param id 便签标签ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteNmNoteTagById(Long id);
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
package com.ruoyi.note.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.note.mapper.NmNoteTagMapper;
|
||||
import com.ruoyi.note.domain.NmNoteTag;
|
||||
import com.ruoyi.note.service.INmNoteTagService;
|
||||
|
||||
/**
|
||||
* 便签标签Service业务层处理
|
||||
*
|
||||
* @author wang
|
||||
* @date 2020-09-12
|
||||
*/
|
||||
@Service
|
||||
public class NmNoteTagServiceImpl implements INmNoteTagService
|
||||
{
|
||||
@Autowired
|
||||
private NmNoteTagMapper nmNoteTagMapper;
|
||||
|
||||
/**
|
||||
* 查询便签标签
|
||||
*
|
||||
* @param id 便签标签ID
|
||||
* @return 便签标签
|
||||
*/
|
||||
@Override
|
||||
public NmNoteTag selectNmNoteTagById(Long id)
|
||||
{
|
||||
return nmNoteTagMapper.selectNmNoteTagById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询便签标签列表
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 便签标签
|
||||
*/
|
||||
@Override
|
||||
public List<NmNoteTag> selectNmNoteTagList(NmNoteTag nmNoteTag)
|
||||
{
|
||||
return nmNoteTagMapper.selectNmNoteTagList(nmNoteTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增便签标签
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertNmNoteTag(NmNoteTag nmNoteTag)
|
||||
{
|
||||
return nmNoteTagMapper.insertNmNoteTag(nmNoteTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改便签标签
|
||||
*
|
||||
* @param nmNoteTag 便签标签
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateNmNoteTag(NmNoteTag nmNoteTag)
|
||||
{
|
||||
return nmNoteTagMapper.updateNmNoteTag(nmNoteTag);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除便签标签
|
||||
*
|
||||
* @param ids 需要删除的便签标签ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteNmNoteTagByIds(Long[] ids)
|
||||
{
|
||||
return nmNoteTagMapper.deleteNmNoteTagByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除便签标签信息
|
||||
*
|
||||
* @param id 便签标签ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteNmNoteTagById(Long id)
|
||||
{
|
||||
return nmNoteTagMapper.deleteNmNoteTagById(id);
|
||||
}
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.note.mapper.NmNoteTagMapper">
|
||||
|
||||
<resultMap type="NmNoteTag" id="NmNoteTagResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="noteId" column="note_id" />
|
||||
<result property="tagId" column="tag_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNmNoteTagVo">
|
||||
select id, note_id, tag_id from nm_note_tag
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectNmNoteTagList" parameterType="NmNoteTag" resultMap="NmNoteTagResult">
|
||||
<include refid="selectNmNoteTagVo"/>
|
||||
<where>
|
||||
<if test="noteId != null "> and note_id = #{noteId}</if>
|
||||
<if test="tagId != null "> and tag_id = #{tagId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNmNoteTagById" parameterType="Long" resultMap="NmNoteTagResult">
|
||||
<include refid="selectNmNoteTagVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertNmNoteTag" parameterType="NmNoteTag" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into nm_note_tag
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="noteId != null">note_id,</if>
|
||||
<if test="tagId != null">tag_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="noteId != null">#{noteId},</if>
|
||||
<if test="tagId != null">#{tagId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNmNoteTag" parameterType="NmNoteTag">
|
||||
update nm_note_tag
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="noteId != null">note_id = #{noteId},</if>
|
||||
<if test="tagId != null">tag_id = #{tagId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNmNoteTagById" parameterType="Long">
|
||||
delete from nm_note_tag where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNmNoteTagByIds" parameterType="String">
|
||||
delete from nm_note_tag where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user