|
@@ -82,4 +82,59 @@
|
|
|
WHERE order_no = #{orderNo} AND open_id = #{openId}
|
|
WHERE order_no = #{orderNo} AND open_id = #{openId}
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
|
|
+ <select id="adminPage" resultType="com.ylx.massage.domain.vo.ProductOrderPageItemVo">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ oi.id,
|
|
|
|
|
+ oi.order_no AS orderNo,
|
|
|
|
|
+ oi.order_status AS orderStatus,
|
|
|
|
|
+ oi.pay_status AS payStatus,
|
|
|
|
|
+ oi.points_used AS pointsUsed,
|
|
|
|
|
+ oi.logistics_no AS logisticsNo,
|
|
|
|
|
+ oi.delivery_time AS deliveryTime,
|
|
|
|
|
+ oi.create_time AS createTime,
|
|
|
|
|
+ item.product_id,
|
|
|
|
|
+ item.product_name AS productName,
|
|
|
|
|
+ item.quantity AS quantity,
|
|
|
|
|
+ item.price AS price,
|
|
|
|
|
+ ROUND( item.price / 100, 2 ) AS payAmount,
|
|
|
|
|
+ oi.open_id,
|
|
|
|
|
+ u.c_nick_name AS nickName,
|
|
|
|
|
+ u.c_phone AS phone
|
|
|
|
|
+ FROM
|
|
|
|
|
+ product_order_info oi
|
|
|
|
|
+ LEFT JOIN product_order_item item ON oi.id = item.order_id
|
|
|
|
|
+ LEFT JOIN t_wx_user u ON oi.open_id = u.c_openid
|
|
|
|
|
+ WHERE oi.is_deleted = 0
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 查询条件 -->
|
|
|
|
|
+ <if test="dto.orderNo != null and dto.orderNo != ''">
|
|
|
|
|
+ AND oi.order_no LIKE CONCAT('%', #{dto.orderNo}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dto.logisticsNo != null and dto.logisticsNo != ''">
|
|
|
|
|
+ AND oi.logistics_no LIKE CONCAT('%', #{dto.logisticsNo}, '%')
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dto.orderStatus != null">
|
|
|
|
|
+ AND oi.order_status = #{dto.orderStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dto.payStatus != null">
|
|
|
|
|
+ AND oi.pay_status = #{dto.payStatus}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="dto.startTime != null and dto.endTime != null">
|
|
|
|
|
+ AND oi.create_time BETWEEN #{dto.startTime} AND #{dto.endTime}
|
|
|
|
|
+ </if>
|
|
|
|
|
+
|
|
|
|
|
+ ORDER BY oi.create_time DESC
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="getOrderTotalCount" resultType="com.ylx.massage.domain.vo.ProductOrderCountVo">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ SUM( CASE WHEN order_status = 1 THEN 1 ELSE 0 END ) AS pendingShipmentQty,
|
|
|
|
|
+ SUM( CASE WHEN order_status IN ( 2, 3 ) THEN 1 ELSE 0 END ) AS inProgressQty,
|
|
|
|
|
+ SUM( CASE WHEN order_status IN ( 5, 6, 7, 8, 9 ) THEN 1 ELSE 0 END ) AS afterSalesQty
|
|
|
|
|
+ FROM
|
|
|
|
|
+ product_order_info
|
|
|
|
|
+ WHERE
|
|
|
|
|
+ is_deleted = 0
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
</mapper>
|
|
</mapper>
|