|
|
@ -5,23 +5,23 @@ |
|
|
|
<!-- ${ew.customSqlSegment} --> |
|
|
|
<select id="selectPageVo" resultType="com.yxt.anrui.buscenter.api.bussalesorder.BusSalesOrderVo"> |
|
|
|
SELECT bo.sid, |
|
|
|
bo.nodeState, |
|
|
|
bo.billNo, |
|
|
|
DATE_FORMAT(bo.createDate, '%Y-%m-%d') as createDate, |
|
|
|
bo.customerName, |
|
|
|
bo.mobile, |
|
|
|
bm.brandName, |
|
|
|
bp.singleFinalPrice, |
|
|
|
bp.quantity, |
|
|
|
bo.payType, |
|
|
|
bd.depositAll, |
|
|
|
case bo.isInsurance |
|
|
|
when 0 then '否' |
|
|
|
when 1 then '是' end as isInsurance |
|
|
|
bo.nodeState, |
|
|
|
bo.billNo, |
|
|
|
DATE_FORMAT(bo.createDate, '%Y-%m-%d') as createDate, |
|
|
|
bo.customerName, |
|
|
|
bo.mobile, |
|
|
|
bm.brandName, |
|
|
|
bp.singleFinalPrice, |
|
|
|
bp.quantity, |
|
|
|
bo.payType, |
|
|
|
bd.depositAll, |
|
|
|
case bo.isInsurance |
|
|
|
when 0 then '否' |
|
|
|
when 1 then '是' end as isInsurance |
|
|
|
FROM bus_sales_order bo |
|
|
|
left join bus_sales_order_model bm on bm.salesOrderSid = bo.sid |
|
|
|
left join bus_sales_order_price bp on bp.salesOrderSid = bo.sid |
|
|
|
left join bus_sales_order_deposit bd on bd.salesOrderSid = bo.sid |
|
|
|
left join bus_sales_order_model bm on bm.salesOrderSid = bo.sid |
|
|
|
left join bus_sales_order_price bp on bp.salesOrderSid = bo.sid |
|
|
|
left join bus_sales_order_deposit bd on bd.salesOrderSid = bo.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -37,24 +37,24 @@ |
|
|
|
</update> |
|
|
|
<!--app查询销售订单列表--> |
|
|
|
<select id="getSaleOrders" resultType="com.yxt.anrui.buscenter.api.bussalesorder.AppBusSalesOrderVo"> |
|
|
|
SELECT bo.sid AS saleOrderSid, |
|
|
|
bo.billNo AS saleOrderId, |
|
|
|
bo.customerClass AS customerType, |
|
|
|
bo.customerSid, |
|
|
|
bo.customerName, |
|
|
|
bo.customerPhoto AS customerImage, |
|
|
|
bo.mobile, |
|
|
|
bo.payType AS carPurchaseType, |
|
|
|
bo.payTypeKey AS carPurchaseKey, |
|
|
|
bd.depositAll AS deposit, |
|
|
|
bo.nodeState AS saleOrderState, |
|
|
|
DATE_FORMAT(bo.createDate, '%Y-%m-%d') as createdDate, |
|
|
|
case bo.isInsurance |
|
|
|
when 0 then '否' |
|
|
|
when 1 then '是' end as insuranceInfo |
|
|
|
SELECT bo.sid AS saleOrderSid, |
|
|
|
bo.billNo AS saleOrderId, |
|
|
|
bo.customerClass AS customerType, |
|
|
|
bo.customerSid, |
|
|
|
bo.customerName, |
|
|
|
bo.customerPhoto AS customerImage, |
|
|
|
bo.mobile, |
|
|
|
bo.payType AS carPurchaseType, |
|
|
|
bo.payTypeKey AS carPurchaseKey, |
|
|
|
bd.depositAll AS deposit, |
|
|
|
bo.nodeState AS saleOrderState, |
|
|
|
DATE_FORMAT(bo.createDate, '%Y-%m-%d') as createdDate, |
|
|
|
case bo.isInsurance |
|
|
|
when 0 then '否' |
|
|
|
when 1 then '是' end as insuranceInfo |
|
|
|
FROM bus_sales_order bo |
|
|
|
left join bus_sales_order_price bp on bp.salesOrderSid = bo.sid |
|
|
|
left join bus_sales_order_deposit bd on bd.salesOrderSid = bo.sid |
|
|
|
left join bus_sales_order_price bp on bp.salesOrderSid = bo.sid |
|
|
|
left join bus_sales_order_deposit bd on bd.salesOrderSid = bo.sid |
|
|
|
<where> |
|
|
|
${ew.sqlSegment} |
|
|
|
</where> |
|
|
@ -81,4 +81,10 @@ |
|
|
|
FROM bus_sales_order bo |
|
|
|
WHERE bo.sid = #{saleOrderSid} |
|
|
|
</select> |
|
|
|
<!--根据销售订单sid更新销售订单的状态--> |
|
|
|
<update id="updateStateByBusinessSid"> |
|
|
|
update bus_sales_order |
|
|
|
set state = #{state} |
|
|
|
where sid = #{businessSid} |
|
|
|
</update> |
|
|
|
</mapper> |