记得上下班打卡 | git大法好,push需谨慎

Commit ba41e78d authored by 张国柄's avatar 张国柄

dm;

parent d1f8c215
...@@ -35,8 +35,8 @@ public class DMEntersProcessor extends DataMigrationProcessorService { ...@@ -35,8 +35,8 @@ public class DMEntersProcessor extends DataMigrationProcessorService {
// log.info("DM.flush.AdamEntersVo:{}", mongoTemplate.remove(Query.query(Criteria.where("_id").exists(true)), AdamEntersVo.class.getSimpleName()).getDeletedCount()); // log.info("DM.flush.AdamEntersVo:{}", mongoTemplate.remove(Query.query(Criteria.where("_id").exists(true)), AdamEntersVo.class.getSimpleName()).getDeletedCount());
} }
String sqlCount = "select count(1) from (\n" + String sqlCount = "select count(1) from (" +
" select row_number() over (partition by user_id,type,idcode,name order by updated_at desc) rn,e.* from enters e where e.is_certification = 'yes' and e.deleted_at is null and created_at" + (StringUtils.isBlank(incrDt) ? "<curdate()" : (">=curdate()-" + incrDt)) + "\n" + " select row_number() over (partition by user_id,type,idcode,name order by updated_at desc) rn,e.* from enters e where e.is_certification = 'yes' and e.deleted_at is null and created_at" + (StringUtils.isBlank(incrDt) ? "<curdate()" : (">=curdate()-" + incrDt)) +
" ) tk where tk.rn=1 "; " ) tk where tk.rn=1 ";
if (null != dg) { if (null != dg) {
sqlCount = sqlCount + " and id%" + dG + "=" + dg; sqlCount = sqlCount + " and id%" + dG + "=" + dg;
......
...@@ -37,8 +37,8 @@ public class DMThirdPartsProcessor extends DataMigrationProcessorService { ...@@ -37,8 +37,8 @@ public class DMThirdPartsProcessor extends DataMigrationProcessorService {
// log.info("DM.flush.AdamThirdPartInfoVo:{}", mongoTemplate.remove(Query.query(Criteria.where("_id").exists(true)), AdamThirdPartInfoVo.class.getSimpleName()).getDeletedCount()); // log.info("DM.flush.AdamThirdPartInfoVo:{}", mongoTemplate.remove(Query.query(Criteria.where("_id").exists(true)), AdamThirdPartInfoVo.class.getSimpleName()).getDeletedCount());
} }
String sqlCount = "select count(1) from (\n" + String sqlCount = "select count(1) from (" +
" select row_number() over (partition by uid,type order by created_at desc) rn,id,uid,open_id,avatar,nickname,type,created_at,updated_at from user_third_parts where `status`=1 and delete_tag in (0,1) and open_id<>'' and uid>0 and created_at" + (StringUtils.isBlank(incrDt) ? "<curdate()" : (">=curdate()-" + incrDt)) + "\n" + " select row_number() over (partition by uid,type order by created_at desc) rn,id,uid,open_id,avatar,nickname,type,created_at,updated_at from user_third_parts where `status`=1 and delete_tag in (0,1) and open_id<>'' and uid>0 and created_at" + (StringUtils.isBlank(incrDt) ? "<curdate()" : (">=curdate()-" + incrDt)) +
" ) t where t.rn=1"; " ) t where t.rn=1";
if (null != dg) { if (null != dg) {
sqlCount = sqlCount + " and id%" + dG + "=" + dg; sqlCount = sqlCount + " and id%" + dG + "=" + dg;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment