#
Junjie
2025-11-28 12493116268785c43f534b3ab9bd45014b1229bb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package com.zy.asrs.mapper;
 
import com.zy.asrs.entity.DeviceDataLog;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
 
@Mapper
@Repository
public interface DeviceDataLogMapper extends BaseMapper<DeviceDataLog> {
 
    @Delete("delete from wcs_device_data_log where create_time < FROM_UNIXTIME(UNIX_TIMESTAMP() - (#{days} * 24 * 60 * 60)) limit 50000")
    int clearLog(@Param("days") int days);
 
    int insertBatch(@Param("list") List<DeviceDataLog> list);
 
}