WeChatCollectionMapper.java
1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.linkwechat.wecom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WeChatCollection;
import com.linkwechat.wecom.domain.vo.WeChatSideVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 聊天工具 侧边栏栏 素材收藏
*
* @author kwen
*/
public interface WeChatCollectionMapper extends BaseMapper<WeChatCollection> {
/**
* 添加收藏
*
* @param chatCollection 收藏的素材信息
* @return 结果
*/
public int addCollection(WeChatCollection chatCollection);
/**
* 取消收藏
*
* @param materialId 素材id
* @param userId 用户id
* @return 结果
*/
public int dropCollection(@Param("materialId") Long materialId,@Param("userId") Long userId);
/**
* 通过素材id和用户id查询当前素材的收藏条数
*
* @param materialId 素材id
* @param userId 用户id
* @return 当前素材收藏的条数
*/
public int countCollectionByMaterialIdAndUserId(@Param("materialId") Long materialId,@Param("userId") Long userId);
/**
* 收藏列表
*
* @param userId 用户id
* @return {@link WeChatSideVo}s
*/
public List<WeChatSideVo> findCollections(Long userId);
}