ClassNoticeServiceImpl.java
1.34 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
package com.subsidy.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.subsidy.model.ClassNoticeDO;
import com.subsidy.mapper.ClassNoticeMapper;
import com.subsidy.service.ClassNoticeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.subsidy.util.ConstantUtils;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* <p>
* 服务实现类
* </p>
*
* @author DengMin
* @since 2022-01-21
*/
@Service
public class ClassNoticeServiceImpl extends ServiceImpl<ClassNoticeMapper, ClassNoticeDO> implements ClassNoticeService {
public String addNotice(ClassNoticeDO classNoticeDO) {
this.baseMapper.insert(classNoticeDO);
return ConstantUtils.ADD_SUCCESS;
}
public String updateNotice(ClassNoticeDO classNoticeDO) {
this.baseMapper.updateById(classNoticeDO);
return ConstantUtils.SET_SUCCESS;
}
public String deleteNotice(ClassNoticeDO classNoticeDO) {
this.baseMapper.deleteById(classNoticeDO.getId());
return ConstantUtils.DELETE_SUCCESS;
}
public List<ClassNoticeDO> queryClassNotices(ClassNoticeDO classNoticeDO){
return this.baseMapper.selectList(new QueryWrapper<ClassNoticeDO>()
.lambda()
.eq(ClassNoticeDO::getClassId,classNoticeDO.getClassId()));
}
}