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

Commit 627fd432 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev' into dev

parents 5a02a2a1 3bd901d5
......@@ -10,7 +10,7 @@ import java.net.UnknownHostException;
import java.util.Arrays;
public class GenSnowFlowerUtil {
private static final long twepoch = 961430400000L;
private static final long twepoch = 1624550400000L;
private static final long workerIdBits = 5L;
private static final long dataCenterIdBits = 5L;
//// 最大支持机器节点数0~31,一共32个
......
......@@ -28,7 +28,7 @@ public class DMAddressesProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.addresses:{}", userMapper.executeForDM("adam_addresses"));
log.info("DM.flush.AdamAddressesVo:{}", mongoTemplate.remove(Query.query(Criteria.where("_id").exists(true)), AdamAddressesVo.class.getSimpleName()).getDeletedCount());
......@@ -36,7 +36,7 @@ public class DMAddressesProcessor extends DataMigrationProcessorService {
String sqlCount = "select count(1) from addresses where created_at" + (StringUtils.isBlank(incrDt) ? "<" : ">=") + "curdate()";
if (null != dg) {
sqlCount = sqlCount + " and id%" + lS + "=" + dg;
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "id,user_id,user_name,user_phone,province,city,county,user_address,defaultDelivery,created_at";
// 1-id,2-user_id,3-user_name,4-user_phone,5-province,6-city,7-county,8-user_address,9-defaultDelivery,10-created_at
......@@ -47,10 +47,8 @@ public class DMAddressesProcessor extends DataMigrationProcessorService {
}
sql += " order by id limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/mall";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/mall";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_MALL, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
......@@ -28,7 +28,7 @@ public class DMCollectionProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.collection:{}", userMapper.executeForDM("adam_collection"));
......@@ -37,7 +37,7 @@ public class DMCollectionProcessor extends DataMigrationProcessorService {
String sqlCount = "select count(1) from user_collections where type='TICKET' and status=1 and content_id>=5722 and created_at"+(StringUtils.isBlank(incrDt) ? "<" : ">=")+"curdate()";
if (null != dg) {
sqlCount = sqlCount + " and id%" + lS + "=" + dg;
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "uid,content_id,`type`,`status`,created_at,updated_at";
// 1-uid,2-content_id,3-`type`,4-`status`,5-created_at,6-updated_at
......@@ -48,10 +48,8 @@ public class DMCollectionProcessor extends DataMigrationProcessorService {
}
sql += " order by id limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_PASSPORT, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
......@@ -28,7 +28,7 @@ public class DMEntersProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.enters:{}", userMapper.executeForDM("adam_enters"));
......@@ -37,7 +37,7 @@ public class DMEntersProcessor extends DataMigrationProcessorService {
String sqlCount = "select count(1) from enters where (type <> 1 or (type = 1 and is_certification = 'yes')) and created_at" + (StringUtils.isBlank(incrDt) ? "<" : ">=") + "curdate()";
if (null != dg) {
sqlCount = sqlCount + " and id%" + lS + "=" + dg;
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "id,user_id,type,`name`,mobile,idcode,if(is_default='no', 0, 1),created_at";
// 1-id,2-user_id,3-type,4-`name`,5-mobile,6-idcode,7-if(is_default='no', 0, 1),8-created_at
......@@ -48,10 +48,8 @@ public class DMEntersProcessor extends DataMigrationProcessorService {
}
sql += " order by id limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/mall";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/mall";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_MALL, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
......@@ -181,7 +181,7 @@ public class DMMemberCodeProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.member_code:{}", userMapper.executeForDM("adam_member_code"));
......@@ -190,7 +190,7 @@ public class DMMemberCodeProcessor extends DataMigrationProcessorService {
String sqlCount = "select count(1) from vip_card_codes where buy_order_id <> use_order_id or status=0";
if (null != dg) {
sqlCount = sqlCount + " and id%" + lS + "=" + dg;
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "vip_card_code,`type`+1,card_number,`status`,created_at,updated_at,buy_order_id,buy_uid,buy_time,use_order_id,use_uid,use_time";
// 1-vip_card_code,2-`type`+1,3-card_number,4-`status`,5-created_at,6-updated_at,
......@@ -198,10 +198,8 @@ public class DMMemberCodeProcessor extends DataMigrationProcessorService {
String sql = sqlCount.replace("count(1)", field);
sql += " order by id limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_PASSPORT, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
......@@ -52,7 +52,7 @@ public class DMMemberOrderProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.member_order:{}", userMapper.executeForDM("adam_member_order"));
......@@ -61,7 +61,7 @@ public class DMMemberOrderProcessor extends DataMigrationProcessorService {
String sqlCount = "select count(1) from user_vip_card_orders where status in (1,5) and created_at" + (StringUtils.isBlank(incrDt) ? "<" : ">=") + "curdate()";
if (null != dg) {
sqlCount = sqlCount + " and id%" + lS + "=" + dg;
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "order_code,uid,order_sub_type,vip_card_price,price,status,card_number,birthday,pay_type,pay_code,pay_at,created_at,updated_at,client_ip,source,version";
// 1-order_code,2-uid,3-order_sub_type,4-vip_card_price,5-price,6-status,7-card_number,8-birthday,
......@@ -73,10 +73,8 @@ public class DMMemberOrderProcessor extends DataMigrationProcessorService {
}
sql += " order by id limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_PASSPORT, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
......@@ -28,7 +28,7 @@ public class DMRealNameProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.real_name:{}", userMapper.executeForDM("adam_real_name"));
......@@ -37,7 +37,7 @@ public class DMRealNameProcessor extends DataMigrationProcessorService {
String sqlCount = "select count(1) from user_real_name where id not in (9145,7456,7448,7197,7194,4137,4138,4139,269,261,262,263,264,265,266,267,251) and created_at" + (StringUtils.isBlank(incrDt) ? "<" : ">=") + "curdate()";
if (null != dg) {
sqlCount = sqlCount + " and id%" + lS + "=" + dg;
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "id,uid,real_name,id_card,ifnull(created_at, '1970-01-01 00:00:00') created_at,updated_at";
// 1-id,2-uid,3-real_name,4-id_card,5-created_at,6-updated_at
......@@ -48,10 +48,8 @@ public class DMRealNameProcessor extends DataMigrationProcessorService {
}
sql += " order by id limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_PASSPORT, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
......@@ -28,7 +28,7 @@ public class DMThirdPartsProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.third_party:{}", userMapper.executeForDM("adam_third_party"));
......@@ -39,7 +39,7 @@ public class DMThirdPartsProcessor extends DataMigrationProcessorService {
" 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()\n" +
" ) t where t.rn=1";
if (null != dg) {
sqlCount = sqlCount + " and id%" + lS + "=" + dg;
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "uid,open_id,avatar,nickname,type,created_at,updated_at";
// 1-uid,2-open_id,3-avatar,4-nickname,5-type,6-created_at,7-updated_at
......@@ -50,10 +50,8 @@ public class DMThirdPartsProcessor extends DataMigrationProcessorService {
}
sql += " order by id limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_PASSPORT, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
......@@ -36,7 +36,7 @@ public class DMTracesInfoProcessor extends DataMigrationProcessorService {
AdamMemberPriceMapper memberPriceMapper;
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.member:{}", userMapper.executeForDM("adam_member"));
log.info("DM.flush.member_price:{}", userMapper.executeForDM("adam_member_price"));
......@@ -54,10 +54,8 @@ public class DMTracesInfoProcessor extends DataMigrationProcessorService {
String sql = "select id,`name`,sub_title,icon,avatar,min_card_number,if(`type`='VIP',1,0),interests_detail,notes,created_at,updated_at,is_notice,vip_notice,vip_notice_title,need_question,display_agreement,status,limitation from vip_cards";
// 1-id,2-`name`,3-sub_title,4-icon,5-avatar,6-min_card_number,7-`type`,8-interests_detail,9-notes,10-created_at,11-updated_at,12-is_notice,13-vip_notice,14-vip_notice_title,15-need_question,16-display_agreement,17-status,18-limitation
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_PASSPORT, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sql);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......@@ -103,7 +101,7 @@ public class DMTracesInfoProcessor extends DataMigrationProcessorService {
String sql = "select id,vip_card_id,status,name,price,days,detail,created_at,updated_at from vip_card_prices";
// 1-id,2-vip_card_id,3-status,4-name,5-price,6-days,7-detail,8-created_at,9-updated_at
Class.forName("com.mysql.cj.jdbc.Driver");
Class.forName(DB_DRIVER);
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
......
......@@ -46,7 +46,7 @@ public class DMUserInformationProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.user:{}", userMapper.executeForDM("adam_user"));
log.info("DM.flush.user_info:{}", userMapper.executeForDM("adam_user_info"));
......@@ -57,7 +57,7 @@ public class DMUserInformationProcessor extends DataMigrationProcessorService {
// String sqlCount = "select count(1) from users where delete_tag in (0,1) and length(mobile)=11 and created_at" + (StringUtils.isBlank(incrDt) ? "<" : ">=") + "curdate()";
String sqlCount = "select count(1) from users where delete_tag in (0,1) and created_at" + (StringUtils.isBlank(incrDt) ? "<" : ">=") + "curdate()";
if (null != dg) {
sqlCount = sqlCount + " and uid%" + lS + "=" + dg;
sqlCount = sqlCount + " and uid%" + dG + "=" + dg;
}
String field = "uid,mobile,username,sex,birthday,area,sign,face_url,back_url,created_at,updated_at,is_complete,rong_cloud_token,rong_cloud_tag";
// 1-uid,2-mobile,3-username,4-sex,5-birthday,6-area,7-sign,8-face_url,9-back_url,10-created_at,11-updated_at,12-is_complete,13-rong_cloud_token,14-rong_cloud_tag
......@@ -68,10 +68,8 @@ public class DMUserInformationProcessor extends DataMigrationProcessorService {
}
sql += " order by uid limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_PASSPORT, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
......@@ -28,7 +28,7 @@ public class DMUserMemberProcessor extends DataMigrationProcessorService {
@SneakyThrows
@Override
public void dataProcessing(Integer dg, Integer lS, String incrDt, String flg, String flu) {
public void dataProcessing(Integer dg, Integer dG, String incrDt, String flg, String flu) {
if (StringUtils.isNotEmpty(flu)) {
log.info("DM.flush.user_member:{}", userMapper.executeForDM("adam_user_member"));
......@@ -37,7 +37,7 @@ public class DMUserMemberProcessor extends DataMigrationProcessorService {
String sqlCount = "select count(1) from user_cards where created_at" + (StringUtils.isBlank(incrDt) ? "<" : ">=") + "curdate()";
if (null != dg) {
sqlCount = sqlCount + " and id%" + lS + "=" + dg;
sqlCount = sqlCount + " and id%" + dG + "=" + dg;
}
String field = "uid,card_id,card_number,`status`,expired_at,created_at,updated_at";
// 1-uid,2-card_id,3-card_number,4-status,5-expired_at,6-created_at,7-updated_at
......@@ -48,10 +48,8 @@ public class DMUserMemberProcessor extends DataMigrationProcessorService {
}
sql += " order by id limit ?,?";
Class.forName("com.mysql.cj.jdbc.Driver");
// String url = "jdbc:mysql://pc-2ze6z2hxkug559q79.mysql.polardb.rds.aliyuncs.com:3306/passport";
String url = "jdbc:mysql://zhengzai.mysql.polardb.rds.aliyuncs.com:3306/passport";
Connection connection = DriverManager.getConnection(url, "readonly", "ZWDsf8Fy");
Class.forName(DB_DRIVER);
Connection connection = DriverManager.getConnection(DB_URL + DB_NAME_PASSPORT, DB_USER, DB_PWD);
PreparedStatement statement = connection.prepareStatement(sqlCount);
ResultSetImpl row = (ResultSetImpl) statement.executeQuery();
......
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