Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #短信重提 定时短信 接收状态或者未知重提
- select * from mt as a
- inner join message as b on a.message_id = b.id
- where a.customer_id = 1 and a.isDE = 0 and a.isp in (1,2,3)
- and b.plan_at >= curdate() and b.plan_at <= curdate()
- and b.id = 1 and a.ispayback = 0 and a.sms_source = 1
- and a.reply_response = 'MK:0001' and a.ispayback = 0
- [改成] SỬA THÀNH:
- select * from mt as a
- inner join message as b on a.message_id = b.id
- where a.customer_id = 1 and a.isDE = 0 and a.isp in (1,2,3)
- and b.plan_at >= curdate() and b.plan_at <= curdate()
- and b.id = 1 and a.ispayback = 0 and a.sms_source = 1
- and a.reply_response = 'MK:0001' and a.ispayback = 0
- union all
- select * from mt_nextoneday as a
- inner join message as b on a.message_id = b.id
- where a.customer_id = 1 and a.isDE = 0 and a.isp in (1,2,3)
- and b.plan_at >= curdate() and b.plan_at <= curdate()
- and b.id = 1 and a.ispayback = 0 and a.sms_source = 1
- and a.reply_response = 'MK:0001' and a.ispayback = 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement