|
@@ -115,36 +115,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<where>
|
|
<where>
|
|
|
<if test="liveId != null "> and live_id = #{liveId}</if>
|
|
<if test="liveId != null "> and live_id = #{liveId}</if>
|
|
|
<if test="storeId != null "> and store_id = #{storeId}</if>
|
|
<if test="storeId != null "> and store_id = #{storeId}</if>
|
|
|
- <if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
|
|
|
|
- <if test="userId != null and userId != ''"> and user_id = #{userId}</if>
|
|
|
|
|
- <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
- <if test="userPhone != null and userPhone != ''"> and user_phone = #{userPhone}</if>
|
|
|
|
|
- <if test="userAddress != null and userAddress != ''"> and user_address = #{userAddress}</if>
|
|
|
|
|
|
|
+ <if test="orderCode != null and orderCode != ''"> and a.order_code = #{orderCode}</if>
|
|
|
|
|
+ <if test="userId != null and userId != ''"> and a.user_id = #{userId}</if>
|
|
|
|
|
+ <if test="userName != null and userName != ''"> and a.user_name like concat('%', #{userName}, '%')</if>
|
|
|
|
|
+ <if test="userPhone != null and userPhone != ''"> and a.user_phone = #{userPhone}</if>
|
|
|
|
|
+ <if test="userAddress != null and userAddress != ''"> and a.user_address = #{userAddress}</if>
|
|
|
<if test="cartId != null and cartId != ''"> and cart_id = #{cartId}</if>
|
|
<if test="cartId != null and cartId != ''"> and cart_id = #{cartId}</if>
|
|
|
<if test="totalNum != null and totalNum != ''"> and total_num = #{totalNum}</if>
|
|
<if test="totalNum != null and totalNum != ''"> and total_num = #{totalNum}</if>
|
|
|
<if test="totalPrice != null "> and total_price = #{totalPrice}</if>
|
|
<if test="totalPrice != null "> and total_price = #{totalPrice}</if>
|
|
|
- <if test="payPrice != null "> and pay_price = #{payPrice}</if>
|
|
|
|
|
- <if test="payMoney != null "> and pay_money = #{payMoney}</if>
|
|
|
|
|
- <if test="isPay != null and isPay != ''"> and is_pay = #{isPay}</if>
|
|
|
|
|
|
|
+ <if test="payPrice != null "> and a.pay_price = #{payPrice}</if>
|
|
|
|
|
+ <if test="payMoney != null "> and a.pay_money = #{payMoney}</if>
|
|
|
|
|
+ <if test="isPay != null and isPay != ''"> and a.is_pay = #{isPay}</if>
|
|
|
<if test="payTime != null "> and pay_time = #{payTime}</if>
|
|
<if test="payTime != null "> and pay_time = #{payTime}</if>
|
|
|
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
|
|
<if test="payType != null and payType != ''"> and pay_type = #{payType}</if>
|
|
|
- <if test="status != null "> and status = #{status}</if>
|
|
|
|
|
|
|
+ <if test="status != null "> and a.status = #{status}</if>
|
|
|
<if test="refundStatus != null and refundStatus != ''"> and refund_status = #{refundStatus}</if>
|
|
<if test="refundStatus != null and refundStatus != ''"> and refund_status = #{refundStatus}</if>
|
|
|
<if test="refundImg != null and refundImg != ''"> and refund_img = #{refundImg}</if>
|
|
<if test="refundImg != null and refundImg != ''"> and refund_img = #{refundImg}</if>
|
|
|
<if test="refundExplain != null and refundExplain != ''"> and refund_explain = #{refundExplain}</if>
|
|
<if test="refundExplain != null and refundExplain != ''"> and refund_explain = #{refundExplain}</if>
|
|
|
<if test="refundTime != null "> and refund_time = #{refundTime}</if>
|
|
<if test="refundTime != null "> and refund_time = #{refundTime}</if>
|
|
|
<if test="refundReason != null and refundReason != ''"> and refund_reason = #{refundReason}</if>
|
|
<if test="refundReason != null and refundReason != ''"> and refund_reason = #{refundReason}</if>
|
|
|
<if test="refundMoney != null "> and refund_money = #{refundMoney}</if>
|
|
<if test="refundMoney != null "> and refund_money = #{refundMoney}</if>
|
|
|
- <if test="deliveryCode != null and deliveryCode != ''"> and delivery_code = #{deliveryCode}</if>
|
|
|
|
|
- <if test="deliveryName != null and deliveryName != ''"> and delivery_name like concat('%', #{deliveryName}, '%')</if>
|
|
|
|
|
- <if test="deliverySn != null and deliverySn != ''"> and delivery_sn = #{deliverySn}</if>
|
|
|
|
|
|
|
+ <if test="deliveryCode != null and deliveryCode != ''"> and a.delivery_code = #{deliveryCode}</if>
|
|
|
|
|
+ <if test="deliveryName != null and deliveryName != ''"> and a.delivery_name like concat('%', #{deliveryName}, '%')</if>
|
|
|
|
|
+ <if test="deliverySn != null and deliverySn != ''"> and a.delivery_sn = #{deliverySn}</if>
|
|
|
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
|
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
|
|
|
<if test="costPrice != null "> and cost_price = #{costPrice}</if>
|
|
<if test="costPrice != null "> and cost_price = #{costPrice}</if>
|
|
|
<if test="verifyCode != null and verifyCode != ''"> and verify_code = #{verifyCode}</if>
|
|
<if test="verifyCode != null and verifyCode != ''"> and verify_code = #{verifyCode}</if>
|
|
|
<if test="shippingType != null "> and shipping_type = #{shippingType}</if>
|
|
<if test="shippingType != null "> and shipping_type = #{shippingType}</if>
|
|
|
<if test="isChannel != null and isChannel != ''"> and is_channel = #{isChannel}</if>
|
|
<if test="isChannel != null and isChannel != ''"> and is_channel = #{isChannel}</if>
|
|
|
- <if test="finishTime != null ">and finish_time >= #{finishTime} and finish_time < date_add(#{finishTime}, interval 1 day)</if>
|
|
|
|
|
- <if test="deliveryTime != null and deliveryTime != ''"> and delivery_time = #{deliveryTime}</if>
|
|
|
|
|
|
|
+ <if test="finishTime != null ">and a.finish_time >= #{finishTime} and a.finish_time < date_add(#{finishTime}, interval 1 day)</if>
|
|
|
|
|
+ <if test="deliveryTime != null and deliveryTime != ''"> and a.delivery_time = #{deliveryTime}</if>
|
|
|
<if test="tuiMoney != null "> and tui_money = #{tuiMoney}</if>
|
|
<if test="tuiMoney != null "> and tui_money = #{tuiMoney}</if>
|
|
|
<if test="tuiMoneyStatus != null "> and tui_money_status = #{tuiMoneyStatus}</if>
|
|
<if test="tuiMoneyStatus != null "> and tui_money_status = #{tuiMoneyStatus}</if>
|
|
|
<if test="tuiUserId != null "> and tui_user_id = #{tuiUserId}</if>
|
|
<if test="tuiUserId != null "> and tui_user_id = #{tuiUserId}</if>
|
|
@@ -152,7 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="discountMoney != null "> and discount_money = #{discountMoney}</if>
|
|
<if test="discountMoney != null "> and discount_money = #{discountMoney}</if>
|
|
|
<if test="userCouponId != null "> and user_coupon_id = #{userCouponId}</if>
|
|
<if test="userCouponId != null "> and user_coupon_id = #{userCouponId}</if>
|
|
|
<if test="companyId != null "> and a.company_id = #{companyId}</if>
|
|
<if test="companyId != null "> and a.company_id = #{companyId}</if>
|
|
|
- <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
|
|
|
|
|
|
|
+ <if test="companyUserId != null "> and a.company_user_id = #{companyUserId}</if>
|
|
|
<if test="storeHouseCode != null and storeHouseCode != ''"> and store_house_code = #{storeHouseCode}</if>
|
|
<if test="storeHouseCode != null and storeHouseCode != ''"> and store_house_code = #{storeHouseCode}</if>
|
|
|
<if test="extendOrderId != null and extendOrderId != ''"> and extend_order_id = #{extendOrderId}</if>
|
|
<if test="extendOrderId != null and extendOrderId != ''"> and extend_order_id = #{extendOrderId}</if>
|
|
|
<if test="payDelivery != null "> and pay_delivery = #{payDelivery}</if>
|
|
<if test="payDelivery != null "> and pay_delivery = #{payDelivery}</if>
|
|
@@ -165,7 +165,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="deliveryImportTime != null "> and delivery_import_time = #{deliveryImportTime}</if>
|
|
<if test="deliveryImportTime != null "> and delivery_import_time = #{deliveryImportTime}</if>
|
|
|
<if test="deliverySendTime != null "> and delivery_send_time = #{deliverySendTime}</if>
|
|
<if test="deliverySendTime != null "> and delivery_send_time = #{deliverySendTime}</if>
|
|
|
<if test="isAfterSales != null "> and is_after_sales = #{isAfterSales}</if>
|
|
<if test="isAfterSales != null "> and is_after_sales = #{isAfterSales}</if>
|
|
|
- <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
|
|
|
|
+ <if test="deptId != null "> and cu.dept_id = #{deptId}</if>
|
|
|
<if test="channel != null and channel != ''"> and channel = #{channel}</if>
|
|
<if test="channel != null and channel != ''"> and channel = #{channel}</if>
|
|
|
<if test="source != null "> and source = #{source}</if>
|
|
<if test="source != null "> and source = #{source}</if>
|
|
|
<if test="billPrice != null "> and bill_price = #{billPrice}</if>
|
|
<if test="billPrice != null "> and bill_price = #{billPrice}</if>
|
|
@@ -181,8 +181,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectLiveOrderByOrderId" parameterType="String" resultMap="LiveOrderResult">
|
|
<select id="selectLiveOrderByOrderId" parameterType="String" resultMap="LiveOrderResult">
|
|
|
- <include refid="selectLiveOrderVo"/>
|
|
|
|
|
- where order_id = #{orderId}
|
|
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ c.company_name,cu.user_name as company_user_name,a.order_id,a.live_id, a.product_id, a.order_name, a.store_id, a.order_code, a.user_id, a.user_name,
|
|
|
|
|
+ a.user_phone, a.user_address, a.cart_id, a.total_num, a.total_price, a.pay_price, a.pay_money, a.is_pay,
|
|
|
|
|
+ a.pay_time, a.pay_type, a.create_time, a.update_time, a.STATUS, a.refund_status, a.refund_img, a.refund_explain,
|
|
|
|
|
+ a.refund_time, a.refund_reason, a.refund_money, a.delivery_code, a.delivery_name, a.delivery_sn,
|
|
|
|
|
+ a.remark, a.is_del, a.cost_price, a.verify_code, a.shipping_type, a.is_channel, a.finish_time,
|
|
|
|
|
+ a.delivery_time, a.tui_money, a.tui_money_status, a.tui_user_id, a.item_json, a.discount_money,
|
|
|
|
|
+ a.user_coupon_id, a.company_id, a.company_user_id, a.store_house_code, a.extend_order_id, a.pay_delivery,
|
|
|
|
|
+ a.pay_remain, a.delivery_status, a.delivery_pay_status, a.delivery_pay_time, a.delivery_type,
|
|
|
|
|
+ a.delivery_pay_money, a.delivery_import_time, a.delivery_send_time, a.is_after_sales, a.dept_id,
|
|
|
|
|
+ a.channel, a.source, a.bill_price, a.total_postage, a.pay_postage, a.gain_integral,
|
|
|
|
|
+ a.use_integral, a.pay_integral, a.back_integral, a.is_edit_money, b.product_info as product_introduce
|
|
|
|
|
+ FROM
|
|
|
|
|
+ live_order a LEFT JOIN fs_store_product b ON a.product_id = b.product_id
|
|
|
|
|
+ left join company_user cu on a.company_user_id = cu.user_id
|
|
|
|
|
+ left join company c on a.company_id = c.company_id
|
|
|
|
|
+ where a.order_id = #{orderId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertLiveOrder" parameterType="LiveOrder" useGeneratedKeys="true" keyProperty="orderId">
|
|
<insert id="insertLiveOrder" parameterType="LiveOrder" useGeneratedKeys="true" keyProperty="orderId">
|