|  |  | 
 |  |  | package com.zy.asrs.mapper; | 
 |  |  |  | 
 |  |  | import com.zy.asrs.entity.DeviceDataLog; | 
 |  |  | import com.baomidou.mybatisplus.mapper.BaseMapper; | 
 |  |  | import com.zy.asrs.entity.DeviceDataLog; | 
 |  |  | import org.apache.ibatis.annotations.Delete; | 
 |  |  | import org.apache.ibatis.annotations.Mapper; | 
 |  |  | import org.springframework.stereotype.Repository; | 
 |  |  | 
 |  |  | @Repository | 
 |  |  | public interface DeviceDataLogMapper extends BaseMapper<DeviceDataLog> { | 
 |  |  |  | 
 |  |  |     @Delete("delete from wcs_device_data_log where create_time < DATEADD(HOUR, -24, GETDATE())") | 
 |  |  |     @Delete("delete from wcs_device_data_log where create_time < FROM_UNIXTIME(UNIX_TIMESTAMP() - (24 * 60 * 60 * 5))") | 
 |  |  |     int clearLog(); | 
 |  |  |  | 
 |  |  | } |