diff --git a/bot/bot/bot_wxSend.php b/bot/bot/bot_wxSend.php index 4054a72..13bdf87 100644 --- a/bot/bot/bot_wxSend.php +++ b/bot/bot/bot_wxSend.php @@ -20,9 +20,10 @@ function WxSend($order_id) function WxSendFunc() { $db = Db::get(); - $pay_check = $db->getRow("select * from orders where status = ? + $pay_check = $db->getRow("select * from orders where wx_day1_sendmsg_status = 0 + and status = ? and appointment_number is not null - and wx_day1_sendmsg_status = 0 + and wx_day1_sendmsg_time is not null and wx_day1_sendmsg_time <= ? order by wx_day1_sendmsg_time asc", [ 2, date('Y-m-d H:i:s')