标签表 用户标签表 书签表和标签表中间表
This commit is contained in:
		| @@ -0,0 +1,65 @@ | ||||
| package com.ruoyi.bookmark.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; | ||||
|  | ||||
| /** | ||||
|  * 书签标签管理对象 sq_bookmark_tag | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public class SqBookmarkTag extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** ID */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 书签ID */ | ||||
|     @Excel(name = "书签ID") | ||||
|     private Long bookmarkId; | ||||
|  | ||||
|     /** 标签ID */ | ||||
|     @Excel(name = "标签ID") | ||||
|     private Long tagId; | ||||
|  | ||||
|     public void setId(Long id)  | ||||
|     { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId()  | ||||
|     { | ||||
|         return id; | ||||
|     } | ||||
|     public void setBookmarkId(Long bookmarkId)  | ||||
|     { | ||||
|         this.bookmarkId = bookmarkId; | ||||
|     } | ||||
|  | ||||
|     public Long getBookmarkId()  | ||||
|     { | ||||
|         return bookmarkId; | ||||
|     } | ||||
|     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("id", getId()) | ||||
|             .append("bookmarkId", getBookmarkId()) | ||||
|             .append("tagId", getTagId()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,66 @@ | ||||
| package com.ruoyi.bookmark.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; | ||||
|  | ||||
| /** | ||||
|  * 书签_标签对象 sq_tag | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public class SqTag extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** 书签标签id */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 标签名字 */ | ||||
|     @Excel(name = "标签名字") | ||||
|     private String name; | ||||
|  | ||||
|     /** 引用数量 */ | ||||
|     @Excel(name = "引用数量") | ||||
|     private Integer icount; | ||||
|  | ||||
|     public void setId(Long id)  | ||||
|     { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId()  | ||||
|     { | ||||
|         return id; | ||||
|     } | ||||
|     public void setName(String name)  | ||||
|     { | ||||
|         this.name = name; | ||||
|     } | ||||
|  | ||||
|     public String getName()  | ||||
|     { | ||||
|         return name; | ||||
|     } | ||||
|     public void setIcount(Integer icount)  | ||||
|     { | ||||
|         this.icount = icount; | ||||
|     } | ||||
|  | ||||
|     public Integer getIcount()  | ||||
|     { | ||||
|         return icount; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("id", getId()) | ||||
|             .append("name", getName()) | ||||
|             .append("icount", getIcount()) | ||||
|             .append("createTime", getCreateTime()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,93 @@ | ||||
| package com.ruoyi.bookmark.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; | ||||
|  | ||||
| /** | ||||
|  * 标签管理对象 sq_user_tag | ||||
|  *  | ||||
|  * @author wang | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public class SqUserTag extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** ID */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 用户ID */ | ||||
|     @Excel(name = "用户ID") | ||||
|     private Long userId; | ||||
|  | ||||
|     /** 书签ID */ | ||||
|     @Excel(name = "书签ID") | ||||
|     private Long tagId; | ||||
|  | ||||
|     /** 书签引用的数量 */ | ||||
|     @Excel(name = "书签引用的数量") | ||||
|     private Integer icount; | ||||
|  | ||||
|     /** 书签排序 */ | ||||
|     @Excel(name = "书签排序") | ||||
|     private Integer iorder; | ||||
|  | ||||
|     public void setId(Long id)  | ||||
|     { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId()  | ||||
|     { | ||||
|         return id; | ||||
|     } | ||||
|     public void setUserId(Long userId)  | ||||
|     { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public Long getUserId()  | ||||
|     { | ||||
|         return userId; | ||||
|     } | ||||
|     public void setTagId(Long tagId)  | ||||
|     { | ||||
|         this.tagId = tagId; | ||||
|     } | ||||
|  | ||||
|     public Long getTagId()  | ||||
|     { | ||||
|         return tagId; | ||||
|     } | ||||
|     public void setIcount(Integer icount)  | ||||
|     { | ||||
|         this.icount = icount; | ||||
|     } | ||||
|  | ||||
|     public Integer getIcount()  | ||||
|     { | ||||
|         return icount; | ||||
|     } | ||||
|     public void setIorder(Integer iorder)  | ||||
|     { | ||||
|         this.iorder = iorder; | ||||
|     } | ||||
|  | ||||
|     public Integer getIorder()  | ||||
|     { | ||||
|         return iorder; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("id", getId()) | ||||
|             .append("userId", getUserId()) | ||||
|             .append("tagId", getTagId()) | ||||
|             .append("icount", getIcount()) | ||||
|             .append("iorder", getIorder()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.bookmark.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.bookmark.domain.SqBookmarkTag; | ||||
|  | ||||
| /** | ||||
|  * 书签标签管理Mapper接口 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public interface SqBookmarkTagMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签标签管理 | ||||
|      *  | ||||
|      * @param id 书签标签管理ID | ||||
|      * @return 书签标签管理 | ||||
|      */ | ||||
|     public SqBookmarkTag selectSqBookmarkTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签标签管理列表 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 书签标签管理集合 | ||||
|      */ | ||||
|     public List<SqBookmarkTag> selectSqBookmarkTagList(SqBookmarkTag sqBookmarkTag); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签标签管理 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqBookmarkTag(SqBookmarkTag sqBookmarkTag); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签标签管理 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqBookmarkTag(SqBookmarkTag sqBookmarkTag); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签标签管理 | ||||
|      *  | ||||
|      * @param id 书签标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqBookmarkTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签标签管理 | ||||
|      *  | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqBookmarkTagByIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.bookmark.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.bookmark.domain.SqTag; | ||||
|  | ||||
| /** | ||||
|  * 书签_标签Mapper接口 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public interface SqTagMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签_标签 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 书签_标签 | ||||
|      */ | ||||
|     public SqTag selectSqTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_标签列表 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 书签_标签集合 | ||||
|      */ | ||||
|     public List<SqTag> selectSqTagList(SqTag sqTag); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_标签 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqTag(SqTag sqTag); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_标签 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqTag(SqTag sqTag); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_标签 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_标签 | ||||
|      *  | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqTagByIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.bookmark.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.bookmark.domain.SqUserTag; | ||||
|  | ||||
| /** | ||||
|  * 标签管理Mapper接口 | ||||
|  *  | ||||
|  * @author wang | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public interface SqUserTagMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询标签管理 | ||||
|      *  | ||||
|      * @param id 标签管理ID | ||||
|      * @return 标签管理 | ||||
|      */ | ||||
|     public SqUserTag selectSqUserTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询标签管理列表 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 标签管理集合 | ||||
|      */ | ||||
|     public List<SqUserTag> selectSqUserTagList(SqUserTag sqUserTag); | ||||
|  | ||||
|     /** | ||||
|      * 新增标签管理 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqUserTag(SqUserTag sqUserTag); | ||||
|  | ||||
|     /** | ||||
|      * 修改标签管理 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqUserTag(SqUserTag sqUserTag); | ||||
|  | ||||
|     /** | ||||
|      * 删除标签管理 | ||||
|      *  | ||||
|      * @param id 标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqUserTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除标签管理 | ||||
|      *  | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqUserTagByIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.bookmark.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.bookmark.domain.SqBookmarkTag; | ||||
|  | ||||
| /** | ||||
|  * 书签标签管理Service接口 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public interface ISqBookmarkTagService  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签标签管理 | ||||
|      *  | ||||
|      * @param id 书签标签管理ID | ||||
|      * @return 书签标签管理 | ||||
|      */ | ||||
|     public SqBookmarkTag selectSqBookmarkTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签标签管理列表 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 书签标签管理集合 | ||||
|      */ | ||||
|     public List<SqBookmarkTag> selectSqBookmarkTagList(SqBookmarkTag sqBookmarkTag); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签标签管理 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqBookmarkTag(SqBookmarkTag sqBookmarkTag); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签标签管理 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqBookmarkTag(SqBookmarkTag sqBookmarkTag); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签标签管理 | ||||
|      *  | ||||
|      * @param ids 需要删除的书签标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqBookmarkTagByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签标签管理信息 | ||||
|      *  | ||||
|      * @param id 书签标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqBookmarkTagById(Long id); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.bookmark.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.bookmark.domain.SqTag; | ||||
|  | ||||
| /** | ||||
|  * 书签_标签Service接口 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public interface ISqTagService  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签_标签 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 书签_标签 | ||||
|      */ | ||||
|     public SqTag selectSqTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_标签列表 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 书签_标签集合 | ||||
|      */ | ||||
|     public List<SqTag> selectSqTagList(SqTag sqTag); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_标签 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqTag(SqTag sqTag); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_标签 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqTag(SqTag sqTag); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_标签 | ||||
|      *  | ||||
|      * @param ids 需要删除的书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqTagByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_标签信息 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqTagById(Long id); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.bookmark.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.bookmark.domain.SqUserTag; | ||||
|  | ||||
| /** | ||||
|  * 标签管理Service接口 | ||||
|  *  | ||||
|  * @author wang | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| public interface ISqUserTagService  | ||||
| { | ||||
|     /** | ||||
|      * 查询标签管理 | ||||
|      *  | ||||
|      * @param id 标签管理ID | ||||
|      * @return 标签管理 | ||||
|      */ | ||||
|     public SqUserTag selectSqUserTagById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询标签管理列表 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 标签管理集合 | ||||
|      */ | ||||
|     public List<SqUserTag> selectSqUserTagList(SqUserTag sqUserTag); | ||||
|  | ||||
|     /** | ||||
|      * 新增标签管理 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqUserTag(SqUserTag sqUserTag); | ||||
|  | ||||
|     /** | ||||
|      * 修改标签管理 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqUserTag(SqUserTag sqUserTag); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除标签管理 | ||||
|      *  | ||||
|      * @param ids 需要删除的标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqUserTagByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除标签管理信息 | ||||
|      *  | ||||
|      * @param id 标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqUserTagById(Long id); | ||||
| } | ||||
| @@ -0,0 +1,93 @@ | ||||
| package com.ruoyi.bookmark.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.ruoyi.bookmark.mapper.SqBookmarkTagMapper; | ||||
| import com.ruoyi.bookmark.domain.SqBookmarkTag; | ||||
| import com.ruoyi.bookmark.service.ISqBookmarkTagService; | ||||
|  | ||||
| /** | ||||
|  * 书签标签管理Service业务层处理 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| @Service | ||||
| public class SqBookmarkTagServiceImpl implements ISqBookmarkTagService  | ||||
| { | ||||
|     @Autowired | ||||
|     private SqBookmarkTagMapper sqBookmarkTagMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询书签标签管理 | ||||
|      *  | ||||
|      * @param id 书签标签管理ID | ||||
|      * @return 书签标签管理 | ||||
|      */ | ||||
|     @Override | ||||
|     public SqBookmarkTag selectSqBookmarkTagById(Long id) | ||||
|     { | ||||
|         return sqBookmarkTagMapper.selectSqBookmarkTagById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询书签标签管理列表 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 书签标签管理 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SqBookmarkTag> selectSqBookmarkTagList(SqBookmarkTag sqBookmarkTag) | ||||
|     { | ||||
|         return sqBookmarkTagMapper.selectSqBookmarkTagList(sqBookmarkTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增书签标签管理 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSqBookmarkTag(SqBookmarkTag sqBookmarkTag) | ||||
|     { | ||||
|         return sqBookmarkTagMapper.insertSqBookmarkTag(sqBookmarkTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改书签标签管理 | ||||
|      *  | ||||
|      * @param sqBookmarkTag 书签标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSqBookmarkTag(SqBookmarkTag sqBookmarkTag) | ||||
|     { | ||||
|         return sqBookmarkTagMapper.updateSqBookmarkTag(sqBookmarkTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签标签管理 | ||||
|      *  | ||||
|      * @param ids 需要删除的书签标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqBookmarkTagByIds(Long[] ids) | ||||
|     { | ||||
|         return sqBookmarkTagMapper.deleteSqBookmarkTagByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除书签标签管理信息 | ||||
|      *  | ||||
|      * @param id 书签标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqBookmarkTagById(Long id) | ||||
|     { | ||||
|         return sqBookmarkTagMapper.deleteSqBookmarkTagById(id); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,95 @@ | ||||
| package com.ruoyi.bookmark.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.bookmark.mapper.SqTagMapper; | ||||
| import com.ruoyi.bookmark.domain.SqTag; | ||||
| import com.ruoyi.bookmark.service.ISqTagService; | ||||
|  | ||||
| /** | ||||
|  * 书签_标签Service业务层处理 | ||||
|  *  | ||||
|  * @author ruoyi | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| @Service | ||||
| public class SqTagServiceImpl implements ISqTagService  | ||||
| { | ||||
|     @Autowired | ||||
|     private SqTagMapper sqTagMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_标签 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 书签_标签 | ||||
|      */ | ||||
|     @Override | ||||
|     public SqTag selectSqTagById(Long id) | ||||
|     { | ||||
|         return sqTagMapper.selectSqTagById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_标签列表 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 书签_标签 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SqTag> selectSqTagList(SqTag sqTag) | ||||
|     { | ||||
|         return sqTagMapper.selectSqTagList(sqTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_标签 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSqTag(SqTag sqTag) | ||||
|     { | ||||
|         sqTag.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sqTagMapper.insertSqTag(sqTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_标签 | ||||
|      *  | ||||
|      * @param sqTag 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSqTag(SqTag sqTag) | ||||
|     { | ||||
|         return sqTagMapper.updateSqTag(sqTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_标签 | ||||
|      *  | ||||
|      * @param ids 需要删除的书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqTagByIds(Long[] ids) | ||||
|     { | ||||
|         return sqTagMapper.deleteSqTagByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_标签信息 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqTagById(Long id) | ||||
|     { | ||||
|         return sqTagMapper.deleteSqTagById(id); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,93 @@ | ||||
| package com.ruoyi.bookmark.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.ruoyi.bookmark.mapper.SqUserTagMapper; | ||||
| import com.ruoyi.bookmark.domain.SqUserTag; | ||||
| import com.ruoyi.bookmark.service.ISqUserTagService; | ||||
|  | ||||
| /** | ||||
|  * 标签管理Service业务层处理 | ||||
|  *  | ||||
|  * @author wang | ||||
|  * @date 2020-09-04 | ||||
|  */ | ||||
| @Service | ||||
| public class SqUserTagServiceImpl implements ISqUserTagService  | ||||
| { | ||||
|     @Autowired | ||||
|     private SqUserTagMapper sqUserTagMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询标签管理 | ||||
|      *  | ||||
|      * @param id 标签管理ID | ||||
|      * @return 标签管理 | ||||
|      */ | ||||
|     @Override | ||||
|     public SqUserTag selectSqUserTagById(Long id) | ||||
|     { | ||||
|         return sqUserTagMapper.selectSqUserTagById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询标签管理列表 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 标签管理 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SqUserTag> selectSqUserTagList(SqUserTag sqUserTag) | ||||
|     { | ||||
|         return sqUserTagMapper.selectSqUserTagList(sqUserTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增标签管理 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSqUserTag(SqUserTag sqUserTag) | ||||
|     { | ||||
|         return sqUserTagMapper.insertSqUserTag(sqUserTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改标签管理 | ||||
|      *  | ||||
|      * @param sqUserTag 标签管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSqUserTag(SqUserTag sqUserTag) | ||||
|     { | ||||
|         return sqUserTagMapper.updateSqUserTag(sqUserTag); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除标签管理 | ||||
|      *  | ||||
|      * @param ids 需要删除的标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqUserTagByIds(Long[] ids) | ||||
|     { | ||||
|         return sqUserTagMapper.deleteSqUserTagByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除标签管理信息 | ||||
|      *  | ||||
|      * @param id 标签管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqUserTagById(Long id) | ||||
|     { | ||||
|         return sqUserTagMapper.deleteSqUserTagById(id); | ||||
|     } | ||||
| } | ||||
| @@ -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.bookmark.mapper.SqBookmarkTagMapper"> | ||||
|      | ||||
|     <resultMap type="SqBookmarkTag" id="SqBookmarkTagResult"> | ||||
|         <result property="id"    column="id"    /> | ||||
|         <result property="bookmarkId"    column="bookmark_id"    /> | ||||
|         <result property="tagId"    column="tag_id"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSqBookmarkTagVo"> | ||||
|         select id, bookmark_id, tag_id from sq_bookmark_tag | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSqBookmarkTagList" parameterType="SqBookmarkTag" resultMap="SqBookmarkTagResult"> | ||||
|         <include refid="selectSqBookmarkTagVo"/> | ||||
|         <where>   | ||||
|             <if test="bookmarkId != null "> and bookmark_id = #{bookmarkId}</if> | ||||
|             <if test="tagId != null "> and tag_id = #{tagId}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|     <select id="selectSqBookmarkTagById" parameterType="Long" resultMap="SqBookmarkTagResult"> | ||||
|         <include refid="selectSqBookmarkTagVo"/> | ||||
|         where id = #{id} | ||||
|     </select> | ||||
|          | ||||
|     <insert id="insertSqBookmarkTag" parameterType="SqBookmarkTag"> | ||||
|         insert into sq_bookmark_tag | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="id != null">id,</if> | ||||
|             <if test="bookmarkId != null">bookmark_id,</if> | ||||
|             <if test="tagId != null">tag_id,</if> | ||||
|          </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="id != null">#{id},</if> | ||||
|             <if test="bookmarkId != null">#{bookmarkId},</if> | ||||
|             <if test="tagId != null">#{tagId},</if> | ||||
|          </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSqBookmarkTag" parameterType="SqBookmarkTag"> | ||||
|         update sq_bookmark_tag | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="bookmarkId != null">bookmark_id = #{bookmarkId},</if> | ||||
|             <if test="tagId != null">tag_id = #{tagId},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSqBookmarkTagById" parameterType="Long"> | ||||
|         delete from sq_bookmark_tag where id = #{id} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSqBookmarkTagByIds" parameterType="String"> | ||||
|         delete from sq_bookmark_tag where id in  | ||||
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | ||||
|             #{id} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|      | ||||
| </mapper> | ||||
| @@ -0,0 +1,66 @@ | ||||
| <?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.bookmark.mapper.SqTagMapper"> | ||||
|      | ||||
|     <resultMap type="SqTag" id="SqTagResult"> | ||||
|         <result property="id"    column="id"    /> | ||||
|         <result property="name"    column="name"    /> | ||||
|         <result property="icount"    column="icount"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSqTagVo"> | ||||
|         select id, name, icount, create_time from sq_tag | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSqTagList" parameterType="SqTag" resultMap="SqTagResult"> | ||||
|         <include refid="selectSqTagVo"/> | ||||
|         <where>   | ||||
|             <if test="name != null  and name != ''"> and name = #{name}</if> | ||||
|             <if test="icount != null "> and icount = #{icount}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|     <select id="selectSqTagById" parameterType="Long" resultMap="SqTagResult"> | ||||
|         <include refid="selectSqTagVo"/> | ||||
|         where id = #{id} | ||||
|     </select> | ||||
|          | ||||
|     <insert id="insertSqTag" parameterType="SqTag" useGeneratedKeys="true" keyProperty="id"> | ||||
|         insert into sq_tag | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="name != null">name,</if> | ||||
|             <if test="icount != null">icount,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|          </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="name != null">#{name},</if> | ||||
|             <if test="icount != null">#{icount},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|          </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSqTag" parameterType="SqTag"> | ||||
|         update sq_tag | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="name != null">name = #{name},</if> | ||||
|             <if test="icount != null">icount = #{icount},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSqTagById" parameterType="Long"> | ||||
|         delete from sq_tag where id = #{id} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSqTagByIds" parameterType="String"> | ||||
|         delete from sq_tag where id in  | ||||
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | ||||
|             #{id} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|      | ||||
| </mapper> | ||||
| @@ -0,0 +1,72 @@ | ||||
| <?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.bookmark.mapper.SqUserTagMapper"> | ||||
|      | ||||
|     <resultMap type="SqUserTag" id="SqUserTagResult"> | ||||
|         <result property="id"    column="id"    /> | ||||
|         <result property="userId"    column="user_id"    /> | ||||
|         <result property="tagId"    column="tag_id"    /> | ||||
|         <result property="icount"    column="icount"    /> | ||||
|         <result property="iorder"    column="iorder"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSqUserTagVo"> | ||||
|         select id, user_id, tag_id, icount, iorder from sq_user_tag | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSqUserTagList" parameterType="SqUserTag" resultMap="SqUserTagResult"> | ||||
|         <include refid="selectSqUserTagVo"/> | ||||
|         <where>   | ||||
|             <if test="userId != null "> and user_id = #{userId}</if> | ||||
|             <if test="tagId != null "> and tag_id = #{tagId}</if> | ||||
|             <if test="icount != null "> and icount = #{icount}</if> | ||||
|             <if test="iorder != null "> and iorder = #{iorder}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|     <select id="selectSqUserTagById" parameterType="Long" resultMap="SqUserTagResult"> | ||||
|         <include refid="selectSqUserTagVo"/> | ||||
|         where id = #{id} | ||||
|     </select> | ||||
|          | ||||
|     <insert id="insertSqUserTag" parameterType="SqUserTag" useGeneratedKeys="true" keyProperty="id"> | ||||
|         insert into sq_user_tag | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="userId != null">user_id,</if> | ||||
|             <if test="tagId != null">tag_id,</if> | ||||
|             <if test="icount != null">icount,</if> | ||||
|             <if test="iorder != null">iorder,</if> | ||||
|          </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="userId != null">#{userId},</if> | ||||
|             <if test="tagId != null">#{tagId},</if> | ||||
|             <if test="icount != null">#{icount},</if> | ||||
|             <if test="iorder != null">#{iorder},</if> | ||||
|          </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSqUserTag" parameterType="SqUserTag"> | ||||
|         update sq_user_tag | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="userId != null">user_id = #{userId},</if> | ||||
|             <if test="tagId != null">tag_id = #{tagId},</if> | ||||
|             <if test="icount != null">icount = #{icount},</if> | ||||
|             <if test="iorder != null">iorder = #{iorder},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSqUserTagById" parameterType="Long"> | ||||
|         delete from sq_user_tag where id = #{id} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSqUserTagByIds" parameterType="String"> | ||||
|         delete from sq_user_tag where id in  | ||||
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | ||||
|             #{id} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|      | ||||
| </mapper> | ||||
		Reference in New Issue
	
	Block a user