标签删除接口新增
This commit is contained in:
parent
c25ffa9b2a
commit
9cc46aa702
@ -48,6 +48,15 @@ public class SqTagController extends BaseController
|
|||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除书签
|
||||||
|
*/
|
||||||
|
@GetMapping("/deleteTag/{id}")
|
||||||
|
public AjaxResult deleteTag(@PathVariable String id)
|
||||||
|
{
|
||||||
|
sqTagService.delteTagByid(id,getAuthUser().getUserId());
|
||||||
|
return AjaxResult.success("操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 模糊查书签TAG
|
* 模糊查书签TAG
|
||||||
|
@ -163,6 +163,9 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
/** 修改书签*/
|
||||||
|
|
||||||
|
/** 删除书签*/
|
||||||
|
|
||||||
/** 查询书签 */
|
/** 查询书签 */
|
||||||
listByUsers() {
|
listByUsers() {
|
||||||
|
@ -83,4 +83,11 @@ public interface SqTagMapper extends MyMapper<SqTag>
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
int updateBookmarkTagIdByTagId(@Param("tagId")Long tagId, @Param("toTagId")Long toTagId, @Param("userId")Long userId);
|
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);
|
||||||
}
|
}
|
||||||
|
@ -74,4 +74,11 @@ public interface ISqTagService
|
|||||||
* @date: 2021/10/29 17:54
|
* @date: 2021/10/29 17:54
|
||||||
*/
|
*/
|
||||||
int countByuserId(Long userId);
|
int countByuserId(Long userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: wanghao
|
||||||
|
* @Date: 2021/10/29 18:11
|
||||||
|
* @Description: 删除用户的标签
|
||||||
|
*/
|
||||||
|
int delteTagByid(String id, Long userId);
|
||||||
}
|
}
|
||||||
|
@ -140,5 +140,10 @@ public class SqTagServiceImpl implements ISqTagService
|
|||||||
return sqTagMapper.selectCount(sqTag);
|
return sqTagMapper.selectCount(sqTag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int delteTagByid(String id, Long userId) {
|
||||||
|
return sqTagMapper.delteTagByidAndUserId(Long.valueOf(id),userId);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
delete from sq_tag where id = #{id}
|
delete from sq_tag where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<delete id="delteTagByidAndUserId" parameterType="Long">
|
||||||
|
delete from sq_tag where id = #{id} and user_Id =#{userId}
|
||||||
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteSqTagByIds" parameterType="String">
|
<delete id="deleteSqTagByIds" parameterType="String">
|
||||||
delete from sq_tag where id in
|
delete from sq_tag where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user