提交 | 用户 | 时间
|
ce910c
|
1 |
package com.iailab.module.data.dev.service.impl; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.service.impl.BaseServiceImpl; |
|
4 |
import com.iailab.module.data.dev.dao.AlarmCameraDao; |
|
5 |
import com.iailab.module.data.dev.dto.AlarmCameraDTO; |
|
6 |
import com.iailab.module.data.dev.entity.AlarmCameraEntity; |
|
7 |
import com.iailab.module.data.dev.enums.AlarmStatusEnum; |
|
8 |
import com.iailab.module.data.dev.service.AlarmCameraService; |
|
9 |
import lombok.extern.slf4j.Slf4j; |
|
10 |
import org.springframework.stereotype.Service; |
|
11 |
|
|
12 |
import java.util.*; |
|
13 |
|
|
14 |
/** |
|
15 |
* @author PanZhibao |
|
16 |
* @Description |
|
17 |
* @createTime 2024年03月09日 |
|
18 |
*/ |
|
19 |
@Slf4j |
|
20 |
@Service |
|
21 |
public class AlarmCameraServiceImpl extends BaseServiceImpl<AlarmCameraDao, AlarmCameraEntity> implements AlarmCameraService { |
|
22 |
|
|
23 |
|
|
24 |
@Override |
|
25 |
public void updateStatus(Integer cameraCode, AlarmStatusEnum alarmStatusEnum) { |
|
26 |
AlarmCameraDTO alarmCamera = this.getByCameraCode(cameraCode); |
|
27 |
AlarmCameraEntity entity = new AlarmCameraEntity(); |
|
28 |
entity.setId(alarmCamera.getId()); |
|
29 |
entity.setAlarmStatus(alarmStatusEnum.getCode()); |
|
30 |
baseDao.updateById(entity); |
|
31 |
|
|
32 |
} |
|
33 |
|
|
34 |
@Override |
|
35 |
public List<AlarmCameraDTO> list(Map<String, Object> params) { |
|
36 |
List<AlarmCameraDTO> list = baseDao.getList(params); |
|
37 |
return list; |
|
38 |
} |
|
39 |
|
|
40 |
@Override |
|
41 |
public AlarmCameraDTO getByCameraCode(Integer cameraCode) { |
|
42 |
return baseDao.getByCameraCode(cameraCode); |
|
43 |
} |
|
44 |
} |