diff --git a/src/main/resources/mybatis/mapper/signal/PhonesMapMapper.xml b/src/main/resources/mybatis/mapper/signal/PhonesMapMapper.xml index 6b245bd..9553dcf 100644 --- a/src/main/resources/mybatis/mapper/signal/PhonesMapMapper.xml +++ b/src/main/resources/mybatis/mapper/signal/PhonesMapMapper.xml @@ -120,7 +120,8 @@ select id, fid, phone from signals_phones_map where fid is not null - and (calculated_at is not null and calculated_at < searched_at) + and calculated_at is not null + and calculated_at < (current_date - make_interval(days => #{interval})) and id > #{lastId} order by id limit #{batchSize}