publicstaticStringBLACK_LIST_NEW_QUERY_BY_UNIQUE_KEY_SQL="select * from black_list_new where phone_no = '%s' and name = '%s' and id_no = '%s' and type = '%s';";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_UNIQUE_KEY_SQL="select * from black_list_new where phone_no = '%s' and name = '%s' and id_no = '%s' and type = '%s';";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_UNIQUE_KEY_SQL2_MD5="select * from black_list_new where phone_no = '%s' and name = '%s' and id_no = '%s' and type = '%s' and phone_no_md5 = '%s' and id_no_md5 = '%s';";
publicstaticStringBLACK_LIST_NEW_UPDATE_DISABLE_BY_RECORD_ID_SQL="update black_list_new set status = false, updated_at = '%s' where id = %s;";
publicstaticStringBLACK_LIST_NEW_UPDATE_DISABLE_BY_RECORD_ID_SQL="update black_list_new set status = false, updated_at = '%s' where id = %s;";
publicstaticStringBLACK_LIST_NEW_UPDATE_THREE_ELE_AND_BLACK_LEVEL_SQL="update black_list_new set uuid = '%s', name = '%s', phone_no = '%s' , id_no = '%s', black_level = '%s' where id = %s;";
publicstaticStringBLACK_LIST_NEW_UPDATE_THREE_ELE_AND_BLACK_LEVEL_SQL="update black_list_new set uuid = '%s', name = '%s', phone_no = '%s' , id_no = '%s', black_level = '%s', phone_no_md5 = '%s', id_no_md5 = '%s' where id = %s;";
publicstaticStringBLACK_LIST_NEW_UPDATE_BLACK_LIST_LEVEL_SQL="update black_list_new set black_level = '%s' where id = %s;";
publicstaticStringBLACK_LIST_NEW_UPDATE_BLACK_LIST_LEVEL_SQL="update black_list_new set black_level = '%s' where id = %s;";
publicstaticStringBLACK_LIST_NEW_UPDATE_FIRST_OR_MAX_OVERDUE_DAYS_SQL="update black_list_new set total_overdue_days = ? , max_overdue_days = ?, updated_at = ? where id = ?";
publicstaticStringBLACK_LIST_NEW_UPDATE_FIRST_OR_MAX_OVERDUE_DAYS_SQL="update black_list_new set total_overdue_days = ? , max_overdue_days = ?, updated_at = ? where id = ?";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_PHONENO_SQL="select * from black_list_new where phone_no = '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_PHONENO_SQL="select * from black_list_new where phone_no = '%s' and status = true;";
...
@@ -25,6 +27,12 @@ public class Constant {
...
@@ -25,6 +27,12 @@ public class Constant {
publicstaticStringBLACK_LIST_NEW_QUERY_BY_THREE_ELE_SQL="select * from black_list_new where phone_no = '%s' and id_no = '%s' and name = '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_THREE_ELE_SQL="select * from black_list_new where phone_no = '%s' and id_no = '%s' and name = '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_IDNO_OR_PHONENO_SQL="select * from black_list_new where phone_no = '%s' or id_no = '%s'";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_IDNO_OR_PHONENO_SQL="select * from black_list_new where phone_no = '%s' or id_no = '%s'";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_UUID_SQL="select * from black_list_new where uuid = '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_UUID_SQL="select * from black_list_new where uuid = '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_PHONENOMD5_SQL="select * from black_list_new where phone_no_md5 = '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_IDNOMD5_SQL="select * from black_list_new where id_no_md5 = '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_PHONENOMD5_AND_IDNOMD5_SQL="select * from black_list_new where phone_no_md5 = '%s' and id_no_md5 = '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_PHONENOMD5_OR_IDNOMD5_SQL="select * from black_list_new where phone_no_md5 = '%s' or id_no_md5 = '%s';";
publicstaticStringXYQB_QUERY_USER_LOAN_OVERDUE_15DAY_SQL="select a.user_id id, now() created_at, now() updated_at, 1 major_type, 1 type, '逾期15+' join_black_reason, null total_overdue_days, null max_overdue_days, '1' status, 'A1' black_level from repayment_plan a left join loan_application_manifest_history d on a.loan_application_history_id=d.loan_application_history_id where a.deadline<=DATE_SUB(CURDATE(),INTERVAL 15 day) and a.deadline>DATE_SUB(CURDATE(),INTERVAL 20 day) and a.repayment_status not in (3,4) and d.transaction_status in (2,5);";
publicstaticStringXYQB_QUERY_USER_LOAN_OVERDUE_15DAY_SQL="select a.user_id id, now() created_at, now() updated_at, 1 major_type, 1 type, '逾期15+' join_black_reason, null total_overdue_days, null max_overdue_days, '1' status, 'A1' black_level from repayment_plan a left join loan_application_manifest_history d on a.loan_application_history_id=d.loan_application_history_id where a.deadline<=DATE_SUB(CURDATE(),INTERVAL 15 day) and a.deadline>DATE_SUB(CURDATE(),INTERVAL 20 day) and a.repayment_status not in (3,4) and d.transaction_status in (2,5);";
// public static String XYQB_QUERY_USER_FIRST_TERM_OVERDUE_SQL = "select if(repayment_status=3,DATEDIFF(repaid_at,deadline)+1,DATEDIFF(CURDATE(),deadline)+1) total_overdue_days from repayment_plan where user_id in (%s) and deadline<=CURDATE() and (repayment_status not in (3,4) or (repayment_status=3 and repaid_at>=deadline)) order by deadline desc limit 1;";
// public static String XYQB_QUERY_USER_FIRST_TERM_OVERDUE_SQL = "select if(repayment_status=3,DATEDIFF(repaid_at,deadline)+1,DATEDIFF(CURDATE(),deadline)+1) total_overdue_days from repayment_plan where user_id in (%s) and deadline<=CURDATE() and (repayment_status not in (3,4) or (repayment_status=3 and repaid_at>=deadline)) order by deadline desc limit 1;";
...
@@ -41,6 +49,8 @@ public class Constant {
...
@@ -41,6 +49,8 @@ public class Constant {
publicstaticStringBLACK_LIST_NEW_QUERY_BY_IDNO_SQL2="select * from black_list_new where id_no = '%s' and created_at < '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_IDNO_SQL2="select * from black_list_new where id_no = '%s' and created_at < '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_PHONENO_SQL2="select * from black_list_new where phone_no = '%s' and created_at < '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_QUERY_BY_PHONENO_SQL2="select * from black_list_new where phone_no = '%s' and created_at < '%s' and status = true;";
publicstaticStringBLACK_LIST_NEW_UPDATE_PHONENOMD5_AND_IDNOMD5_SQL="update black_list_new set `phone_no_md5`=? ,`id_no_md5`=? where `id`=? ";