package com.iailab.module.data.dev.service.impl; import com.iailab.framework.common.service.impl.BaseServiceImpl; import com.iailab.module.data.dev.dao.AlarmCameraDao; import com.iailab.module.data.dev.dto.AlarmCameraDTO; import com.iailab.module.data.dev.entity.AlarmCameraEntity; import com.iailab.module.data.dev.enums.AlarmStatusEnum; import com.iailab.module.data.dev.service.AlarmCameraService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import java.util.*; /** * @author PanZhibao * @Description * @createTime 2024年03月09日 */ @Slf4j @Service public class AlarmCameraServiceImpl extends BaseServiceImpl implements AlarmCameraService { @Override public void updateStatus(Integer cameraCode, AlarmStatusEnum alarmStatusEnum) { AlarmCameraDTO alarmCamera = this.getByCameraCode(cameraCode); AlarmCameraEntity entity = new AlarmCameraEntity(); entity.setId(alarmCamera.getId()); entity.setAlarmStatus(alarmStatusEnum.getCode()); baseDao.updateById(entity); } @Override public List list(Map params) { List list = baseDao.getList(params); return list; } @Override public AlarmCameraDTO getByCameraCode(Integer cameraCode) { return baseDao.getByCameraCode(cameraCode); } }