IWeMaterialService.java
2.26 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package com.linkwechat.wecom.service;
import com.linkwechat.wecom.domain.WeMaterial;
import com.linkwechat.wecom.domain.dto.WeMediaDto;
import com.linkwechat.wecom.domain.vo.WeMaterialFileVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* 素材service
*
* @author KEWEN
* @date 2020-10-08
*/
public interface IWeMaterialService {
/**
* 上传素材信息
*
* @param file 文件
* @param type 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file)
* @return {@link WeMaterialFileVO}
*/
WeMaterialFileVO uploadWeMaterialFile(MultipartFile file, String type);
/**
* 添加素材信息
*
* @param WeMaterial 素材信息
* @return
*/
int insertWeMaterial(WeMaterial WeMaterial);
/**
* 删除素材信息
*
* @param id 主键id
* @return {@link int}
*/
int deleteWeMaterialById(Long id);
/**
* 批量删除
*
* @param ids id列表
* @return {@link int}
*/
int deleteWeMaterialByIds(Long[] ids);
/**
* 更新素材信息
*
* @param WeMaterial
* @return
*/
int updateWeMaterial(WeMaterial WeMaterial);
/**
* 查询素材详细信息
*
* @param id id
* @return {@link WeMaterial}
*/
WeMaterial findWeMaterialById(Long id);
/**
* 查询素材列表
*
* @param categoryId 类目id
* @param search 搜索值
* @return {@link WeMaterial}s
*/
List<WeMaterial> findWeMaterials(String categoryId, String search,String mediaType);
/**
* 更换分组
*
* @param categoryId 类目id
* @param materials 素材id
* @return int
*/
void resetCategory(String categoryId, String materials);
/**
* 上传企微临时素材
* @param url 素材路径
* @param type 素材类型
* @param name 素材名称
* @return
*/
public WeMediaDto uploadTemporaryMaterial(String url, String type,String name);
/**
* 上传素材图片
* @param file
* @return
*/
WeMediaDto uploadImg(MultipartFile file);
}