You've already forked FrameTour-BE
1
This commit is contained in:
@ -288,6 +288,78 @@
|
||||
</where>
|
||||
order by o.create_at desc
|
||||
</select>
|
||||
<select id="listDetail" resultMap="PCBaseResultMap">
|
||||
select distinct o.id, o.scenic_id, s.name as scenic_name, o.member_id,m.nickname ,m.real_name, o.type, o.openid, o.face_id, f.face_url, o.price, pay_price, remark, o.broker_id, o.promo_code,
|
||||
refund_reason, refund_status, o.`status`, refund_at, pay_at, cancel_at,oi.id oiId, oi.goods_id, o.create_at
|
||||
from `order` AS o
|
||||
left join face f on o.face_id = f.id
|
||||
left join member m on o.member_id = m.id
|
||||
left join scenic s on o.scenic_id = s.id
|
||||
left join order_item oi on o.id = oi.order_id
|
||||
<where>
|
||||
<if test="id!= null ">
|
||||
and o.id = #{id}
|
||||
</if>
|
||||
<if test="scenicId != null">
|
||||
and o.scenic_id = #{scenicId}
|
||||
</if>
|
||||
<if test="memberNickname!= null and memberNickname!=''">
|
||||
and m.nickname like concat('%',#{memberNickname},'%')
|
||||
</if>
|
||||
<if test="memberRealName!= null and memberRealName!=''">
|
||||
and m.real_name like concat('%',#{memberRealName},'%')
|
||||
</if>
|
||||
<if test="price!= null ">
|
||||
and o.price = #{price}
|
||||
</if>
|
||||
<if test="payPrice!= null ">
|
||||
and pay_price = #{payPrice}
|
||||
</if>
|
||||
<if test="remark!= null and remark!= ''">
|
||||
and remark like concat('%',#{remark},'%')
|
||||
</if>
|
||||
<if test="brokerId!= null ">
|
||||
and o.broker_id = #{brokerId}
|
||||
</if>
|
||||
<if test="promoCode!= null and promoCode!= ''">
|
||||
and o.promo_code like concat('%',#{promoCode},'%')
|
||||
</if>
|
||||
<if test="refundReason!= null and refundReason!= ''">
|
||||
and refund_reason like concat('%',#{refundReason},'%')
|
||||
</if>
|
||||
<if test="refundStatus!= null ">
|
||||
and refund_status = #{refundStatus}
|
||||
</if>
|
||||
<if test="status!= null ">
|
||||
and o.`status` = #{status}
|
||||
</if>
|
||||
<if test="startCreateTime!= null ">
|
||||
and o.create_at >= #{startCreateTime}
|
||||
</if>
|
||||
<if test="endCreateTime!= null ">
|
||||
and o.create_at <= #{endCreateTime}
|
||||
</if>
|
||||
<if test="startPayTime!= null ">
|
||||
and pay_at >= #{startPayTime}
|
||||
</if>
|
||||
<if test="endPayTime!= null ">
|
||||
and pay_at <= #{endPayTime}
|
||||
</if>
|
||||
<if test="startRefundTime!= null ">
|
||||
and refund_at >= #{startRefundTime}
|
||||
</if>
|
||||
<if test="endRefundTime!= null ">
|
||||
and refund_at <= #{endRefundTime}
|
||||
</if>
|
||||
<if test="startCancelTime!= null ">
|
||||
and cancel_at >= #{startCancelTime}
|
||||
</if>
|
||||
<if test="endCancelTime!= null ">
|
||||
and cancel_at <= #{endCancelTime}
|
||||
</if>
|
||||
</where>
|
||||
order by o.create_at desc
|
||||
</select>
|
||||
<select id="getById" resultMap="PCBaseResultMap">
|
||||
select o.id, o.scenic_id, s.name as scenic_name, o.member_id, o.type, o.openid, o.face_id, f.face_url, o.price, o.pay_price, o.remark, o.broker_id, o.promo_code, o.refund_reason,
|
||||
o.refund_status, o.status, o.create_at, o.update_at, o.pay_at, o.cancel_at, o.refund_at,
|
||||
|
Reference in New Issue
Block a user