package com.iailab.module.device.service.impl;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.iailab.framework.common.service.impl.CrudServiceImpl;
|
import com.iailab.module.device.dao.DeviceAccountHistoryDao;
|
import com.iailab.module.device.dto.DeviceAccountHistoryDTO;
|
import com.iailab.module.device.entity.DeviceAccountHistoryEntity;
|
import com.iailab.module.device.service.DeviceAccountHistoryService;
|
import org.apache.commons.lang3.StringUtils;
|
import org.springframework.stereotype.Service;
|
|
import java.util.Map;
|
|
/**
|
* 设备台账历史表
|
*
|
* @author lirm ${email}
|
* @since 1.0.0 2024-05-27
|
*/
|
@Service
|
public class DeviceAccountHistoryServiceImpl extends CrudServiceImpl<DeviceAccountHistoryDao, DeviceAccountHistoryEntity, DeviceAccountHistoryDTO> implements DeviceAccountHistoryService {
|
|
@Override
|
public QueryWrapper<DeviceAccountHistoryEntity> getWrapper(Map<String, Object> params){
|
String deviceId = (String)params.get("deviceId");
|
|
QueryWrapper<DeviceAccountHistoryEntity> wrapper = new QueryWrapper<>();
|
wrapper.eq(StringUtils.isNotBlank(deviceId), "device_id", deviceId)
|
.orderByDesc("create_date");
|
return wrapper;
|
}
|
}
|