| | |
| | | package com.iailab.module.model.mcs.pre.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.iailab.framework.common.pojo.PageResult; |
| | | import com.iailab.framework.common.service.impl.BaseServiceImpl; |
| | | import com.iailab.framework.common.util.object.BeanUtils; |
| | |
| | | import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmMessagePageReqVO; |
| | | import com.iailab.module.model.mcs.pre.vo.MmPredictAlarmMessageSaveReqVO; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | @Override |
| | | public MmPredictAlarmMessageEntity getLast(String alarmObj) { |
| | | QueryWrapper<MmPredictAlarmMessageEntity> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("alarm_obj", alarmObj) |
| | | .orderByDesc("alarm_time") |
| | | .last("limit 1"); |
| | | return baseDao.selectOne(queryWrapper); |
| | | } |
| | | |
| | | @Override |
| | | public void create(MmPredictAlarmMessageSaveReqVO reqVO) { |
| | | MmPredictAlarmMessageEntity entity = BeanUtils.toBean(reqVO, MmPredictAlarmMessageEntity.class); |
| | | entity.setId(UUID.randomUUID().toString()); |