修改书签菜单Icon图标大小为21px,新增查询用户菜单接口,查询单个标签信息接口
This commit is contained in:
@ -1,94 +1,129 @@
|
||||
package com.ruoyi.bookmark.domain;
|
||||
|
||||
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.TreeEntity;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Transient;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 书签菜单对象 sq_menu
|
||||
*
|
||||
*
|
||||
* @author wanghao
|
||||
* @date 2020-08-06
|
||||
*/
|
||||
public class SqMenu extends TreeEntity
|
||||
public class SqMenu
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 书签菜单ID */
|
||||
@Column(name = "menu_id")
|
||||
private Long menuId;
|
||||
|
||||
/** 归属用户ID */
|
||||
@Excel(name = "归属用户ID")
|
||||
@Column(name = "user_id")
|
||||
private Long userId;
|
||||
|
||||
/** 分类名称 */
|
||||
@Excel(name = "分类名称")
|
||||
@Column(name = "menu_name")
|
||||
private String menuName;
|
||||
|
||||
/** 菜单url */
|
||||
@Excel(name = "菜单url")
|
||||
@Column(name = "menu_url")
|
||||
private String menuUrl;
|
||||
|
||||
/** 菜单图标 */
|
||||
@Excel(name = "菜单图标")
|
||||
@Column(name = "menu_order")
|
||||
private String menuIcon;
|
||||
|
||||
/** 菜单顺序 */
|
||||
@Excel(name = "菜单顺序")
|
||||
@Column(name = "menu_order")
|
||||
private Integer menuOrder;
|
||||
|
||||
public void setMenuId(Long menuId)
|
||||
@Column(name = "parent_id")
|
||||
private Long parentId;
|
||||
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Column(name = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public void setMenuId(Long menuId)
|
||||
{
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public Long getMenuId()
|
||||
public Long getMenuId()
|
||||
{
|
||||
return menuId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setMenuName(String menuName)
|
||||
public void setMenuName(String menuName)
|
||||
{
|
||||
this.menuName = menuName;
|
||||
}
|
||||
|
||||
public String getMenuName()
|
||||
public String getMenuName()
|
||||
{
|
||||
return menuName;
|
||||
}
|
||||
public void setMenuUrl(String menuUrl)
|
||||
public void setMenuUrl(String menuUrl)
|
||||
{
|
||||
this.menuUrl = menuUrl;
|
||||
}
|
||||
|
||||
public String getMenuUrl()
|
||||
public String getMenuUrl()
|
||||
{
|
||||
return menuUrl;
|
||||
}
|
||||
public void setMenuIcon(String menuIcon)
|
||||
public void setMenuIcon(String menuIcon)
|
||||
{
|
||||
this.menuIcon = menuIcon;
|
||||
}
|
||||
|
||||
public String getMenuIcon()
|
||||
public String getMenuIcon()
|
||||
{
|
||||
return menuIcon;
|
||||
}
|
||||
public void setMenuOrder(Integer menuOrder)
|
||||
public void setMenuOrder(Integer menuOrder)
|
||||
{
|
||||
this.menuOrder = menuOrder;
|
||||
}
|
||||
|
||||
public Integer getMenuOrder()
|
||||
public Integer getMenuOrder()
|
||||
{
|
||||
return menuOrder;
|
||||
}
|
||||
|
@ -2,18 +2,30 @@ package com.ruoyi.bookmark.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bookmark.domain.SqMenu;
|
||||
import com.ruoyi.common.mybatisMapper.MyMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 书签菜单Mapper接口
|
||||
*
|
||||
*
|
||||
* @author wanghao
|
||||
* @date 2020-08-06
|
||||
*/
|
||||
public interface SqMenuMapper
|
||||
public interface SqMenuMapper extends MyMapper<SqMenu>
|
||||
{
|
||||
|
||||
/**
|
||||
* @auther: Wang
|
||||
* @date: 2020/08/16 20:04
|
||||
* 功能描述:查询用户的 所有书签菜单
|
||||
*/
|
||||
|
||||
public List<SqMenu> selecByUserID(Long id);
|
||||
|
||||
/**
|
||||
* 查询书签菜单
|
||||
*
|
||||
*
|
||||
* @param menuId 书签菜单ID
|
||||
* @return 书签菜单
|
||||
*/
|
||||
@ -21,7 +33,7 @@ public interface SqMenuMapper
|
||||
|
||||
/**
|
||||
* 查询书签菜单列表
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 书签菜单集合
|
||||
*/
|
||||
@ -29,7 +41,7 @@ public interface SqMenuMapper
|
||||
|
||||
/**
|
||||
* 新增书签菜单
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 结果
|
||||
*/
|
||||
@ -37,7 +49,7 @@ public interface SqMenuMapper
|
||||
|
||||
/**
|
||||
* 修改书签菜单
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 结果
|
||||
*/
|
||||
@ -45,7 +57,7 @@ public interface SqMenuMapper
|
||||
|
||||
/**
|
||||
* 删除书签菜单
|
||||
*
|
||||
*
|
||||
* @param menuId 书签菜单ID
|
||||
* @return 结果
|
||||
*/
|
||||
@ -53,9 +65,11 @@ public interface SqMenuMapper
|
||||
|
||||
/**
|
||||
* 批量删除书签菜单
|
||||
*
|
||||
*
|
||||
* @param menuIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSqMenuByIds(Long[] menuIds);
|
||||
|
||||
|
||||
}
|
||||
|
@ -5,15 +5,23 @@ import com.ruoyi.bookmark.domain.SqMenu;
|
||||
|
||||
/**
|
||||
* 书签菜单Service接口
|
||||
*
|
||||
*
|
||||
* @author wanghao
|
||||
* @date 2020-08-06
|
||||
*/
|
||||
public interface ISqMenuService
|
||||
public interface ISqMenuService
|
||||
{
|
||||
/**
|
||||
* @auther: Wang
|
||||
* @date: 2020/08/16 20:04
|
||||
* 功能描述:查询用户的 所有书签菜单
|
||||
*/
|
||||
public List<SqMenu> selecByUserID(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询书签菜单
|
||||
*
|
||||
*
|
||||
* @param menuId 书签菜单ID
|
||||
* @return 书签菜单
|
||||
*/
|
||||
@ -21,7 +29,7 @@ public interface ISqMenuService
|
||||
|
||||
/**
|
||||
* 查询书签菜单列表
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 书签菜单集合
|
||||
*/
|
||||
@ -29,7 +37,7 @@ public interface ISqMenuService
|
||||
|
||||
/**
|
||||
* 新增书签菜单
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 结果
|
||||
*/
|
||||
@ -37,7 +45,7 @@ public interface ISqMenuService
|
||||
|
||||
/**
|
||||
* 修改书签菜单
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 结果
|
||||
*/
|
||||
@ -45,7 +53,7 @@ public interface ISqMenuService
|
||||
|
||||
/**
|
||||
* 批量删除书签菜单
|
||||
*
|
||||
*
|
||||
* @param menuIds 需要删除的书签菜单ID
|
||||
* @return 结果
|
||||
*/
|
||||
@ -53,7 +61,7 @@ public interface ISqMenuService
|
||||
|
||||
/**
|
||||
* 删除书签菜单信息
|
||||
*
|
||||
*
|
||||
* @param menuId 书签菜单ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -10,19 +10,32 @@ import com.ruoyi.bookmark.service.ISqMenuService;
|
||||
|
||||
/**
|
||||
* 书签菜单Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author wanghao
|
||||
* @date 2020-08-06
|
||||
*/
|
||||
@Service
|
||||
public class SqMenuServiceImpl implements ISqMenuService
|
||||
public class SqMenuServiceImpl implements ISqMenuService
|
||||
{
|
||||
@Autowired
|
||||
private SqMenuMapper sqMenuMapper;
|
||||
|
||||
/**
|
||||
* @auther: Wang
|
||||
* @date: 2020/08/16 20:04
|
||||
* 功能描述:查询用户的 所有书签菜单
|
||||
*/
|
||||
@Override
|
||||
public List<SqMenu> selecByUserID(Long id) {
|
||||
SqMenu sqMenu=new SqMenu();
|
||||
sqMenu.setUserId(id);
|
||||
|
||||
return sqMenuMapper.selectSqMenuList(sqMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询书签菜单
|
||||
*
|
||||
*
|
||||
* @param menuId 书签菜单ID
|
||||
* @return 书签菜单
|
||||
*/
|
||||
@ -34,7 +47,7 @@ public class SqMenuServiceImpl implements ISqMenuService
|
||||
|
||||
/**
|
||||
* 查询书签菜单列表
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 书签菜单
|
||||
*/
|
||||
@ -46,7 +59,7 @@ public class SqMenuServiceImpl implements ISqMenuService
|
||||
|
||||
/**
|
||||
* 新增书签菜单
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 结果
|
||||
*/
|
||||
@ -59,7 +72,7 @@ public class SqMenuServiceImpl implements ISqMenuService
|
||||
|
||||
/**
|
||||
* 修改书签菜单
|
||||
*
|
||||
*
|
||||
* @param sqMenu 书签菜单
|
||||
* @return 结果
|
||||
*/
|
||||
@ -71,7 +84,7 @@ public class SqMenuServiceImpl implements ISqMenuService
|
||||
|
||||
/**
|
||||
* 批量删除书签菜单
|
||||
*
|
||||
*
|
||||
* @param menuIds 需要删除的书签菜单ID
|
||||
* @return 结果
|
||||
*/
|
||||
@ -83,7 +96,7 @@ public class SqMenuServiceImpl implements ISqMenuService
|
||||
|
||||
/**
|
||||
* 删除书签菜单信息
|
||||
*
|
||||
*
|
||||
* @param menuId 书签菜单ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.bookmark.mapper.SqMenuMapper">
|
||||
|
||||
|
||||
<resultMap type="SqMenu" id="SqMenuResult">
|
||||
<result property="menuId" column="menu_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
@ -21,7 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectSqMenuList" parameterType="SqMenu" resultMap="SqMenuResult">
|
||||
<include refid="selectSqMenuVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="menuId != null "> and menu_id = #{menuId}</if>
|
||||
<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>
|
||||
@ -30,12 +31,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<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=",">
|
||||
@ -77,10 +78,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSqMenuByIds" parameterType="String">
|
||||
delete from sq_menu where menu_id in
|
||||
delete from sq_menu where menu_id in
|
||||
<foreach item="menuId" collection="array" open="(" separator="," close=")">
|
||||
#{menuId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user