left join (SELECT a.* FROM (select * FROM t_system_info where account_id = 0 order by id desc) a GROUP BY a.third_party_id) si on si.third_party_id = t.id and si.order_status = t.status and si.overtime_flag > 0
<where>
<iftest="id != null and id != ''">
and t.id = #{id}
and t.id like concat('%', #{id}, '%')
</if>
<iftest="outOrderId != null and outOrderId != ''">