FileDictServiceImpl.java
1.42 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
package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.model.FileDictDO;
import com.subsidy.mapper.FileDictMapper;
import com.subsidy.model.VodDictDO;
import com.subsidy.service.FileDictService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import com.subsidy.vo.vod.GetContendVodsVO;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 课件表 服务实现类
* </p>
*
* @author DengMin
* @since 2021-10-11
*/
@Service
public class FileDictServiceImpl extends ServiceImpl<FileDictMapper, FileDictDO> implements FileDictService {
public List<FileDictDO> getContendFiles(FileDictDO fileDictDO) {
return this.baseMapper.selectList(new QueryWrapper<FileDictDO>()
.lambda()
.eq(FileDictDO::getContentId,fileDictDO.getContentId())
.like(FileDictDO::getFileName,fileDictDO.getFileName()));
}
public String deleteFile(FileDictDO fileDictDO) {
this.baseMapper.deleteById(fileDictDO.getId());
return ConstantUtils.DELETE_SUCCESS;
}
public String addFile(FileDictDO fileDictDO) {
this.baseMapper.insert(fileDictDO);
return ConstantUtils.ADD_SUCCESS;
}
public String updateFile(FileDictDO fileDictDO) {
this.baseMapper.updateById(fileDictDO);
return ConstantUtils.SET_SUCCESS;
}
}