jiangqs
2023-08-03 b95715d5cdc806cbb15cc7f49c538e61f5ab5dc6
ruoyi-modules/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -1454,28 +1454,28 @@
        FROM t_order
        WHERE del_flag = 0 AND shop_id = #{param.shopId}
        <if test="param.memberUserId != null and param.memberUserId != ''">
            AND toc.user_id = #{param.memberUserId}
            AND user_id = #{param.memberUserId}
        </if>
        <if test="param.type != null and param.type ==1 ">
            AND (toc.order_status = 2 OR toc.order_status = 3)
            AND (order_status = 2 OR order_status = 3)
        </if>
        <if test="param.type != null and param.type ==2 ">
            AND toc.order_status = 2
            AND order_status = 2
        </if>
        <if test="param.type != null and param.type ==3 ">
            AND toc.order_status = 3
            AND order_status = 3
        </if>
        <if test="param.orderFrom != null and param.orderFrom != '' ">
            AND toc.order_from = #{param.orderFrom}
            AND order_from = #{param.orderFrom}
        </if>
        <if test="param.startOrderDate != null and param.startOrderDate != '' ">
            AND Date(toc.create_time) &gt;= #{param.startOrderDate}
            AND Date(create_time) &gt;= #{param.startOrderDate}
        </if>
        <if test="param.endOrderDate != null and param.endOrderDate != '' ">
            AND Date(toc.create_time) &lt;= #{param.endOrderDate}
            AND Date(create_time) &lt;= #{param.endOrderDate}
        </if>
        <if test="param.keyword != null and param.keyword != ''">
            AND (toc.order_no LIKE CONCAT('%',#{param.keyword},'%') OR tog.goods_name LIKE CONCAT('%',#{param.keyword},'%'))
            AND order_no LIKE CONCAT('%',#{param.keyword},'%')
        </if>
    </select>