提交 | 用户 | 时间
|
97d38f
|
1 |
package com.iailab.module.model.mcs.pre.service.impl; |
潘 |
2 |
|
5b952f
|
3 |
import com.baomidou.mybatisplus.core.metadata.IPage; |
b06c21
|
4 |
import com.iailab.framework.common.pojo.PageResult; |
潘 |
5 |
import com.iailab.framework.common.service.impl.BaseServiceImpl; |
|
6 |
import com.iailab.framework.common.util.object.BeanUtils; |
5b952f
|
7 |
import com.iailab.framework.security.core.util.SecurityFrameworkUtils; |
b06c21
|
8 |
import com.iailab.module.model.mcs.pre.dao.MmPredictAlarmConfigDao; |
潘 |
9 |
import com.iailab.module.model.mcs.pre.entity.MmPredictAlarmConfigEntity; |
97d38f
|
10 |
import com.iailab.module.model.mcs.pre.service.MmPredictAlarmConfigService; |
b06c21
|
11 |
import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigPageReqVO; |
5b952f
|
12 |
import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigRespVO; |
b06c21
|
13 |
import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmConfigSaveReqVO; |
潘 |
14 |
import org.springframework.stereotype.Service; |
|
15 |
|
|
16 |
import java.util.Date; |
|
17 |
import java.util.UUID; |
97d38f
|
18 |
|
潘 |
19 |
/** |
|
20 |
* @author PanZhibao |
|
21 |
* @Description |
|
22 |
* @createTime 2024年11月19日 |
|
23 |
*/ |
b06c21
|
24 |
@Service |
潘 |
25 |
public class MmPredictAlarmConfigServiceImpl extends BaseServiceImpl<MmPredictAlarmConfigDao, MmPredictAlarmConfigEntity> |
|
26 |
implements MmPredictAlarmConfigService { |
|
27 |
|
|
28 |
@Override |
5b952f
|
29 |
public PageResult<MmPredictAlarmConfigRespVO> page(MmPredictAlarmConfigPageReqVO reqVO) { |
L |
30 |
IPage<MmPredictAlarmConfigRespVO> page = baseDao.selectPage(reqVO); |
|
31 |
return new PageResult<>(page.getRecords(), page.getTotal()); |
b06c21
|
32 |
} |
潘 |
33 |
|
|
34 |
@Override |
|
35 |
public MmPredictAlarmConfigEntity getInfo(String id) { |
|
36 |
return baseDao.selectById(id); |
|
37 |
} |
|
38 |
|
|
39 |
@Override |
|
40 |
public void create(MmPredictAlarmConfigSaveReqVO reqVO) { |
|
41 |
MmPredictAlarmConfigEntity entity = BeanUtils.toBean(reqVO, MmPredictAlarmConfigEntity.class); |
|
42 |
entity.setId(UUID.randomUUID().toString()); |
5b952f
|
43 |
entity.setCreator(SecurityFrameworkUtils.getLoginUserNickname()); |
b06c21
|
44 |
entity.setCreateTime(new Date()); |
潘 |
45 |
baseDao.insert(entity); |
|
46 |
} |
|
47 |
|
|
48 |
@Override |
|
49 |
public void update(MmPredictAlarmConfigSaveReqVO reqVO) { |
|
50 |
MmPredictAlarmConfigEntity entity = BeanUtils.toBean(reqVO, MmPredictAlarmConfigEntity.class); |
5b952f
|
51 |
entity.setUpdater(SecurityFrameworkUtils.getLoginUserNickname()); |
L |
52 |
entity.setUpdateTime(new Date()); |
b06c21
|
53 |
baseDao.updateById(entity); |
潘 |
54 |
} |
|
55 |
|
|
56 |
@Override |
|
57 |
public void delete(String id) { |
|
58 |
baseDao.deleteById(id); |
|
59 |
} |
97d38f
|
60 |
} |