此SQL 用到了mysql的时间戳,子查询,mysql运算
--------------------
SELECT
de_id,FROM_UNIXTIME(de_due_date)
FROM
`p2p_repayments_details`
WHERE de_due_date<(UNIX_TIMESTAMP()-
?? (SELECT (86400*
??? (SELECT cfd.cd_overdue_avi_day FROM p2p_customer_formula_set AS cfs
??? LEFT JOIN p2p_customer_formula_detail AS cfd ON cfs.m_sour_grade_id = cfd.cd_id
??? LEFT JOIN p2p_bidding AS b ON cfs.c_id=b.b_customer
??? WHERE b.b_customer=218 LIMIT 1)))
) AND de_status IN (1,2)