| | |
| | | and o.order_status = 1 |
| | | and o.verify_status = 1 |
| | | <if test="merchantId != null">and o.merchant_id = #{merchantId}</if> |
| | | <if test="merchantType != null and merchantType != ''">and m.merchant_type = #{merchantType}</if> |
| | | <if test="merchantType != null and merchantType != ''">and m.merchant_type_code = #{merchantType}</if> |
| | | <if test="startTime != null">and coalesce(v.verify_time, o.updated_at, o.created_at) >= #{startTime}</if> |
| | | <if test="endTime != null">and coalesce(v.verify_time, o.updated_at, o.created_at) < #{endTime}</if> |
| | | ) base |
| | |
| | | and o.order_status = 1 |
| | | and o.verify_status = 1 |
| | | <if test="merchantId != null">and o.merchant_id = #{merchantId}</if> |
| | | <if test="merchantType != null and merchantType != ''">and m.merchant_type = #{merchantType}</if> |
| | | <if test="merchantType != null and merchantType != ''">and m.merchant_type_code = #{merchantType}</if> |
| | | <if test="startTime != null">and coalesce(v.verify_time, o.updated_at, o.created_at) >= #{startTime}</if> |
| | | <if test="endTime != null">and coalesce(v.verify_time, o.updated_at, o.created_at) < #{endTime}</if> |
| | | group by period_key, o.merchant_id |
| | |
| | | and o.order_status = 1 |
| | | and o.verify_status = 1 |
| | | <if test="merchantId != null">and o.merchant_id = #{merchantId}</if> |
| | | <if test="merchantType != null and merchantType != ''">and m.merchant_type = #{merchantType}</if> |
| | | <if test="merchantType != null and merchantType != ''">and m.merchant_type_code = #{merchantType}</if> |
| | | <if test="startTime != null">and coalesce(v.verify_time, o.updated_at, o.created_at) >= #{startTime}</if> |
| | | <if test="endTime != null">and coalesce(v.verify_time, o.updated_at, o.created_at) < #{endTime}</if> |
| | | ) base |