导入浏览器书签

This commit is contained in:
WangHao
2021-02-13 20:00:25 +08:00
parent 87b4e38462
commit 38e4f2aa04
12 changed files with 294 additions and 30 deletions

View File

@ -171,4 +171,14 @@ public class SqMenu
.append("updateTime", getUpdateTime())
.toString();
}
public SqMenu(){
super();
}
public SqMenu( Long userId, String menuName, Long parentId,String menuIcon) {
this.userId = userId;
this.menuName = menuName;
this.parentId = parentId;
this.menuIcon = menuIcon;
}
}

View File

@ -91,4 +91,13 @@ public interface SqMenuMapper extends MyMapper<SqMenu>
public int updateCountAdd(@Param("menuIds")Long[] menuIds,@Param("icount")int icount);
/**
*添加书签目录
*
* @param userID
* @param title
* @param parentId
* @return
*/
public void addMenu(@Param("userId")Long userID, @Param("title")String title, @Param("parentId")Long parentId);
}

View File

@ -104,4 +104,13 @@ public interface ISqMenuService
* @return 结果
*/
public int deleteSqMenuById(Long menuId,Long userId);
/**
* 添加书签目录
*
* @param
* @return
*/
public void addMenu(Long userID, String title, Long valueOf);
}

View File

@ -158,6 +158,12 @@ public class SqMenuServiceImpl implements ISqMenuService
return sqMenuMapper.deleteSqMenuById(menuId,userId);
}
@Override
public void addMenu(Long userID, String title, Long parentId) {
sqMenuMapper.addMenu(userID,title,parentId);
}
/**
* 批量减少目录下书签数量
*

View File

@ -40,7 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where menu_id = #{menuId}
</select>
<insert id="insertSqMenu" parameterType="SqMenu" useGeneratedKeys="true" keyProperty="menuId">
<insert id="insertSqMenu" parameterType="SqMenu" useGeneratedKeys="true" keyProperty="menuId" >
insert into sq_menu
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
@ -105,4 +105,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
</mapper>