|
|
@@ -55,6 +55,8 @@
|
|
|
<result column="reservation_rules" property="reservationRules"/>
|
|
|
<result column="original_price" property="originalPrice"/>
|
|
|
<result column="order_str" property="orderStr"/>
|
|
|
+ <result column="expert_order_id" property="expertOrderId"/>
|
|
|
+ <result column="order_appraise" property="orderAppraise"/>
|
|
|
|
|
|
<collection property="orderCouponMiddleList" ofType="shop.alien.entity.store.vo.OrderCouponMiddleVo">
|
|
|
<id column="ocmId" property="id" />
|
|
|
@@ -79,13 +81,20 @@
|
|
|
0 effective_date_type,expiration_date effective_date_value,use_rule use_rules,reservation_rules,applicable_num,1 quota_type,buy_limit quota_value,single_qty
|
|
|
from life_coupon lc where lc.delete_flag = 0
|
|
|
)
|
|
|
- select luo.id,luo.order_no,luo.created_time , luo.price ,luo.final_price,luo.order_str,
|
|
|
- luo.pay_method,luo.buy_time,luo.cancel_time,luo.pay_time,luo.finish_time,luo.status order_status,luo.quan_id,luo.refund_time total_refund_time,
|
|
|
+ select luo.id,luo.order_no,luo.created_time , luo.price ,
|
|
|
+ CASE
|
|
|
+ WHEN luo.final_price IS NOT NULL AND luo.final_price != '' THEN
|
|
|
+ FORMAT(CAST(luo.final_price AS DECIMAL(10,2)), 2)
|
|
|
+ ELSE '0.00'
|
|
|
+ END as final_price,
|
|
|
+ luo.order_str,
|
|
|
+ luo.pay_method,luo.buy_time,luo.cancel_time,luo.pay_time,luo.finish_time,luo.status order_status,luo.quan_id,luo.refund_time total_refund_time,luo.expert_order_id,
|
|
|
tc.*,
|
|
|
ldc.nominal_value,ldc.type,
|
|
|
lu.user_phone,lu.user_name,lu.id user_id,
|
|
|
ocm.id ocmId,ocm.status,ocm.coupon_code,ocm.refund_time,ocm.refund_reason,ocm.price refundPrice,
|
|
|
si.id store_id,si.store_name,si.commission_rate,si.store_address,si.store_tel,si.business_status,si.collect_num,si.business_section store_type,si.store_status,
|
|
|
+ su.phone store_user_tel,
|
|
|
<if test="position != null and position != ''">
|
|
|
ROUND(
|
|
|
ST_Distance_Sphere(
|
|
|
@@ -106,6 +115,7 @@
|
|
|
left join life_user lu on lu.id = luo.user_id and lu.delete_flag = 0
|
|
|
left join store_img simg on simg.id = tc.image_id and simg.delete_flag = 0
|
|
|
left join store_business_info sbi on sbi.store_id = si.id and sbi.delete_flag = 0
|
|
|
+ left join store_user su on su.store_id = si.id and su.delete_flag = 0
|
|
|
where luo.id = #{orderId}
|
|
|
order by luo.created_time desc
|
|
|
</select>
|
|
|
@@ -132,13 +142,16 @@
|
|
|
from life_user_order luo
|
|
|
left join store_info si on si.id = luo.store_id and si.delete_flag = 0
|
|
|
left join order_coupon_middle ocm on ocm.order_id = luo.id and ocm.delete_flag = 0
|
|
|
- left join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type
|
|
|
+ inner join total_coupon tc on tc.coupon_id = ocm.coupon_id and tc.coupon_type = luo.coupon_type
|
|
|
left join life_discount_coupon_user ldcu on ldcu.id = luo.quan_id and ldcu.delete_flag = 0
|
|
|
left join life_discount_coupon ldc on ldc.id = ldcu.coupon_id and ldc.delete_flag = 0
|
|
|
left join life_user lu on lu.id = luo.user_id and lu.delete_flag = 0
|
|
|
left join store_img simg on simg.id = tc.image_id and simg.delete_flag = 0
|
|
|
left join store_business_info sbi on sbi.store_id = si.id and sbi.delete_flag = 0
|
|
|
- where luo.status = 1
|
|
|
+ <where>
|
|
|
+ <!-- 引用 LambdaQueryWrapper 构建的条件 -->
|
|
|
+ ${ew.sqlSegment}
|
|
|
+ </where>
|
|
|
order by luo.created_time desc
|
|
|
</select>
|
|
|
</mapper>
|