664 lines
27 KiB
XML
664 lines
27 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.zhwl.wcsc.mapper.ZdyWcscOrderMapper">
|
|
|
|
<resultMap type="ZdyWcscOrder" id="ZdyWcscOrderResult">
|
|
<id property="id" column="id"/>
|
|
<result property="type" column="type"/>
|
|
<result property="orderSn" column="order_sn"/>
|
|
<result property="userId" column="user_id"/>
|
|
<result property="activityType" column="activity_type"/>
|
|
<result property="goodsAmount" column="goods_amount"/>
|
|
<result property="dispatchAmount" column="dispatch_amount"/>
|
|
<result property="phone" column="phone"/>
|
|
<result property="consignee" column="consignee"/>
|
|
<result property="provinceName" column="province_name"/>
|
|
<result property="cityName" column="city_name"/>
|
|
<result property="areaName" column="area_name"/>
|
|
<result property="address" column="address"/>
|
|
<result property="provinceId" column="province_id"/>
|
|
<result property="cityId" column="city_id"/>
|
|
<result property="areaId" column="area_id"/>
|
|
<result property="status" column="status"/>
|
|
<result property="memo" column="memo"/>
|
|
<result property="remark" column="remark"/>
|
|
<result property="totalAmount" column="total_amount"/>
|
|
<result property="scoreAmount" column="score_amount"/>
|
|
<result property="totalFee" column="total_fee"/>
|
|
<result property="discountFee" column="discount_fee"/>
|
|
<result property="couponFee" column="coupon_fee"/>
|
|
<result property="payFee" column="pay_fee"/>
|
|
<result property="scoreFee" column="score_fee"/>
|
|
<result property="goodsOriginalAmount" column="goods_original_amount"/>
|
|
<result property="couponsId" column="coupons_id"/>
|
|
<result property="transactionId" column="transaction_id"/>
|
|
<result property="paymentJson" column="payment_json"/>
|
|
<result property="payType" column="pay_type"/>
|
|
<result property="payTime" column="pay_time"/>
|
|
<result property="ext" column="ext"/>
|
|
<result property="platform" column="platform"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="deletetime" column="deletetime"/>
|
|
<result property="local" column="local"/>
|
|
<result property="read" column="read"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="userName" column="userName"/>
|
|
<result property="userRealName" column="userRealName"/>
|
|
<result property="userMobile" column="userMobile"/>
|
|
<result property="userIdCard" column="userIdCard"/>
|
|
<result property="statusText" column="statusText"/>
|
|
<result property="typeText" column="typeText"/>
|
|
<result property="platformText" column="platformText"/>
|
|
<result property="payTypeText" column="payTypeText"/>
|
|
<result property="paymentScene" column="payment_scene"/>
|
|
<result property="activityTitle" column="activity_title"/>
|
|
<result property="activityPrice" column="activity_price"/>
|
|
<result property="dispatchType" column="dispatch_type"/>
|
|
<result property="deliverTime" column="deliver_time"/>
|
|
<result property="receiptTime" column="receipt_time"/>
|
|
<collection property="orderItemList" javaType="java.util.List" ofType="ZdyWcscOrderItem"
|
|
select="selectZdyWcscOrderItemList" column="id"/>
|
|
</resultMap>
|
|
|
|
<resultMap type="ZdyWcscOrderItem" id="ZdyWcscOrderItemResult">
|
|
<id property="id" column="sub_id"/>
|
|
<result property="userId" column="sub_user_id"/>
|
|
<result property="orderId" column="sub_order_id"/>
|
|
<result property="storeId" column="sub_store_id"/>
|
|
<result property="goodsId" column="sub_goods_id"/>
|
|
<result property="adminId" column="sub_admin_id"/>
|
|
<result property="goodsSkuPriceId" column="sub_goods_sku_price_id"/>
|
|
<result property="activityId" column="sub_activity_id"/>
|
|
<result property="activityType" column="sub_activity_type"/>
|
|
<result property="itemGoodsSkuPriceId" column="sub_item_goods_sku_price_id"/>
|
|
<result property="goodsSkuText" column="sub_goods_sku_text"/>
|
|
<result property="goodsTitle" column="sub_goods_title"/>
|
|
<result property="goodsImage" column="sub_goods_image"/>
|
|
<result property="goodsOriginalPrice" column="sub_goods_original_price"/>
|
|
<result property="discountFee" column="sub_discount_fee"/>
|
|
<result property="totalPrice" column="sub_total_price"/>
|
|
<result property="goodsPrice" column="sub_goods_price"/>
|
|
<result property="payPrice" column="sub_pay_price"/>
|
|
<result property="goodsNum" column="sub_goods_num"/>
|
|
<result property="dispatchStatus" column="sub_dispatch_status"/>
|
|
<result property="dispatchFee" column="sub_dispatch_fee"/>
|
|
<result property="dispatchType" column="sub_dispatch_type"/>
|
|
<result property="dispatchId" column="sub_dispatch_id"/>
|
|
<result property="aftersaleStatus" column="sub_aftersale_status"/>
|
|
<result property="commentStatus" column="sub_comment_status"/>
|
|
<result property="refundStatus" column="sub_refund_status"/>
|
|
<result property="refundFee" column="sub_refund_fee"/>
|
|
<result property="refundCause" column="sub_refund_cause"/>
|
|
<result property="refundMsg" column="sub_refund_msg"/>
|
|
<result property="expressName" column="sub_express_name"/>
|
|
<result property="expressNo" column="sub_express_no"/>
|
|
<result property="read" column="sub_read"/>
|
|
<result property="deptId" column="sub_dept_id"/>
|
|
<result property="nickName" column="sub_nickName"/>
|
|
<result property="title" column="sub_title"/>
|
|
<result property="priceWeigh" column="pub_weigh"/>
|
|
<result property="priceImage" column="pub_image"/>
|
|
<result property="priceStock" column="pub_stock"/>
|
|
<result property="priceSales" column="pub_sales"/>
|
|
<result property="priceSn" column="pub_sn"/>
|
|
<result property="priceWeight" column="pub_weight"/>
|
|
<result property="price" column="pub_price"/>
|
|
<result property="storeName" column="pub_store_name"/>
|
|
<collection property="serviceList" javaType="java.util.List" ofType="ZdyWcscGoodsService"
|
|
select="selectZdyWcscOrderItemServiceList" column="sub_goods_id"/>
|
|
</resultMap>
|
|
|
|
<resultMap type="ZdyWcscGoodsService" id="ZdyWcscGoodsServiceResult">
|
|
<result property="id" column="id"/>
|
|
<result property="name" column="name"/>
|
|
<result property="image" column="image"/>
|
|
<result property="description" column="description"/>
|
|
<result property="createTime" column="create_time"/>
|
|
<result property="updateTime" column="update_time"/>
|
|
<result property="deletetime" column="deletetime"/>
|
|
<result property="createBy" column="create_by"/>
|
|
<result property="updateBy" column="update_by"/>
|
|
<result property="deptId" column="dept_id"/>
|
|
<result property="status" column="status"/>
|
|
</resultMap>
|
|
|
|
<sql id="selectZdyWcscOrderVo">
|
|
SELECT a.id,
|
|
a.type,
|
|
a.order_sn,
|
|
a.user_id,
|
|
a.activity_type,
|
|
a.goods_amount,
|
|
a.dispatch_amount,
|
|
a.phone,
|
|
a.consignee,
|
|
a.province_name,
|
|
a.city_name,
|
|
a.area_name,
|
|
a.address,
|
|
a.province_id,
|
|
a.city_id,
|
|
a.area_id,
|
|
a.STATUS,
|
|
a.memo,
|
|
a.remark,
|
|
a.total_amount,
|
|
a.score_amount,
|
|
a.total_fee,
|
|
a.discount_fee,
|
|
a.coupon_fee,
|
|
a.pay_fee,
|
|
a.score_fee,
|
|
a.goods_original_amount,
|
|
a.coupons_id,
|
|
a.transaction_id,
|
|
a.payment_json,
|
|
a.pay_type,
|
|
a.pay_time,
|
|
a.ext,
|
|
a.platform,
|
|
a.create_time,
|
|
a.update_time,
|
|
a.deletetime,
|
|
a.create_by,
|
|
a.update_by,
|
|
a.LOCAL,
|
|
a.READ,
|
|
u.nickname AS userName,
|
|
u.name AS userRealName,
|
|
u.mobile AS userMobile,
|
|
u.id_card AS userIdCard,
|
|
a.payment_scene,
|
|
a.activity_title,
|
|
a.activity_price,
|
|
a.deliver_time,
|
|
a.receipt_time,
|
|
a.dispatch_type
|
|
FROM zdy_wcsc_order a
|
|
LEFT JOIN zdy_user u ON u.id = a.user_id
|
|
</sql>
|
|
|
|
<select id="selectZdyWcscOrderItemList" parameterType="java.lang.Long" resultMap="ZdyWcscOrderItemResult">
|
|
select b.id AS sub_id,
|
|
b.user_id AS sub_user_id,
|
|
b.order_id AS sub_order_id,
|
|
b.store_id AS sub_store_id,
|
|
b.goods_id AS sub_goods_id,
|
|
b.admin_id AS sub_admin_id,
|
|
b.goods_sku_price_id AS sub_goods_sku_price_id,
|
|
b.activity_id AS sub_activity_id,
|
|
b.activity_type AS sub_activity_type,
|
|
b.item_goods_sku_price_id AS sub_item_goods_sku_price_id,
|
|
b.goods_sku_text AS sub_goods_sku_text,
|
|
b.goods_title AS sub_goods_title,
|
|
b.goods_image AS sub_goods_image,
|
|
b.goods_original_price AS sub_goods_original_price,
|
|
b.discount_fee AS sub_discount_fee,
|
|
b.total_price AS sub_total_price,
|
|
b.goods_price AS sub_goods_price,
|
|
b.pay_price AS sub_pay_price,
|
|
b.goods_num AS sub_goods_num,
|
|
b.dispatch_status AS sub_dispatch_status,
|
|
b.dispatch_fee AS sub_dispatch_fee,
|
|
b.dispatch_type AS sub_dispatch_type,
|
|
b.dispatch_id AS sub_dispatch_id,
|
|
b.aftersale_status AS sub_aftersale_status,
|
|
b.comment_status AS sub_comment_status,
|
|
b.refund_status AS sub_refund_status,
|
|
b.refund_fee AS sub_refund_fee,
|
|
b.refund_cause AS sub_refund_cause,
|
|
b.refund_msg AS sub_refund_msg,
|
|
b.express_name AS sub_express_name,
|
|
b.express_no AS sub_express_no,
|
|
b.READ AS sub_read,
|
|
b.dept_id AS sub_dept_id,
|
|
good.title AS sub_title,
|
|
su.nick_name AS sub_nickName,
|
|
pr.weigh AS pub_weigh,
|
|
pr.image AS pub_image,
|
|
pr.stock AS pub_stock,
|
|
pr.sales AS pub_sales,
|
|
pr.sn AS pub_sn,
|
|
pr.weight AS pub_weight,
|
|
pr.price AS pub_price,
|
|
sbi.name AS pub_store_name
|
|
from zdy_wcsc_order_item b
|
|
LEFT JOIN zdy_wcsc_goods good ON good.id = b.goods_id
|
|
LEFT JOIN zdy_wcsc_goods_sku_price pr ON pr.id = b.goods_sku_price_id
|
|
LEFT JOIN sys_user su ON su.user_id = b.admin_id
|
|
LEFT JOIN zdy_wcsc_store st ON st.id = good.store_id
|
|
LEFT JOIN zdy_store_base_info sbi on st.store_id = sbi.id
|
|
WHERE b.order_id = #{id}
|
|
</select>
|
|
|
|
<select id="selectZdyWcscOrderItemServiceList" parameterType="java.lang.Long" resultMap="ZdyWcscGoodsServiceResult">
|
|
select wgs.id,
|
|
wgs.name,
|
|
wgs.image,
|
|
wgs.description,
|
|
wgs.create_time,
|
|
wgs.update_time,
|
|
wgs.deletetime,
|
|
wgs.create_by,
|
|
wgs.update_by,
|
|
wgs.status,
|
|
wgs.dept_id
|
|
FROM zdy_wcsc_goods goods LEFT JOIN zdy_wcsc_goods_service wgs ON FIND_IN_SET(wgs.id, goods.service_ids) AND wgs.status = 'normal'
|
|
WHERE goods.id = #{subGoodsId}
|
|
</select>
|
|
|
|
<select id="selectZdyWcscOrderList" parameterType="ZdyWcscOrder" resultMap="ZdyWcscOrderResult">
|
|
<include refid="selectZdyWcscOrderVo"/>
|
|
<where>
|
|
ISNULL(a.deletetime)
|
|
<if test="type != null and type != ''">
|
|
and a.type = #{type}
|
|
</if>
|
|
<if test="dispatchType != null and dispatchType != ''">
|
|
and a.dispatch_type = #{dispatchType}
|
|
</if>
|
|
<if test="userId != null">
|
|
and a.user_id = #{userId}
|
|
</if>
|
|
<if test="orderSn != null and orderSn != ''">
|
|
and a.order_sn = #{orderSn}
|
|
</if>
|
|
<if test="status != null ">
|
|
and a.status = #{status}
|
|
</if>
|
|
AND a.id IN (SELECT DISTINCT item.order_id FROM zdy_wcsc_order_item item
|
|
LEFT JOIN sys_dept d ON d.dept_id = item.dept_id
|
|
<where>
|
|
<if test="aftersaleStatus != null ">
|
|
and item.aftersale_status = #{aftersaleStatus}
|
|
</if>
|
|
<if test="commentStatus != null ">
|
|
and item.comment_status = #{commentStatus}
|
|
</if>
|
|
<if test="refundStatus != null">
|
|
and item.refund_status !=0
|
|
</if>
|
|
<if test="dispatchStatus != null ">
|
|
and item.refund_status in (0,-1)
|
|
and item.dispatch_status = #{dispatchStatus}
|
|
</if>
|
|
${params.dataScope}
|
|
</where>
|
|
)
|
|
</where>
|
|
order by a.create_time desc
|
|
</select>
|
|
|
|
<select id="selectZdyWcscOrderById" parameterType="Long"
|
|
resultMap="ZdyWcscOrderResult">
|
|
<include refid="selectZdyWcscOrderVo"/>
|
|
where a.id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertZdyWcscOrder" parameterType="ZdyWcscOrder" useGeneratedKeys="true"
|
|
keyProperty="id">
|
|
insert into zdy_wcsc_order
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="type != null and type != ''">type,
|
|
</if>
|
|
<if test="orderSn != null and orderSn != ''">order_sn,
|
|
</if>
|
|
<if test="userId != null">user_id,
|
|
</if>
|
|
<if test="activityType != null">activity_type,
|
|
</if>
|
|
<if test="goodsAmount != null">goods_amount,
|
|
</if>
|
|
<if test="dispatchAmount != null">dispatch_amount,
|
|
</if>
|
|
<if test="phone != null">phone,
|
|
</if>
|
|
<if test="consignee != null">consignee,
|
|
</if>
|
|
<if test="provinceName != null">province_name,
|
|
</if>
|
|
<if test="cityName != null">city_name,
|
|
</if>
|
|
<if test="areaName != null">area_name,
|
|
</if>
|
|
<if test="address != null">address,
|
|
</if>
|
|
<if test="provinceId != null">province_id,
|
|
</if>
|
|
<if test="cityId != null">city_id,
|
|
</if>
|
|
<if test="areaId != null">area_id,
|
|
</if>
|
|
<if test="status != null">status,
|
|
</if>
|
|
<if test="memo != null">memo,
|
|
</if>
|
|
<if test="remark != null">remark,
|
|
</if>
|
|
<if test="totalAmount != null">total_amount,
|
|
</if>
|
|
<if test="scoreAmount != null">score_amount,
|
|
</if>
|
|
<if test="totalFee != null">total_fee,
|
|
</if>
|
|
<if test="discountFee != null">discount_fee,
|
|
</if>
|
|
<if test="couponFee != null">coupon_fee,
|
|
</if>
|
|
<if test="payFee != null">pay_fee,
|
|
</if>
|
|
<if test="scoreFee != null">score_fee,
|
|
</if>
|
|
<if test="goodsOriginalAmount != null">goods_original_amount,
|
|
</if>
|
|
<if test="couponsId != null">coupons_id,
|
|
</if>
|
|
<if test="transactionId != null">transaction_id,
|
|
</if>
|
|
<if test="paymentJson != null">payment_json,
|
|
</if>
|
|
<if test="payType != null">pay_type,
|
|
</if>
|
|
<if test="payTime != null">pay_time,
|
|
</if>
|
|
<if test="ext != null">ext,
|
|
</if>
|
|
<if test="platform != null">platform,
|
|
</if>
|
|
create_time,
|
|
<if test="deletetime != null">deletetime,
|
|
</if>
|
|
<if test="local != null">local,
|
|
</if>
|
|
<if test="read != null">`read`,
|
|
</if>
|
|
<if test="createBy != null">create_by,
|
|
</if>
|
|
<if test="updateBy != null">update_by,
|
|
</if>
|
|
<if test="paymentScene != null">payment_scene,
|
|
</if>
|
|
<if test="activityTitle!= null">activity_title,
|
|
</if>
|
|
<if test="activityPrice!= null">activity_price,
|
|
</if>
|
|
<if test="dispatchType != null">dispatch_type,
|
|
</if>
|
|
<if test="deliverTime != null">deliver_time,
|
|
</if>
|
|
<if test="receiptTime != null">receipt_time,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="type != null and type != ''">#{type},
|
|
</if>
|
|
<if test="orderSn != null and orderSn != ''">#{orderSn},
|
|
</if>
|
|
<if test="userId != null">#{userId},
|
|
</if>
|
|
<if test="activityType != null">#{activityType},
|
|
</if>
|
|
<if test="goodsAmount != null">#{goodsAmount},
|
|
</if>
|
|
<if test="dispatchAmount != null">#{dispatchAmount},
|
|
</if>
|
|
<if test="phone != null">#{phone},
|
|
</if>
|
|
<if test="consignee != null">#{consignee},
|
|
</if>
|
|
<if test="provinceName != null">#{provinceName},
|
|
</if>
|
|
<if test="cityName != null">#{cityName},
|
|
</if>
|
|
<if test="areaName != null">#{areaName},
|
|
</if>
|
|
<if test="address != null">#{address},
|
|
</if>
|
|
<if test="provinceId != null">#{provinceId},
|
|
</if>
|
|
<if test="cityId != null">#{cityId},
|
|
</if>
|
|
<if test="areaId != null">#{areaId},
|
|
</if>
|
|
<if test="status != null">#{status},
|
|
</if>
|
|
<if test="memo != null">#{memo},
|
|
</if>
|
|
<if test="remark != null">#{remark},
|
|
</if>
|
|
<if test="totalAmount != null">#{totalAmount},
|
|
</if>
|
|
<if test="scoreAmount != null">#{scoreAmount},
|
|
</if>
|
|
<if test="totalFee != null">#{totalFee},
|
|
</if>
|
|
<if test="discountFee != null">#{discountFee},
|
|
</if>
|
|
<if test="couponFee != null">#{couponFee},
|
|
</if>
|
|
<if test="payFee != null">#{payFee},
|
|
</if>
|
|
<if test="scoreFee != null">#{scoreFee},
|
|
</if>
|
|
<if test="goodsOriginalAmount != null">#{goodsOriginalAmount},
|
|
</if>
|
|
<if test="couponsId != null">#{couponsId},
|
|
</if>
|
|
<if test="transactionId != null">#{transactionId},
|
|
</if>
|
|
<if test="paymentJson != null">#{paymentJson},
|
|
</if>
|
|
<if test="payType != null">#{payType},
|
|
</if>
|
|
<if test="payTime != null">#{payTime},
|
|
</if>
|
|
<if test="ext != null">#{ext},
|
|
</if>
|
|
<if test="platform != null">#{platform},
|
|
</if>
|
|
sysdate(),
|
|
<if test="deletetime != null">#{deletetime},
|
|
</if>
|
|
<if test="local != null">#{local},
|
|
</if>
|
|
<if test="read != null">#{read},
|
|
</if>
|
|
<if test="createBy != null">#{createBy},
|
|
</if>
|
|
<if test="updateBy != null">#{updateBy},
|
|
</if>
|
|
<if test="paymentScene != null">#{paymentScene},
|
|
</if>
|
|
<if test="activityTitle!= null">#{activityTitle},
|
|
</if>
|
|
<if test="activityPrice!= null">#{activityPrice},
|
|
</if>
|
|
<if test="dispatchType != null">#{dispatchType},
|
|
</if>
|
|
<if test="deliverTime != null">#{deliverTime},
|
|
</if>
|
|
<if test="receiptTime != null">#{receiptTime},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateZdyWcscOrder" parameterType="ZdyWcscOrder">
|
|
update zdy_wcsc_order
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="type != null and type != ''">type =
|
|
#{type},
|
|
</if>
|
|
<if test="orderSn != null and orderSn != ''">order_sn =
|
|
#{orderSn},
|
|
</if>
|
|
<if test="userId != null">user_id =
|
|
#{userId},
|
|
</if>
|
|
<if test="activityType != null">activity_type =
|
|
#{activityType},
|
|
</if>
|
|
<if test="goodsAmount != null">goods_amount =
|
|
#{goodsAmount},
|
|
</if>
|
|
<if test="dispatchAmount != null">dispatch_amount =
|
|
#{dispatchAmount},
|
|
</if>
|
|
<if test="phone != null">phone =
|
|
#{phone},
|
|
</if>
|
|
<if test="consignee != null">consignee =
|
|
#{consignee},
|
|
</if>
|
|
<if test="provinceName != null">province_name =
|
|
#{provinceName},
|
|
</if>
|
|
<if test="cityName != null">city_name =
|
|
#{cityName},
|
|
</if>
|
|
<if test="areaName != null">area_name =
|
|
#{areaName},
|
|
</if>
|
|
<if test="address != null">address =
|
|
#{address},
|
|
</if>
|
|
<if test="provinceId != null">province_id =
|
|
#{provinceId},
|
|
</if>
|
|
<if test="cityId != null">city_id =
|
|
#{cityId},
|
|
</if>
|
|
<if test="areaId != null">area_id =
|
|
#{areaId},
|
|
</if>
|
|
<if test="status != null">status =
|
|
#{status},
|
|
</if>
|
|
<if test="memo != null">memo =
|
|
#{memo},
|
|
</if>
|
|
<if test="remark != null">remark =
|
|
#{remark},
|
|
</if>
|
|
<if test="totalAmount != null">total_amount =
|
|
#{totalAmount},
|
|
</if>
|
|
<if test="scoreAmount != null">score_amount =
|
|
#{scoreAmount},
|
|
</if>
|
|
<if test="totalFee != null">total_fee =
|
|
#{totalFee},
|
|
</if>
|
|
<if test="discountFee != null">discount_fee =
|
|
#{discountFee},
|
|
</if>
|
|
<if test="couponFee != null">coupon_fee =
|
|
#{couponFee},
|
|
</if>
|
|
<if test="payFee != null">pay_fee =
|
|
#{payFee},
|
|
</if>
|
|
<if test="scoreFee != null">score_fee =
|
|
#{scoreFee},
|
|
</if>
|
|
<if test="goodsOriginalAmount != null">goods_original_amount =
|
|
#{goodsOriginalAmount},
|
|
</if>
|
|
<if test="couponsId != null">coupons_id =
|
|
#{couponsId},
|
|
</if>
|
|
<if test="transactionId != null">transaction_id =
|
|
#{transactionId},
|
|
</if>
|
|
<if test="paymentJson != null">payment_json =
|
|
#{paymentJson},
|
|
</if>
|
|
<if test="payType != null">pay_type =
|
|
#{payType},
|
|
</if>
|
|
<if test="payTime != null">pay_time =
|
|
#{payTime},
|
|
</if>
|
|
<if test="ext != null">ext =
|
|
#{ext},
|
|
</if>
|
|
<if test="platform != null">platform =
|
|
#{platform},
|
|
</if>
|
|
update_time = sysdate(),
|
|
<if test="deletetime != null">deletetime = #{deletetime},</if>
|
|
<if test="local != null">local =
|
|
#{local},
|
|
</if>
|
|
<if test="read != null">`read` =
|
|
#{read},
|
|
</if>
|
|
<if test="createBy != null">create_by =
|
|
#{createBy},
|
|
</if>
|
|
<if test="updateBy != null">update_by =
|
|
#{updateBy},
|
|
</if>
|
|
<if test="paymentScene != null">payment_scene =
|
|
#{paymentScene},
|
|
</if>
|
|
<if test="activityTitle!= null">activity_title =
|
|
#{activityTitle},
|
|
</if>
|
|
<if test="activityPrice!= null">activity_price =
|
|
#{activityPrice},
|
|
</if>
|
|
<if test="dispatchType != null">dispatch_type =
|
|
#{dispatchType},
|
|
</if>
|
|
<if test="deliverTime != null">deliver_time =
|
|
#{deliverTime},
|
|
</if>
|
|
<if test="receiptTime != null">receipt_time =
|
|
#{receiptTime},
|
|
</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteZdyWcscOrderById" parameterType="Long">
|
|
update zdy_wcsc_order
|
|
set deletetime = sysdate()
|
|
where id = #{id}
|
|
</delete>
|
|
|
|
<delete id="deleteZdyWcscOrderByIds" parameterType="String">
|
|
update zdy_wcsc_order
|
|
set deletetime = sysdate() where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
<select id="selectZdyWcscOrderShxxById" parameterType="Long"
|
|
resultMap="ZdyWcscOrderResult">
|
|
SELECT id,
|
|
phone,
|
|
consignee,
|
|
address
|
|
FROM zdy_wcsc_order
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<select id="selectUnpayOrderById" parameterType="Long"
|
|
resultMap="ZdyWcscOrderResult">
|
|
SELECT id,order_sn,user_id,total_fee
|
|
FROM zdy_wcsc_order
|
|
where status = 0
|
|
AND id = #{id}
|
|
</select>
|
|
|
|
<select id="selectOrderByOrderSn" parameterType="String" resultMap="ZdyWcscOrderResult">
|
|
SELECT * FROM zdy_wcsc_order
|
|
where order_sn = #{orderSn}
|
|
</select>
|
|
|
|
</mapper>
|