自动生成 3张表的代码
This commit is contained in:
		
							
								
								
									
										192
									
								
								ruoyi-bookmark/src/main/java/com/ruoyi/sq/domain/SqBookmark.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										192
									
								
								ruoyi-bookmark/src/main/java/com/ruoyi/sq/domain/SqBookmark.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,192 @@ | ||||
| package com.ruoyi.sq.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 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public class SqBookmark extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     private Long bookmarkId; | ||||
|  | ||||
|     /** 所属用户ID */ | ||||
|     @Excel(name = "所属用户ID") | ||||
|     private Long userid; | ||||
|  | ||||
|     /** 书签标题 */ | ||||
|     @Excel(name = "书签标题") | ||||
|     private String title; | ||||
|  | ||||
|     /** 书签地址 */ | ||||
|     @Excel(name = "书签地址") | ||||
|     private String url; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     @Excel(name = "书签地址") | ||||
|     private String urls; | ||||
|  | ||||
|     /** 书签描述 */ | ||||
|     @Excel(name = "书签描述") | ||||
|     private String description; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     @Excel(name = "书签描述") | ||||
|     private String image; | ||||
|  | ||||
|     /** 标签 */ | ||||
|     @Excel(name = "标签") | ||||
|     private String label; | ||||
|  | ||||
|     /** 分类ID */ | ||||
|     @Excel(name = "分类ID") | ||||
|     private Long menuId; | ||||
|  | ||||
|     /** 点赞数 */ | ||||
|     @Excel(name = "点赞数") | ||||
|     private Long zcount; | ||||
|  | ||||
|     /** 0 未删除 1表示删除 */ | ||||
|     @Excel(name = "0 未删除 1表示删除") | ||||
|     private Integer idelete; | ||||
|  | ||||
|     /** 0公开显示 1隐藏显示 2好友显示 3稍后再看 */ | ||||
|     @Excel(name = "0公开显示 1隐藏显示 2好友显示 3稍后再看") | ||||
|     private Integer start; | ||||
|  | ||||
|     public void setBookmarkId(Long bookmarkId)  | ||||
|     { | ||||
|         this.bookmarkId = bookmarkId; | ||||
|     } | ||||
|  | ||||
|     public Long getBookmarkId()  | ||||
|     { | ||||
|         return bookmarkId; | ||||
|     } | ||||
|     public void setUserid(Long userid)  | ||||
|     { | ||||
|         this.userid = userid; | ||||
|     } | ||||
|  | ||||
|     public Long getUserid()  | ||||
|     { | ||||
|         return userid; | ||||
|     } | ||||
|     public void setTitle(String title)  | ||||
|     { | ||||
|         this.title = title; | ||||
|     } | ||||
|  | ||||
|     public String getTitle()  | ||||
|     { | ||||
|         return title; | ||||
|     } | ||||
|     public void setUrl(String url)  | ||||
|     { | ||||
|         this.url = url; | ||||
|     } | ||||
|  | ||||
|     public String getUrl()  | ||||
|     { | ||||
|         return url; | ||||
|     } | ||||
|     public void setUrls(String urls)  | ||||
|     { | ||||
|         this.urls = urls; | ||||
|     } | ||||
|  | ||||
|     public String getUrls()  | ||||
|     { | ||||
|         return urls; | ||||
|     } | ||||
|     public void setDescription(String description)  | ||||
|     { | ||||
|         this.description = description; | ||||
|     } | ||||
|  | ||||
|     public String getDescription()  | ||||
|     { | ||||
|         return description; | ||||
|     } | ||||
|     public void setImage(String image)  | ||||
|     { | ||||
|         this.image = image; | ||||
|     } | ||||
|  | ||||
|     public String getImage()  | ||||
|     { | ||||
|         return image; | ||||
|     } | ||||
|     public void setLabel(String label)  | ||||
|     { | ||||
|         this.label = label; | ||||
|     } | ||||
|  | ||||
|     public String getLabel()  | ||||
|     { | ||||
|         return label; | ||||
|     } | ||||
|     public void setMenuId(Long menuId)  | ||||
|     { | ||||
|         this.menuId = menuId; | ||||
|     } | ||||
|  | ||||
|     public Long getMenuId()  | ||||
|     { | ||||
|         return menuId; | ||||
|     } | ||||
|     public void setZcount(Long zcount)  | ||||
|     { | ||||
|         this.zcount = zcount; | ||||
|     } | ||||
|  | ||||
|     public Long getZcount()  | ||||
|     { | ||||
|         return zcount; | ||||
|     } | ||||
|     public void setIdelete(Integer idelete)  | ||||
|     { | ||||
|         this.idelete = idelete; | ||||
|     } | ||||
|  | ||||
|     public Integer getIdelete()  | ||||
|     { | ||||
|         return idelete; | ||||
|     } | ||||
|     public void setStart(Integer start)  | ||||
|     { | ||||
|         this.start = start; | ||||
|     } | ||||
|  | ||||
|     public Integer getStart()  | ||||
|     { | ||||
|         return start; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("bookmarkId", getBookmarkId()) | ||||
|             .append("userid", getUserid()) | ||||
|             .append("title", getTitle()) | ||||
|             .append("url", getUrl()) | ||||
|             .append("urls", getUrls()) | ||||
|             .append("description", getDescription()) | ||||
|             .append("image", getImage()) | ||||
|             .append("label", getLabel()) | ||||
|             .append("menuId", getMenuId()) | ||||
|             .append("zcount", getZcount()) | ||||
|             .append("idelete", getIdelete()) | ||||
|             .append("start", getStart()) | ||||
|             .append("createTime", getCreateTime()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,94 @@ | ||||
| package com.ruoyi.sq.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_label | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public class SqLabel extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 书签所属id */ | ||||
|     @Excel(name = "书签所属id") | ||||
|     private Integer userId; | ||||
|  | ||||
|     /** 书签名字 */ | ||||
|     @Excel(name = "书签名字") | ||||
|     private String labelName; | ||||
|  | ||||
|     /** 排序 */ | ||||
|     @Excel(name = "排序") | ||||
|     private Integer order; | ||||
|  | ||||
|     /** 使用数量 */ | ||||
|     @Excel(name = "使用数量") | ||||
|     private Long labelCount; | ||||
|  | ||||
|     public void setId(Long id)  | ||||
|     { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId()  | ||||
|     { | ||||
|         return id; | ||||
|     } | ||||
|     public void setUserId(Integer userId)  | ||||
|     { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public Integer getUserId()  | ||||
|     { | ||||
|         return userId; | ||||
|     } | ||||
|     public void setLabelName(String labelName)  | ||||
|     { | ||||
|         this.labelName = labelName; | ||||
|     } | ||||
|  | ||||
|     public String getLabelName()  | ||||
|     { | ||||
|         return labelName; | ||||
|     } | ||||
|     public void setOrder(Integer order)  | ||||
|     { | ||||
|         this.order = order; | ||||
|     } | ||||
|  | ||||
|     public Integer getOrder()  | ||||
|     { | ||||
|         return order; | ||||
|     } | ||||
|     public void setLabelCount(Long labelCount)  | ||||
|     { | ||||
|         this.labelCount = labelCount; | ||||
|     } | ||||
|  | ||||
|     public Long getLabelCount()  | ||||
|     { | ||||
|         return labelCount; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("id", getId()) | ||||
|             .append("userId", getUserId()) | ||||
|             .append("labelName", getLabelName()) | ||||
|             .append("order", getOrder()) | ||||
|             .append("createTime", getCreateTime()) | ||||
|             .append("labelCount", getLabelCount()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
							
								
								
									
										122
									
								
								ruoyi-bookmark/src/main/java/com/ruoyi/sq/domain/SqMenu.java
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										122
									
								
								ruoyi-bookmark/src/main/java/com/ruoyi/sq/domain/SqMenu.java
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,122 @@ | ||||
| package com.ruoyi.sq.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_menu | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public class SqMenu extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     private Long menuId; | ||||
|  | ||||
|     /** 归属用户ID */ | ||||
|     @Excel(name = "归属用户ID") | ||||
|     private Long userId; | ||||
|  | ||||
|     /** 分类名称 */ | ||||
|     @Excel(name = "分类名称") | ||||
|     private String menuName; | ||||
|  | ||||
|     /** 菜单url */ | ||||
|     @Excel(name = "菜单url") | ||||
|     private String menuUrl; | ||||
|  | ||||
|     /** 菜单图标 */ | ||||
|     @Excel(name = "菜单图标") | ||||
|     private String menuIcon; | ||||
|  | ||||
|     /** 父菜单id */ | ||||
|     @Excel(name = "父菜单id") | ||||
|     private Long parentId; | ||||
|  | ||||
|     /** 菜单顺序 */ | ||||
|     @Excel(name = "菜单顺序") | ||||
|     private Integer menuOrder; | ||||
|  | ||||
|     public void setMenuId(Long menuId)  | ||||
|     { | ||||
|         this.menuId = menuId; | ||||
|     } | ||||
|  | ||||
|     public Long getMenuId()  | ||||
|     { | ||||
|         return menuId; | ||||
|     } | ||||
|     public void setUserId(Long userId)  | ||||
|     { | ||||
|         this.userId = userId; | ||||
|     } | ||||
|  | ||||
|     public Long getUserId()  | ||||
|     { | ||||
|         return userId; | ||||
|     } | ||||
|     public void setMenuName(String menuName)  | ||||
|     { | ||||
|         this.menuName = menuName; | ||||
|     } | ||||
|  | ||||
|     public String getMenuName()  | ||||
|     { | ||||
|         return menuName; | ||||
|     } | ||||
|     public void setMenuUrl(String menuUrl)  | ||||
|     { | ||||
|         this.menuUrl = menuUrl; | ||||
|     } | ||||
|  | ||||
|     public String getMenuUrl()  | ||||
|     { | ||||
|         return menuUrl; | ||||
|     } | ||||
|     public void setMenuIcon(String menuIcon)  | ||||
|     { | ||||
|         this.menuIcon = menuIcon; | ||||
|     } | ||||
|  | ||||
|     public String getMenuIcon()  | ||||
|     { | ||||
|         return menuIcon; | ||||
|     } | ||||
|     public void setParentId(Long parentId)  | ||||
|     { | ||||
|         this.parentId = parentId; | ||||
|     } | ||||
|  | ||||
|     public Long getParentId()  | ||||
|     { | ||||
|         return parentId; | ||||
|     } | ||||
|     public void setMenuOrder(Integer menuOrder)  | ||||
|     { | ||||
|         this.menuOrder = menuOrder; | ||||
|     } | ||||
|  | ||||
|     public Integer getMenuOrder()  | ||||
|     { | ||||
|         return menuOrder; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||||
|             .append("menuId", getMenuId()) | ||||
|             .append("userId", getUserId()) | ||||
|             .append("menuName", getMenuName()) | ||||
|             .append("menuUrl", getMenuUrl()) | ||||
|             .append("menuIcon", getMenuIcon()) | ||||
|             .append("parentId", getParentId()) | ||||
|             .append("menuOrder", getMenuOrder()) | ||||
|             .append("createTime", getCreateTime()) | ||||
|             .toString(); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.sq.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.sq.domain.SqBookmark; | ||||
|  | ||||
| /** | ||||
|  * 书签Mapper接口 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public interface SqBookmarkMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签 | ||||
|      *  | ||||
|      * @param bookmarkId 书签ID | ||||
|      * @return 书签 | ||||
|      */ | ||||
|     public SqBookmark selectSqBookmarkById(Long bookmarkId); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签列表 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 书签集合 | ||||
|      */ | ||||
|     public List<SqBookmark> selectSqBookmarkList(SqBookmark sqBookmark); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqBookmark(SqBookmark sqBookmark); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqBookmark(SqBookmark sqBookmark); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签 | ||||
|      *  | ||||
|      * @param bookmarkId 书签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqBookmarkById(Long bookmarkId); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签 | ||||
|      *  | ||||
|      * @param bookmarkIds 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqBookmarkByIds(Long[] bookmarkIds); | ||||
| } | ||||
| @@ -0,0 +1,62 @@ | ||||
| package com.ruoyi.sq.mapper; | ||||
|  | ||||
| import com.ruoyi.sq.domain.SqLabel; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| /** | ||||
|  * 书签_标签Mapper接口 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public interface SqLabelMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签_标签 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 书签_标签 | ||||
|      */ | ||||
|     public SqLabel selectSqLabelById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_标签列表 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 书签_标签集合 | ||||
|      */ | ||||
|     public List<SqLabel> selectSqLabelList(SqLabel sqLabel); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_标签 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqLabel(SqLabel sqLabel); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_标签 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqLabel(SqLabel sqLabel); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_标签 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqLabelById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_标签 | ||||
|      *  | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqLabelByIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.sq.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.sq.domain.SqMenu; | ||||
|  | ||||
| /** | ||||
|  * 书签_菜单Mapper接口 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public interface SqMenuMapper  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签_菜单 | ||||
|      *  | ||||
|      * @param menuId 书签_菜单ID | ||||
|      * @return 书签_菜单 | ||||
|      */ | ||||
|     public SqMenu selectSqMenuById(Long menuId); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_菜单列表 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 书签_菜单集合 | ||||
|      */ | ||||
|     public List<SqMenu> selectSqMenuList(SqMenu sqMenu); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_菜单 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqMenu(SqMenu sqMenu); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_菜单 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqMenu(SqMenu sqMenu); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_菜单 | ||||
|      *  | ||||
|      * @param menuId 书签_菜单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqMenuById(Long menuId); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_菜单 | ||||
|      *  | ||||
|      * @param menuIds 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqMenuByIds(Long[] menuIds); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.ruoyi.sq.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.ruoyi.sq.domain.SqBookmark; | ||||
|  | ||||
| /** | ||||
|  * 书签Service接口 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public interface ISqBookmarkService  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签 | ||||
|      *  | ||||
|      * @param bookmarkId 书签ID | ||||
|      * @return 书签 | ||||
|      */ | ||||
|     public SqBookmark selectSqBookmarkById(Long bookmarkId); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签列表 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 书签集合 | ||||
|      */ | ||||
|     public List<SqBookmark> selectSqBookmarkList(SqBookmark sqBookmark); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqBookmark(SqBookmark sqBookmark); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqBookmark(SqBookmark sqBookmark); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签 | ||||
|      *  | ||||
|      * @param bookmarkIds 需要删除的书签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqBookmarkByIds(Long[] bookmarkIds); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签信息 | ||||
|      *  | ||||
|      * @param bookmarkId 书签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqBookmarkById(Long bookmarkId); | ||||
| } | ||||
| @@ -0,0 +1,62 @@ | ||||
| package com.ruoyi.sq.service; | ||||
|  | ||||
| import com.ruoyi.sq.domain.SqLabel; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| /** | ||||
|  * 书签_标签Service接口 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public interface ISqLabelService  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签_标签 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 书签_标签 | ||||
|      */ | ||||
|     public SqLabel selectSqLabelById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_标签列表 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 书签_标签集合 | ||||
|      */ | ||||
|     public List<SqLabel> selectSqLabelList(SqLabel sqLabel); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_标签 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqLabel(SqLabel sqLabel); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_标签 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqLabel(SqLabel sqLabel); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_标签 | ||||
|      *  | ||||
|      * @param ids 需要删除的书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqLabelByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_标签信息 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqLabelById(Long id); | ||||
| } | ||||
| @@ -0,0 +1,62 @@ | ||||
| package com.ruoyi.sq.service; | ||||
|  | ||||
| import com.ruoyi.sq.domain.SqMenu; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| /** | ||||
|  * 书签_菜单Service接口 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| public interface ISqMenuService  | ||||
| { | ||||
|     /** | ||||
|      * 查询书签_菜单 | ||||
|      *  | ||||
|      * @param menuId 书签_菜单ID | ||||
|      * @return 书签_菜单 | ||||
|      */ | ||||
|     public SqMenu selectSqMenuById(Long menuId); | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_菜单列表 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 书签_菜单集合 | ||||
|      */ | ||||
|     public List<SqMenu> selectSqMenuList(SqMenu sqMenu); | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_菜单 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSqMenu(SqMenu sqMenu); | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_菜单 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSqMenu(SqMenu sqMenu); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_菜单 | ||||
|      *  | ||||
|      * @param menuIds 需要删除的书签_菜单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqMenuByIds(Long[] menuIds); | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_菜单信息 | ||||
|      *  | ||||
|      * @param menuId 书签_菜单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSqMenuById(Long menuId); | ||||
| } | ||||
| @@ -0,0 +1,97 @@ | ||||
| package com.ruoyi.sq.service.impl; | ||||
|  | ||||
| import com.ruoyi.sq.mapper.SqBookmarkMapper; | ||||
| import com.ruoyi.sq.service.ISqBookmarkService; | ||||
|  | ||||
| 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.sq.domain.SqBookmark; | ||||
|  | ||||
| /** | ||||
|  * 书签Service业务层处理 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| @Service | ||||
| public class SqBookmarkServiceImpl implements ISqBookmarkService | ||||
| { | ||||
|     @Autowired | ||||
|     private SqBookmarkMapper sqBookmarkMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询书签 | ||||
|      *  | ||||
|      * @param bookmarkId 书签ID | ||||
|      * @return 书签 | ||||
|      */ | ||||
|     @Override | ||||
|     public SqBookmark selectSqBookmarkById(Long bookmarkId) | ||||
|     { | ||||
|         return sqBookmarkMapper.selectSqBookmarkById(bookmarkId); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询书签列表 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 书签 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SqBookmark> selectSqBookmarkList(SqBookmark sqBookmark) | ||||
|     { | ||||
|         return sqBookmarkMapper.selectSqBookmarkList(sqBookmark); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增书签 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSqBookmark(SqBookmark sqBookmark) | ||||
|     { | ||||
|         sqBookmark.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sqBookmarkMapper.insertSqBookmark(sqBookmark); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改书签 | ||||
|      *  | ||||
|      * @param sqBookmark 书签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSqBookmark(SqBookmark sqBookmark) | ||||
|     { | ||||
|         return sqBookmarkMapper.updateSqBookmark(sqBookmark); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签 | ||||
|      *  | ||||
|      * @param bookmarkIds 需要删除的书签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqBookmarkByIds(Long[] bookmarkIds) | ||||
|     { | ||||
|         return sqBookmarkMapper.deleteSqBookmarkByIds(bookmarkIds); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除书签信息 | ||||
|      *  | ||||
|      * @param bookmarkId 书签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqBookmarkById(Long bookmarkId) | ||||
|     { | ||||
|         return sqBookmarkMapper.deleteSqBookmarkById(bookmarkId); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,96 @@ | ||||
| package com.ruoyi.sq.service.impl; | ||||
|  | ||||
| import com.ruoyi.sq.domain.SqLabel; | ||||
| import com.ruoyi.sq.service.ISqLabelService; | ||||
|  | ||||
| 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.sq.mapper.SqLabelMapper; | ||||
|  | ||||
| /** | ||||
|  * 书签_标签Service业务层处理 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| @Service | ||||
| public class SqLabelServiceImpl implements ISqLabelService | ||||
| { | ||||
|     @Autowired | ||||
|     private SqLabelMapper sqLabelMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_标签 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 书签_标签 | ||||
|      */ | ||||
|     @Override | ||||
|     public SqLabel selectSqLabelById(Long id) | ||||
|     { | ||||
|         return sqLabelMapper.selectSqLabelById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_标签列表 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 书签_标签 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SqLabel> selectSqLabelList(SqLabel sqLabel) | ||||
|     { | ||||
|         return sqLabelMapper.selectSqLabelList(sqLabel); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_标签 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSqLabel(SqLabel sqLabel) | ||||
|     { | ||||
|         sqLabel.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sqLabelMapper.insertSqLabel(sqLabel); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_标签 | ||||
|      *  | ||||
|      * @param sqLabel 书签_标签 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSqLabel(SqLabel sqLabel) | ||||
|     { | ||||
|         return sqLabelMapper.updateSqLabel(sqLabel); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_标签 | ||||
|      *  | ||||
|      * @param ids 需要删除的书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqLabelByIds(Long[] ids) | ||||
|     { | ||||
|         return sqLabelMapper.deleteSqLabelByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_标签信息 | ||||
|      *  | ||||
|      * @param id 书签_标签ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqLabelById(Long id) | ||||
|     { | ||||
|         return sqLabelMapper.deleteSqLabelById(id); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,97 @@ | ||||
| package com.ruoyi.sq.service.impl; | ||||
|  | ||||
| import com.ruoyi.sq.domain.SqMenu; | ||||
| import com.ruoyi.sq.mapper.SqMenuMapper; | ||||
|  | ||||
| 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.sq.service.ISqMenuService; | ||||
|  | ||||
| /** | ||||
|  * 书签_菜单Service业务层处理 | ||||
|  *  | ||||
|  * @author wanghao | ||||
|  * @date 2020-07-26 | ||||
|  */ | ||||
| @Service | ||||
| public class SqMenuServiceImpl implements ISqMenuService  | ||||
| { | ||||
|     @Autowired | ||||
|     private SqMenuMapper sqMenuMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_菜单 | ||||
|      *  | ||||
|      * @param menuId 书签_菜单ID | ||||
|      * @return 书签_菜单 | ||||
|      */ | ||||
|     @Override | ||||
|     public SqMenu selectSqMenuById(Long menuId) | ||||
|     { | ||||
|         return sqMenuMapper.selectSqMenuById(menuId); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询书签_菜单列表 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 书签_菜单 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SqMenu> selectSqMenuList(SqMenu sqMenu) | ||||
|     { | ||||
|         return sqMenuMapper.selectSqMenuList(sqMenu); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增书签_菜单 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSqMenu(SqMenu sqMenu) | ||||
|     { | ||||
|         sqMenu.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sqMenuMapper.insertSqMenu(sqMenu); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改书签_菜单 | ||||
|      *  | ||||
|      * @param sqMenu 书签_菜单 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSqMenu(SqMenu sqMenu) | ||||
|     { | ||||
|         return sqMenuMapper.updateSqMenu(sqMenu); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除书签_菜单 | ||||
|      *  | ||||
|      * @param menuIds 需要删除的书签_菜单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqMenuByIds(Long[] menuIds) | ||||
|     { | ||||
|         return sqMenuMapper.deleteSqMenuByIds(menuIds); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除书签_菜单信息 | ||||
|      *  | ||||
|      * @param menuId 书签_菜单ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSqMenuById(Long menuId) | ||||
|     { | ||||
|         return sqMenuMapper.deleteSqMenuById(menuId); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,111 @@ | ||||
| <?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.sq.mapper.SqBookmarkMapper"> | ||||
|      | ||||
|     <resultMap type="SqBookmark" id="SqBookmarkResult"> | ||||
|         <result property="bookmarkId"    column="bookmark_id"    /> | ||||
|         <result property="userid"    column="userid"    /> | ||||
|         <result property="title"    column="title"    /> | ||||
|         <result property="url"    column="url"    /> | ||||
|         <result property="urls"    column="urls"    /> | ||||
|         <result property="description"    column="description"    /> | ||||
|         <result property="image"    column="image"    /> | ||||
|         <result property="label"    column="Label"    /> | ||||
|         <result property="menuId"    column="menu_id"    /> | ||||
|         <result property="zcount"    column="zcount"    /> | ||||
|         <result property="idelete"    column="IDelete"    /> | ||||
|         <result property="start"    column="Start"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSqBookmarkVo"> | ||||
|         select bookmark_id, userid, title, url, urls, description, image, Label, menu_id, zcount, IDelete, Start, create_time from sq_bookmark | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSqBookmarkList" parameterType="SqBookmark" resultMap="SqBookmarkResult"> | ||||
|         <include refid="selectSqBookmarkVo"/> | ||||
|         <where>   | ||||
|             <if test="userid != null "> and userid = #{userid}</if> | ||||
|             <if test="title != null  and title != ''"> and title = #{title}</if> | ||||
|             <if test="url != null  and url != ''"> and url = #{url}</if> | ||||
|             <if test="urls != null  and urls != ''"> and urls = #{urls}</if> | ||||
|             <if test="description != null  and description != ''"> and description = #{description}</if> | ||||
|             <if test="image != null  and image != ''"> and image = #{image}</if> | ||||
|             <if test="label != null  and label != ''"> and Label = #{label}</if> | ||||
|             <if test="menuId != null "> and menu_id = #{menuId}</if> | ||||
|             <if test="zcount != null "> and zcount = #{zcount}</if> | ||||
|             <if test="idelete != null "> and IDelete = #{idelete}</if> | ||||
|             <if test="start != null "> and Start = #{start}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|     <select id="selectSqBookmarkById" parameterType="Long" resultMap="SqBookmarkResult"> | ||||
|         <include refid="selectSqBookmarkVo"/> | ||||
|         where bookmark_id = #{bookmarkId} | ||||
|     </select> | ||||
|          | ||||
|     <insert id="insertSqBookmark" parameterType="SqBookmark" useGeneratedKeys="true" keyProperty="bookmarkId"> | ||||
|         insert into sq_bookmark | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="userid != null">userid,</if> | ||||
|             <if test="title != null">title,</if> | ||||
|             <if test="url != null">url,</if> | ||||
|             <if test="urls != null">urls,</if> | ||||
|             <if test="description != null">description,</if> | ||||
|             <if test="image != null">image,</if> | ||||
|             <if test="label != null">Label,</if> | ||||
|             <if test="menuId != null">menu_id,</if> | ||||
|             <if test="zcount != null">zcount,</if> | ||||
|             <if test="idelete != null">IDelete,</if> | ||||
|             <if test="start != null">Start,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|          </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="userid != null">#{userid},</if> | ||||
|             <if test="title != null">#{title},</if> | ||||
|             <if test="url != null">#{url},</if> | ||||
|             <if test="urls != null">#{urls},</if> | ||||
|             <if test="description != null">#{description},</if> | ||||
|             <if test="image != null">#{image},</if> | ||||
|             <if test="label != null">#{label},</if> | ||||
|             <if test="menuId != null">#{menuId},</if> | ||||
|             <if test="zcount != null">#{zcount},</if> | ||||
|             <if test="idelete != null">#{idelete},</if> | ||||
|             <if test="start != null">#{start},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|          </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSqBookmark" parameterType="SqBookmark"> | ||||
|         update sq_bookmark | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="userid != null">userid = #{userid},</if> | ||||
|             <if test="title != null">title = #{title},</if> | ||||
|             <if test="url != null">url = #{url},</if> | ||||
|             <if test="urls != null">urls = #{urls},</if> | ||||
|             <if test="description != null">description = #{description},</if> | ||||
|             <if test="image != null">image = #{image},</if> | ||||
|             <if test="label != null">Label = #{label},</if> | ||||
|             <if test="menuId != null">menu_id = #{menuId},</if> | ||||
|             <if test="zcount != null">zcount = #{zcount},</if> | ||||
|             <if test="idelete != null">IDelete = #{idelete},</if> | ||||
|             <if test="start != null">Start = #{start},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|         </trim> | ||||
|         where bookmark_id = #{bookmarkId} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSqBookmarkById" parameterType="Long"> | ||||
|         delete from sq_bookmark where bookmark_id = #{bookmarkId} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSqBookmarkByIds" parameterType="String"> | ||||
|         delete from sq_bookmark where bookmark_id in  | ||||
|         <foreach item="bookmarkId" collection="array" open="(" separator="," close=")"> | ||||
|             #{bookmarkId} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|      | ||||
| </mapper> | ||||
| @@ -0,0 +1,76 @@ | ||||
| <?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.sq.mapper.SqLabelMapper"> | ||||
|      | ||||
|     <resultMap type="SqLabel" id="SqLabelResult"> | ||||
|         <result property="id"    column="id"    /> | ||||
|         <result property="userId"    column="user_id"    /> | ||||
|         <result property="labelName"    column="label_name"    /> | ||||
|         <result property="order"    column="order"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|         <result property="labelCount"    column="label_count"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSqLabelVo"> | ||||
|         select id, user_id, label_name, order, create_time, label_count from sq_label | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSqLabelList" parameterType="SqLabel" resultMap="SqLabelResult"> | ||||
|         <include refid="selectSqLabelVo"/> | ||||
|         <where>   | ||||
|             <if test="userId != null "> and user_id = #{userId}</if> | ||||
|             <if test="labelName != null  and labelName != ''"> and label_name like concat('%', #{labelName}, '%')</if> | ||||
|             <if test="order != null "> and order = #{order}</if> | ||||
|             <if test="labelCount != null "> and label_count = #{labelCount}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|     <select id="selectSqLabelById" parameterType="Long" resultMap="SqLabelResult"> | ||||
|         <include refid="selectSqLabelVo"/> | ||||
|         where id = #{id} | ||||
|     </select> | ||||
|          | ||||
|     <insert id="insertSqLabel" parameterType="SqLabel" useGeneratedKeys="true" keyProperty="id"> | ||||
|         insert into sq_label | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="userId != null">user_id,</if> | ||||
|             <if test="labelName != null">label_name,</if> | ||||
|             <if test="order != null">order,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|             <if test="labelCount != null">label_count,</if> | ||||
|          </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="userId != null">#{userId},</if> | ||||
|             <if test="labelName != null">#{labelName},</if> | ||||
|             <if test="order != null">#{order},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|             <if test="labelCount != null">#{labelCount},</if> | ||||
|          </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSqLabel" parameterType="SqLabel"> | ||||
|         update sq_label | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="userId != null">user_id = #{userId},</if> | ||||
|             <if test="labelName != null">label_name = #{labelName},</if> | ||||
|             <if test="order != null">order = #{order},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|             <if test="labelCount != null">label_count = #{labelCount},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSqLabelById" parameterType="Long"> | ||||
|         delete from sq_label where id = #{id} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSqLabelByIds" parameterType="String"> | ||||
|         delete from sq_label where id in  | ||||
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | ||||
|             #{id} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|      | ||||
| </mapper> | ||||
| @@ -0,0 +1,86 @@ | ||||
| <?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.sq.mapper.SqMenuMapper"> | ||||
|      | ||||
|     <resultMap type="SqMenu" id="SqMenuResult"> | ||||
|         <result property="menuId"    column="menu_id"    /> | ||||
|         <result property="userId"    column="user_id"    /> | ||||
|         <result property="menuName"    column="menu_name"    /> | ||||
|         <result property="menuUrl"    column="menu_url"    /> | ||||
|         <result property="menuIcon"    column="menu_icon"    /> | ||||
|         <result property="parentId"    column="parent_id"    /> | ||||
|         <result property="menuOrder"    column="menu_order"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSqMenuVo"> | ||||
|         select menu_id, user_id, menu_name, menu_url, menu_icon, parent_id, menu_order, create_time from sq_menu | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSqMenuList" parameterType="SqMenu" resultMap="SqMenuResult"> | ||||
|         <include refid="selectSqMenuVo"/> | ||||
|         <where>   | ||||
|             <if test="userId != null "> and user_id = #{userId}</if> | ||||
|             <if test="menuName != null  and menuName != ''"> and menu_name like concat('%', #{menuName}, '%')</if> | ||||
|             <if test="menuUrl != null  and menuUrl != ''"> and menu_url = #{menuUrl}</if> | ||||
|             <if test="menuIcon != null  and menuIcon != ''"> and menu_icon = #{menuIcon}</if> | ||||
|             <if test="parentId != null "> and parent_id = #{parentId}</if> | ||||
|             <if test="menuOrder != null "> and menu_order = #{menuOrder}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|      | ||||
|     <select id="selectSqMenuById" parameterType="Long" resultMap="SqMenuResult"> | ||||
|         <include refid="selectSqMenuVo"/> | ||||
|         where menu_id = #{menuId} | ||||
|     </select> | ||||
|          | ||||
|     <insert id="insertSqMenu" parameterType="SqMenu" useGeneratedKeys="true" keyProperty="menuId"> | ||||
|         insert into sq_menu | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="userId != null">user_id,</if> | ||||
|             <if test="menuName != null">menu_name,</if> | ||||
|             <if test="menuUrl != null">menu_url,</if> | ||||
|             <if test="menuIcon != null">menu_icon,</if> | ||||
|             <if test="parentId != null">parent_id,</if> | ||||
|             <if test="menuOrder != null">menu_order,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|          </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="userId != null">#{userId},</if> | ||||
|             <if test="menuName != null">#{menuName},</if> | ||||
|             <if test="menuUrl != null">#{menuUrl},</if> | ||||
|             <if test="menuIcon != null">#{menuIcon},</if> | ||||
|             <if test="parentId != null">#{parentId},</if> | ||||
|             <if test="menuOrder != null">#{menuOrder},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|          </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSqMenu" parameterType="SqMenu"> | ||||
|         update sq_menu | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="userId != null">user_id = #{userId},</if> | ||||
|             <if test="menuName != null">menu_name = #{menuName},</if> | ||||
|             <if test="menuUrl != null">menu_url = #{menuUrl},</if> | ||||
|             <if test="menuIcon != null">menu_icon = #{menuIcon},</if> | ||||
|             <if test="parentId != null">parent_id = #{parentId},</if> | ||||
|             <if test="menuOrder != null">menu_order = #{menuOrder},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|         </trim> | ||||
|         where menu_id = #{menuId} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSqMenuById" parameterType="Long"> | ||||
|         delete from sq_menu where menu_id = #{menuId} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSqMenuByIds" parameterType="String"> | ||||
|         delete from sq_menu where menu_id in  | ||||
|         <foreach item="menuId" collection="array" open="(" separator="," close=")"> | ||||
|             #{menuId} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|      | ||||
| </mapper> | ||||
		Reference in New Issue
	
	Block a user