|
|
@@ -84,6 +84,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.ruoyi.shop.order.domain.vo.ShopOrderWaitShipVo" id="exportShopOrderWaitShipResult" autoMapping="true">
|
|
|
+ <id property="orderId" column="order_id"/>
|
|
|
+ <association property="orderAddress" columnPrefix="oa_" autoMapping="true"
|
|
|
+ javaType="com.ruoyi.shop.order.domain.vo.ShopOrderAddressVo">
|
|
|
+ <id property="orderAddressId" column="order_address_id"/>
|
|
|
+ </association>
|
|
|
+ <collection property="orderDetails" columnPrefix="od_" autoMapping="true" ofType="com.ruoyi.shop.order.domain.vo.ShopOrderDetailVo"
|
|
|
+ javaType="java.util.List">
|
|
|
+ <id property="orderDetailId" column="order_detail_id"/>
|
|
|
+ <result property="skuSetValue" column="sku_set_value" typeHandler="com.ruoyi.shop.typehandler.ListToSkuItemTypeHandler"/>
|
|
|
+ </collection>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
<resultMap type="com.ruoyi.shop.order.domain.vo.ShopOrderVo" id="shopOrderVoResult" autoMapping="true">
|
|
|
<id property="orderId" column="order_id"/>
|
|
|
<association property="orderAddress" columnPrefix="oa_" autoMapping="true"
|
|
|
@@ -246,7 +259,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and o.user_mobile like concat('%',#{bo.userMobile},'%')
|
|
|
</if>
|
|
|
<if test="bo.orderType != null">
|
|
|
- and o.order_type = #{bo.orderType}
|
|
|
+ and o.order_type = #{bo.orderType.code}
|
|
|
</if>
|
|
|
<if test="bo.transactionStatus != null">
|
|
|
and o.transaction_status = #{bo.transactionStatus.code}
|
|
|
@@ -255,7 +268,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
and o.order_no like concat('%',#{bo.orderNo},'%')
|
|
|
</if>
|
|
|
<if test="bo.marketingType!=null">
|
|
|
- AND o.marketing_type = #{bo.marketingType}
|
|
|
+ AND o.marketing_type = #{bo.marketingType.code}
|
|
|
</if>
|
|
|
<if test="bo.transactionId!=null and bo.transactionId!=''">
|
|
|
AND o.transaction_id like CONCAT('%',#{bo.transactionId},'%')
|
|
|
@@ -309,7 +322,48 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</where>
|
|
|
order by o.create_time desc
|
|
|
</select>
|
|
|
-
|
|
|
+ <select id="businessWaitExport" resultMap="exportShopOrderWaitShipResult">
|
|
|
+ select o.*,
|
|
|
+ <include refid="orderDetailcolumn"/>,
|
|
|
+ <include refid="shopOrderAddressColumn"/>
|
|
|
+ from tb_shop_order as o
|
|
|
+ left join tb_shop_order_detail as od on od.order_id = o.order_id
|
|
|
+ left join tb_shop_order_address as oa on oa.order_id = o.order_id
|
|
|
+ <where>
|
|
|
+ and o.business_id = #{bo.businessId}
|
|
|
+ and o.transaction_status = #{bo.transactionStatus.code}
|
|
|
+ and o.order_type = #{bo.orderType}
|
|
|
+ and o.shipping_status = #{bo.transactionStatus.code}
|
|
|
+ and o.effective = 1
|
|
|
+ and o.cancellation_method = 0
|
|
|
+ AND o.shipping_method = 0
|
|
|
+ <if test="bo.exchange != null">
|
|
|
+ and o.exchange = #{bo.exchange}
|
|
|
+ </if>
|
|
|
+ <if test="bo.userMobile != null">
|
|
|
+ and o.user_mobile like concat('%',#{bo.userMobile},'%')
|
|
|
+ </if>
|
|
|
+ <if test="bo.orderNo != null">
|
|
|
+ and o.order_no like concat('%',#{bo.orderNo},'%')
|
|
|
+ </if>
|
|
|
+ <if test="bo.marketingType!=null">
|
|
|
+ AND o.marketing_type = #{bo.marketingType.code}
|
|
|
+ </if>
|
|
|
+ <if test="bo.receiverPhone!=null and bo.receiverPhone!=''">
|
|
|
+ AND oa.receiver_phone like CONCAT('%',#{bo.receiverPhone},'%')
|
|
|
+ </if>
|
|
|
+ <if test="bo.receiverName!=null and bo.receiverName!=''">
|
|
|
+ AND oa.receiver_name like CONCAT('%',#{bo.receiverName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="bo.startTime!=null">
|
|
|
+ AND o.create_time >= #{bo.startTime}
|
|
|
+ </if>
|
|
|
+ <if test="bo.endTime!=null">
|
|
|
+ AND o.create_time <= #{bo.endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by o.create_time desc
|
|
|
+ </select>
|
|
|
<select id="countByUser" resultType="com.ruoyi.shop.order.domain.vo.ShopOrderTransactionStatusCountVo">
|
|
|
select count(*) as num, transaction_status
|
|
|
from tb_shop_order
|
|
|
@@ -369,4 +423,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</where>
|
|
|
GROUP BY transaction_status
|
|
|
</select>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|