Pu Zhibing
2025-03-26 cbf2486983b77a27af9968bbb362cb8d43789115
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/OrderMapper.xml
@@ -226,4 +226,19 @@
        </if>
        order by o.create_time desc
    </select>
    <select id="getOrderByAppUserIdsAndWriteOffShop" resultType="com.ruoyi.order.model.Order">
        select * from t_order where del_flag = 0 and pay_status = 2 and order_status in (1, 2, 3, 4, 5, 7, 8)
        <if test="null != shopId and 0 != shopId">
            and shop_id = #{shopId} and (order_type = 1 or (order_type = 2 and distribution_mode = 1))
        </if>
        <if test="null != appUserId and appUserId.size() > 0">
            and app_user_id in
            <foreach collection="appUserId" item="item" index="index" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
    </select>
</mapper>