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

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

fix:入场人数据迁移逻辑调整;

parent 8d8a8495
...@@ -35,7 +35,9 @@ public class DMEntersProcessor extends DataMigrationProcessorService { ...@@ -35,7 +35,9 @@ 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 enters where (type <> 1 or (type = 1 and is_certification = 'yes')) and created_at" + (StringUtils.isBlank(incrDt) ? "<" : ">=") + "curdate()"; String sqlCount = "select count(1) from (\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()\n" +
" ) tk where tk.rn=1 ";
if (null != dg) { if (null != dg) {
sqlCount = sqlCount + " and id%" + dG + "=" + dg; sqlCount = sqlCount + " and id%" + dG + "=" + dg;
} }
......
...@@ -105,9 +105,7 @@ public class DMThirdPartsProcessor extends DataMigrationProcessorService { ...@@ -105,9 +105,7 @@ public class DMThirdPartsProcessor extends DataMigrationProcessorService {
thirdPartyList.add(thirdParty); thirdPartyList.add(thirdParty);
vos.add(vo); vos.add(vo);
if (currentYear.isBefore(createdAt)) { dmRdmService.setUidByPlatformOpenId(thirdParty.getPlatform(), thirdParty.getOpenId(), uid);
dmRdmService.setUidByPlatformOpenId(thirdParty.getPlatform(), thirdParty.getOpenId(), uid);
}
} }
if (thirdPartyList.size() == 500 || (thirdPartyList.size() > 0 && smFlg)) { if (thirdPartyList.size() == 500 || (thirdPartyList.size() > 0 && smFlg)) {
tl += thirdPartyList.size(); tl += thirdPartyList.size();
......
...@@ -142,8 +142,7 @@ public class DMUserInformationProcessor extends DataMigrationProcessorService { ...@@ -142,8 +142,7 @@ public class DMUserInformationProcessor extends DataMigrationProcessorService {
userInfoList.add(userInfo); userInfoList.add(userInfo);
vos.add(vo); vos.add(vo);
if (StringUtils.length(mobile) == 11 && if (StringUtils.length(mobile) == 11) {
(currentYear.isBefore(createdAt) || currentYear.isBefore(updatedAt))) {
dmRdmService.setUidByMobile(mobile, uid); dmRdmService.setUidByMobile(mobile, uid);
} }
} }
......
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