标签删除接口新增

This commit is contained in:
WangHao 2021-10-29 18:22:06 +08:00
parent c25ffa9b2a
commit 9cc46aa702
6 changed files with 35 additions and 0 deletions

View File

@ -48,6 +48,15 @@ public class SqTagController extends BaseController
return getDataTable(list);
}
/**
* 删除书签
*/
@GetMapping("/deleteTag/{id}")
public AjaxResult deleteTag(@PathVariable String id)
{
sqTagService.delteTagByid(id,getAuthUser().getUserId());
return AjaxResult.success("操作成功");
}
/**
* 模糊查书签TAG

View File

@ -163,6 +163,9 @@
});
},
/** 修改书签*/
/** 删除书签*/
/** 查询书签 */
listByUsers() {

View File

@ -83,4 +83,11 @@ public interface SqTagMapper extends MyMapper<SqTag>
* @return 结果
*/
int updateBookmarkTagIdByTagId(@Param("tagId")Long tagId, @Param("toTagId")Long toTagId, @Param("userId")Long userId);
/**
* @auther: Wang
* @date: 2021/10/29 18:13
* 功能描述:刪除标签
*/
int delteTagByidAndUserId(@Param("id")Long id, @Param("userId")Long userId);
}

View File

@ -74,4 +74,11 @@ public interface ISqTagService
* @date: 2021/10/29 17:54
*/
int countByuserId(Long userId);
/**
* @author: wanghao
* @Date: 2021/10/29 18:11
* @Description: 删除用户的标签
*/
int delteTagByid(String id, Long userId);
}

View File

@ -140,5 +140,10 @@ public class SqTagServiceImpl implements ISqTagService
return sqTagMapper.selectCount(sqTag);
}
@Override
public int delteTagByid(String id, Long userId) {
return sqTagMapper.delteTagByidAndUserId(Long.valueOf(id),userId);
}
}

View File

@ -87,6 +87,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from sq_tag where id = #{id}
</delete>
<delete id="delteTagByidAndUserId" parameterType="Long">
delete from sq_tag where id = #{id} and user_Id =#{userId}
</delete>
<delete id="deleteSqTagByIds" parameterType="String">
delete from sq_tag where id in
<foreach item="id" collection="array" open="(" separator="," close=")">