package com.hzs.sale.order;

import com.hzs.common.core.domain.R;
import com.hzs.common.domain.sale.ext.SaOrderItemsExt;
import com.hzs.sale.order.dto.WaresOrderDTO;

import java.util.List;

/**
 * @Description: 销售订单-明细表
 * @Author: zhangjing
 * @Time: 2023/11/16 20:06
 * @Classname: ISaOrderItemsServiceApi
 * @PackageName: com.hzs.sale.order.dto
 */
public interface ISaOrderItemsServiceApi {


    /**
     * @description: 根据订单id查询订单商品列表
     * @author: zhang jing
     * @date: 2023/11/16 9:23
     * @param: [orderIdList]
     * @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.sale.order.dto.WaresOrderDTO>>
     **/
    R<List<WaresOrderDTO>> waresListByOrderId(List<Long> orderIdList);

    /**
     * 根据订单ID查询订单明细商品列表（不添加删除标记）
     *
     * @param orderId 订单ID
     * @return
     */
    R<List<WaresOrderDTO>> waresListByOrderId(Long orderId);

    /**
     * @description: 根据订单ID查询订单明细列表
     * @author: zhang jing
     * @date: 2023/11/16 9:33
     * @param: [orderIdList, tOrderIdList]
     * @return: com.hzs.common.core.domain.R<java.util.List < com.hzs.common.domain.sale.ext.SaOrderItemsExt>>
     **/
    R<List<SaOrderItemsExt>> queryListByOrderId(List<Long> orderIdList, List<Long> tOrderIdList);

    /**
     * 订单明细退货
     *
     * @param orderItemsIdList 订单明细ID列表
     * @param userId           操作人ID
     * @param pkCountry        所属国家（可为空）
     * @return
     */
    R orderItemsReturn(List<Long> orderItemsIdList, Long userId, Integer pkCountry);

}
