整理目录结构

This commit is contained in:
WangHao
2020-09-20 21:16:14 +08:00
parent b1a03bcce1
commit 262fb3611f
18 changed files with 1393 additions and 1807 deletions

View File

@ -0,0 +1,126 @@
package com.ruoyi.note.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
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;
/**
* share书签分享对象 nm_note_share
*
* @author ruoyi
* @date 2020-09-20
*/
public class NmNoteShare extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 便签ID */
private Long noteId;
/** 是否加密 */
@Excel(name = "是否加密")
private Integer isEncryption;
/** 分享的二维码 */
@Excel(name = "分享的二维码")
private String noteQrcode;
/** 分享的URl */
@Excel(name = "分享的URl")
private String shareUrl;
/** 分享密码(vip) */
@Excel(name = "分享密码(vip)")
private String sharePassword;
/** 生成长图分享 */
@Excel(name = "生成长图分享")
private String shareImage;
/** 到期日(vip) */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "到期日(vip) ", width = 30, dateFormat = "yyyy-MM-dd")
private Date abortTime;
public void setNoteId(Long noteId)
{
this.noteId = noteId;
}
public Long getNoteId()
{
return noteId;
}
public void setIsEncryption(Integer isEncryption)
{
this.isEncryption = isEncryption;
}
public Integer getIsEncryption()
{
return isEncryption;
}
public void setNoteQrcode(String noteQrcode)
{
this.noteQrcode = noteQrcode;
}
public String getNoteQrcode()
{
return noteQrcode;
}
public void setShareUrl(String shareUrl)
{
this.shareUrl = shareUrl;
}
public String getShareUrl()
{
return shareUrl;
}
public void setSharePassword(String sharePassword)
{
this.sharePassword = sharePassword;
}
public String getSharePassword()
{
return sharePassword;
}
public void setShareImage(String shareImage)
{
this.shareImage = shareImage;
}
public String getShareImage()
{
return shareImage;
}
public void setAbortTime(Date abortTime)
{
this.abortTime = abortTime;
}
public Date getAbortTime()
{
return abortTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("noteId", getNoteId())
.append("isEncryption", getIsEncryption())
.append("noteQrcode", getNoteQrcode())
.append("shareUrl", getShareUrl())
.append("sharePassword", getSharePassword())
.append("shareImage", getShareImage())
.append("abortTime", getAbortTime())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,65 @@
package com.ruoyi.note.domain;
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 ruoyi
* @date 2020-09-20
*/
public class NmNoteTag extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long noteTagId;
/** 便签id */
@Excel(name = "便签id")
private Long noteId;
/** tagId */
@Excel(name = "tagId")
private Long tagId;
public void setNoteTagId(Long noteTagId)
{
this.noteTagId = noteTagId;
}
public Long getNoteTagId()
{
return noteTagId;
}
public void setNoteId(Long noteId)
{
this.noteId = noteId;
}
public Long getNoteId()
{
return noteId;
}
public void setTagId(Long tagId)
{
this.tagId = tagId;
}
public Long getTagId()
{
return tagId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("noteTagId", getNoteTagId())
.append("noteId", getNoteId())
.append("tagId", getTagId())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.note.mapper;
import java.util.List;
import com.ruoyi.note.domain.NmNoteShare;
/**
* share书签分享Mapper接口
*
* @author ruoyi
* @date 2020-09-20
*/
public interface NmNoteShareMapper
{
/**
* 查询share书签分享
*
* @param noteId share书签分享ID
* @return share书签分享
*/
public NmNoteShare selectNmNoteShareById(Long noteId);
/**
* 查询share书签分享列表
*
* @param nmNoteShare share书签分享
* @return share书签分享集合
*/
public List<NmNoteShare> selectNmNoteShareList(NmNoteShare nmNoteShare);
/**
* 新增share书签分享
*
* @param nmNoteShare share书签分享
* @return 结果
*/
public int insertNmNoteShare(NmNoteShare nmNoteShare);
/**
* 修改share书签分享
*
* @param nmNoteShare share书签分享
* @return 结果
*/
public int updateNmNoteShare(NmNoteShare nmNoteShare);
/**
* 删除share书签分享
*
* @param noteId share书签分享ID
* @return 结果
*/
public int deleteNmNoteShareById(Long noteId);
/**
* 批量删除share书签分享
*
* @param noteIds 需要删除的数据ID
* @return 结果
*/
public int deleteNmNoteShareByIds(Long[] noteIds);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.note.mapper;
import java.util.List;
import com.ruoyi.note.domain.NmNoteTag;
/**
* 便签的标签Mapper接口
*
* @author ruoyi
* @date 2020-09-20
*/
public interface NmNoteTagMapper
{
/**
* 查询便签的标签
*
* @param noteTagId 便签的标签ID
* @return 便签的标签
*/
public NmNoteTag selectNmNoteTagById(Long noteTagId);
/**
* 查询便签的标签列表
*
* @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 noteTagId 便签的标签ID
* @return 结果
*/
public int deleteNmNoteTagById(Long noteTagId);
/**
* 批量删除便签的标签
*
* @param noteTagIds 需要删除的数据ID
* @return 结果
*/
public int deleteNmNoteTagByIds(Long[] noteTagIds);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.note.service;
import java.util.List;
import com.ruoyi.note.domain.NmNoteShare;
/**
* share书签分享Service接口
*
* @author ruoyi
* @date 2020-09-20
*/
public interface INmNoteShareService
{
/**
* 查询share书签分享
*
* @param noteId share书签分享ID
* @return share书签分享
*/
public NmNoteShare selectNmNoteShareById(Long noteId);
/**
* 查询share书签分享列表
*
* @param nmNoteShare share书签分享
* @return share书签分享集合
*/
public List<NmNoteShare> selectNmNoteShareList(NmNoteShare nmNoteShare);
/**
* 新增share书签分享
*
* @param nmNoteShare share书签分享
* @return 结果
*/
public int insertNmNoteShare(NmNoteShare nmNoteShare);
/**
* 修改share书签分享
*
* @param nmNoteShare share书签分享
* @return 结果
*/
public int updateNmNoteShare(NmNoteShare nmNoteShare);
/**
* 批量删除share书签分享
*
* @param noteIds 需要删除的share书签分享ID
* @return 结果
*/
public int deleteNmNoteShareByIds(Long[] noteIds);
/**
* 删除share书签分享信息
*
* @param noteId share书签分享ID
* @return 结果
*/
public int deleteNmNoteShareById(Long noteId);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.note.service;
import java.util.List;
import com.ruoyi.note.domain.NmNoteTag;
/**
* 便签的标签Service接口
*
* @author ruoyi
* @date 2020-09-20
*/
public interface INmNoteTagService
{
/**
* 查询便签的标签
*
* @param noteTagId 便签的标签ID
* @return 便签的标签
*/
public NmNoteTag selectNmNoteTagById(Long noteTagId);
/**
* 查询便签的标签列表
*
* @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 noteTagIds 需要删除的便签的标签ID
* @return 结果
*/
public int deleteNmNoteTagByIds(Long[] noteTagIds);
/**
* 删除便签的标签信息
*
* @param noteTagId 便签的标签ID
* @return 结果
*/
public int deleteNmNoteTagById(Long noteTagId);
}

View File

@ -0,0 +1,96 @@
package com.ruoyi.note.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.note.mapper.NmNoteShareMapper;
import com.ruoyi.note.domain.NmNoteShare;
import com.ruoyi.note.service.INmNoteShareService;
/**
* share书签分享Service业务层处理
*
* @author ruoyi
* @date 2020-09-20
*/
@Service
public class NmNoteShareServiceImpl implements INmNoteShareService
{
@Autowired
private NmNoteShareMapper nmNoteShareMapper;
/**
* 查询share书签分享
*
* @param noteId share书签分享ID
* @return share书签分享
*/
@Override
public NmNoteShare selectNmNoteShareById(Long noteId)
{
return nmNoteShareMapper.selectNmNoteShareById(noteId);
}
/**
* 查询share书签分享列表
*
* @param nmNoteShare share书签分享
* @return share书签分享
*/
@Override
public List<NmNoteShare> selectNmNoteShareList(NmNoteShare nmNoteShare)
{
return nmNoteShareMapper.selectNmNoteShareList(nmNoteShare);
}
/**
* 新增share书签分享
*
* @param nmNoteShare share书签分享
* @return 结果
*/
@Override
public int insertNmNoteShare(NmNoteShare nmNoteShare)
{
nmNoteShare.setCreateTime(DateUtils.getNowDate());
return nmNoteShareMapper.insertNmNoteShare(nmNoteShare);
}
/**
* 修改share书签分享
*
* @param nmNoteShare share书签分享
* @return 结果
*/
@Override
public int updateNmNoteShare(NmNoteShare nmNoteShare)
{
nmNoteShare.setUpdateTime(DateUtils.getNowDate());
return nmNoteShareMapper.updateNmNoteShare(nmNoteShare);
}
/**
* 批量删除share书签分享
*
* @param noteIds 需要删除的share书签分享ID
* @return 结果
*/
@Override
public int deleteNmNoteShareByIds(Long[] noteIds)
{
return nmNoteShareMapper.deleteNmNoteShareByIds(noteIds);
}
/**
* 删除share书签分享信息
*
* @param noteId share书签分享ID
* @return 结果
*/
@Override
public int deleteNmNoteShareById(Long noteId)
{
return nmNoteShareMapper.deleteNmNoteShareById(noteId);
}
}

View File

@ -0,0 +1,93 @@
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 ruoyi
* @date 2020-09-20
*/
@Service
public class NmNoteTagServiceImpl implements INmNoteTagService
{
@Autowired
private NmNoteTagMapper nmNoteTagMapper;
/**
* 查询便签的标签
*
* @param noteTagId 便签的标签ID
* @return 便签的标签
*/
@Override
public NmNoteTag selectNmNoteTagById(Long noteTagId)
{
return nmNoteTagMapper.selectNmNoteTagById(noteTagId);
}
/**
* 查询便签的标签列表
*
* @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 noteTagIds 需要删除的便签的标签ID
* @return 结果
*/
@Override
public int deleteNmNoteTagByIds(Long[] noteTagIds)
{
return nmNoteTagMapper.deleteNmNoteTagByIds(noteTagIds);
}
/**
* 删除便签的标签信息
*
* @param noteTagId 便签的标签ID
* @return 结果
*/
@Override
public int deleteNmNoteTagById(Long noteTagId)
{
return nmNoteTagMapper.deleteNmNoteTagById(noteTagId);
}
}

View File

@ -0,0 +1,92 @@
<?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.NmNoteShareMapper">
<resultMap type="NmNoteShare" id="NmNoteShareResult">
<result property="noteId" column="note_id" />
<result property="isEncryption" column="is_encryption" />
<result property="noteQrcode" column="note_qrcode" />
<result property="shareUrl" column="share_url" />
<result property="sharePassword" column="share_password" />
<result property="shareImage" column="share_image" />
<result property="abortTime" column="abort_time" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectNmNoteShareVo">
select note_id, is_encryption, note_qrcode, share_url, share_password, share_image, abort_time, create_time, update_time from nm_note_share
</sql>
<select id="selectNmNoteShareList" parameterType="NmNoteShare" resultMap="NmNoteShareResult">
<include refid="selectNmNoteShareVo"/>
<where>
<if test="isEncryption != null "> and is_encryption = #{isEncryption}</if>
<if test="noteQrcode != null and noteQrcode != ''"> and note_qrcode = #{noteQrcode}</if>
<if test="shareUrl != null and shareUrl != ''"> and share_url = #{shareUrl}</if>
<if test="sharePassword != null and sharePassword != ''"> and share_password = #{sharePassword}</if>
<if test="shareImage != null and shareImage != ''"> and share_image = #{shareImage}</if>
<if test="abortTime != null "> and abort_time = #{abortTime}</if>
</where>
</select>
<select id="selectNmNoteShareById" parameterType="Long" resultMap="NmNoteShareResult">
<include refid="selectNmNoteShareVo"/>
where note_id = #{noteId}
</select>
<insert id="insertNmNoteShare" parameterType="NmNoteShare">
insert into nm_note_share
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="noteId != null">note_id,</if>
<if test="isEncryption != null">is_encryption,</if>
<if test="noteQrcode != null">note_qrcode,</if>
<if test="shareUrl != null">share_url,</if>
<if test="sharePassword != null">share_password,</if>
<if test="shareImage != null">share_image,</if>
<if test="abortTime != null">abort_time,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="noteId != null">#{noteId},</if>
<if test="isEncryption != null">#{isEncryption},</if>
<if test="noteQrcode != null">#{noteQrcode},</if>
<if test="shareUrl != null">#{shareUrl},</if>
<if test="sharePassword != null">#{sharePassword},</if>
<if test="shareImage != null">#{shareImage},</if>
<if test="abortTime != null">#{abortTime},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateNmNoteShare" parameterType="NmNoteShare">
update nm_note_share
<trim prefix="SET" suffixOverrides=",">
<if test="isEncryption != null">is_encryption = #{isEncryption},</if>
<if test="noteQrcode != null">note_qrcode = #{noteQrcode},</if>
<if test="shareUrl != null">share_url = #{shareUrl},</if>
<if test="sharePassword != null">share_password = #{sharePassword},</if>
<if test="shareImage != null">share_image = #{shareImage},</if>
<if test="abortTime != null">abort_time = #{abortTime},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where note_id = #{noteId}
</update>
<delete id="deleteNmNoteShareById" parameterType="Long">
delete from nm_note_share where note_id = #{noteId}
</delete>
<delete id="deleteNmNoteShareByIds" parameterType="String">
delete from nm_note_share where note_id in
<foreach item="noteId" collection="array" open="(" separator="," close=")">
#{noteId}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,64 @@
<?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="noteTagId" column="note_tag_id" />
<result property="noteId" column="note_id" />
<result property="tagId" column="tag_id" />
</resultMap>
<sql id="selectNmNoteTagVo">
select note_tag_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 note_tag_id = #{noteTagId}
</select>
<insert id="insertNmNoteTag" parameterType="NmNoteTag">
insert into nm_note_tag
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="noteTagId != null">note_tag_id,</if>
<if test="noteId != null">note_id,</if>
<if test="tagId != null">tag_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="noteTagId != null">#{noteTagId},</if>
<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 note_tag_id = #{noteTagId}
</update>
<delete id="deleteNmNoteTagById" parameterType="Long">
delete from nm_note_tag where note_tag_id = #{noteTagId}
</delete>
<delete id="deleteNmNoteTagByIds" parameterType="String">
delete from nm_note_tag where note_tag_id in
<foreach item="noteTagId" collection="array" open="(" separator="," close=")">
#{noteTagId}
</foreach>
</delete>
</mapper>