Commit 5c93c4a3 by jianan

【ydlife】-【客户管理】-查询出车险

parent 566053b8
...@@ -983,20 +983,20 @@ ...@@ -983,20 +983,20 @@
date_format(o.order_date, '%Y-%m-%d %H:%i:%s') as orderDate, date_format(o.order_date, '%Y-%m-%d %H:%i:%s') as orderDate,
date_format(o.effective_start_date, '%Y-%m-%d %H:%i:%s') as startDate, date_format(o.effective_start_date, '%Y-%m-%d %H:%i:%s') as startDate,
date_format(o.effective_end_date, '%Y-%m-%d %H:%i:%s') as endDate, date_format(o.effective_end_date, '%Y-%m-%d %H:%i:%s') as endDate,
f.referral_amount as referralAmount, /*f.referral_amount as referralAmount,*/
f.order_price as orderPrice, o.order_price as orderPrice,
o.plan_id as planId, o.plan_id as planId,
o.product_id as productId , o.product_id as productId ,
IF(o.effective_start_date <= NOW() and o.effective_end_date >= NOW(),'有效','无效') isValid, IF(o.effective_start_date <= NOW() and o.effective_end_date >= NOW(),'有效','无效') isValid,
a.name planName, a.name planName,
b.name productName, b.name productName
f.id as fortuneId FROM ag_po_order o
FROM ag_acl_customer_fortune f
INNER JOIN ag_po_order o ON f.order_id = o.id and o.status = 3 and o.order_price > 0 and o.insurer_id != 888 and o.policy_no is not null
inner JOIN ag_acl_policyholder p ON o.id = p.order_id and p.type = 2 inner JOIN ag_acl_policyholder p ON o.id = p.order_id and p.type = 2
left join ag_product_plan a on o.plan_id = a.id left join ag_product_plan a on o.plan_id = a.id
left join ag_product b on o.product_id = b.id left join ag_product b on o.product_id = b.id
WHERE p.customer_id = #{customerId,jdbcType=BIGINT} WHERE 1=1
and o.status = 3 and o.order_price > 0 and o.insurer_id != 888 and o.policy_no is not null
and p.customer_id = #{customerId,jdbcType=BIGINT}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment