經過存儲過程造退款明細數據
create procedure create_refund_log_data()
begin
declare i int;
SET i = 0;
WHILE i < 100000 DO
INSERT refund_logs (
log_id,
order_id,
access_id,
refund_amount,
account_id,
status,
refund_time,
version,
fail_reason,
handle_end_time
)
SELECT
i,
i,
access_id,
refund_amount,
account_id,
status,
refund_time,
10,
'測試數據',
handle_end_time
FROM
refund_logs where log_id='6FB41E4E2B86412DAA63094A103F5553';
set i=i+1;
end while;
end;測試