|
|
|
@ -81,7 +81,7 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
|
// 👇 恢复动态时间查询(原注释掉的硬编码时间已移除) |
|
|
|
String querySql = """ |
|
|
|
SELECT |
|
|
|
id, gtype, jwcode, free, core_jb, buy_jb, cz_time, cz_user, cz_bz, operation_platform, goods_name |
|
|
|
id, gtype, jwcode, free, core_jb, buy_jb, cz_time, cz_user, cz_bz, operation_platform, goods_name,uid |
|
|
|
FROM |
|
|
|
hwhcGold.dbo.user_gold_records |
|
|
|
WHERE cz_time >= ? |
|
|
|
@ -94,8 +94,8 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
|
INSERT IGNORE INTO user_gold_record |
|
|
|
(order_code, jwcode, sum_gold, permanent_gold, free_june, free_december, |
|
|
|
task_gold, pay_platform, goods_name, refund_type, refund_model, remark, type, admin_id, |
|
|
|
audit_status, create_time, flag, update_time, audit_time, is_refund, uid) |
|
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) |
|
|
|
audit_status, create_time, flag, update_time, audit_time, is_refund, uid,link_id) |
|
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) |
|
|
|
"""; |
|
|
|
|
|
|
|
while (hasMoreData) { |
|
|
|
@ -189,7 +189,7 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
|
// 👇 恢复动态时间查询(原注释掉的硬编码时间已移除) |
|
|
|
String querySql = """ |
|
|
|
SELECT |
|
|
|
id, gtype, jwcode, free, core_jb, buy_jb, cz_time, cz_user, cz_bz, operation_platform, goods_name |
|
|
|
id, gtype, jwcode, free, core_jb, buy_jb, cz_time, cz_user, cz_bz, operation_platform, goods_name, uid |
|
|
|
FROM |
|
|
|
hwhcGold.dbo.user_gold_records |
|
|
|
WHERE cz_time >= ? |
|
|
|
@ -202,8 +202,8 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
|
INSERT IGNORE INTO user_gold_record |
|
|
|
(order_code, jwcode, sum_gold, permanent_gold, free_june, free_december, |
|
|
|
task_gold, pay_platform, goods_name, refund_type, refund_model, remark, type, admin_id, |
|
|
|
audit_status, create_time, flag, update_time, audit_time, is_refund, uid) |
|
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) |
|
|
|
audit_status, create_time, flag, update_time, audit_time, is_refund, uid,link_id) |
|
|
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) |
|
|
|
"""; |
|
|
|
|
|
|
|
while (hasMoreData) { |
|
|
|
@ -284,6 +284,7 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
|
Timestamp cz_time; |
|
|
|
String cz_user, cz_bz, operation_platform, goods_name, uid; |
|
|
|
String orderNumber; // 预生成,避免重复计算 |
|
|
|
String linkId; |
|
|
|
} |
|
|
|
|
|
|
|
private RecordData extractRecordData(ResultSet rs) throws SQLException { |
|
|
|
@ -299,6 +300,7 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
|
data.operation_platform = rs.getString("operation_platform"); |
|
|
|
data.goods_name = rs.getString("goods_name"); |
|
|
|
data.uid = rs.getString("id"); |
|
|
|
data.linkId = rs.getString("link_id"); |
|
|
|
|
|
|
|
// 预生成订单号(避免在循环中重复生成) |
|
|
|
String timestampPart = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS")); |
|
|
|
@ -420,6 +422,7 @@ public class MysqlServiceImpl implements MysqlService { |
|
|
|
stmt.setTimestamp(18, now); |
|
|
|
stmt.setTimestamp(19, data.cz_time); |
|
|
|
stmt.setString(21, data.uid); |
|
|
|
stmt.setString(22, data.linkId); |
|
|
|
} |
|
|
|
|
|
|
|
private void updateUserBalance(Connection conn, RecordData data) throws Exception { |
|
|
|
|