REQ-2135: 更新batchSize
This commit is contained in:
parent
10eaebdd40
commit
556c7877c2
@ -71,12 +71,7 @@ public class MigrateFromPendingMessageJob extends IJobHandler {
|
||||
MigrateCount migrateCount = new MigrateCount();
|
||||
|
||||
List<Long> businessIds;
|
||||
QueryWrapper<Todo> todoQuery = new QueryWrapper<Todo>()
|
||||
.select("DISTINCT todo_business_id")
|
||||
.last("AND biz_code <> '' AND record_ext -> '$.isMigratedFromPendingMessage' = true");
|
||||
businessIds = todoDao.list(todoQuery).stream()
|
||||
.map(Todo::getTodoBusinessId)
|
||||
.collect(toList());
|
||||
businessIds = todoDao.getBaseMapper().getMigratedBusinessId();
|
||||
log.info("remove businessIds:{}", JSON.toJSONString(businessIds));
|
||||
|
||||
if (!businessIds.isEmpty()) {
|
||||
|
||||
@ -19,4 +19,6 @@ public interface TodoMapper extends BaseMapper<Todo> {
|
||||
@Param("personId") Long personId,
|
||||
@Param("isNowDay") boolean isNowDay);
|
||||
|
||||
List<Long> getMigratedBusinessId();
|
||||
|
||||
}
|
||||
|
||||
20
msg-center-dal/src/main/resources/mapper/Todo.xml
Normal file
20
msg-center-dal/src/main/resources/mapper/Todo.xml
Normal file
@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.axzo.msg.center.dal.mapper.TodoMapper">
|
||||
|
||||
<delete id="deleteByIds">
|
||||
delete from todo_business WHERE id in
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="getMigratedBusinessId" resultType="long">
|
||||
SELECT DISTINCT todo_business_id
|
||||
FROM todo
|
||||
WHERE biz_code != ''
|
||||
AND record_ext -> '$.isMigratedFromPendingMessage' = true
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user