package com.ruoyi.web.modules.order.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.order.domain.BizOrderAftersale;
import com.ruoyi.web.modules.order.dto.OrderAftersaleStatusRow;
import com.ruoyi.web.modules.order.dto.SellerAftersaleQuery;
import com.ruoyi.web.modules.order.vo.SellerAftersaleDetailVO;
import com.ruoyi.web.modules.order.vo.SellerAftersaleListRowVO;

public interface BizOrderAftersaleMapper
{
    BizOrderAftersale selectByIdAndMember(@Param("aftersaleId") Long aftersaleId, @Param("memberId") Long memberId);

    BizOrderAftersale selectByIdAndShop(@Param("aftersaleId") Long aftersaleId, @Param("shopId") Long shopId);

    int countInProgressByMember(Long memberId);

    int countInProgressByOrderItem(@Param("orderItemId") Long orderItemId);

    int countInProgressByOrderId(@Param("orderId") Long orderId);

    List<OrderAftersaleStatusRow> selectAftersaleStatusByOrderIds(@Param("orderIds") List<Long> orderIds);

    List<BizOrderAftersale> selectMemberList(@Param("memberId") Long memberId, @Param("tab") String tab);

    List<SellerAftersaleListRowVO> selectSellerList(@Param("shopId") Long shopId,
            @Param("query") SellerAftersaleQuery query);

    SellerAftersaleDetailVO selectSellerDetail(@Param("shopId") Long shopId,
            @Param("aftersaleId") Long aftersaleId);

    String selectMaxAftersaleNoByPrefix(@Param("prefix") String prefix);

    int insert(BizOrderAftersale aftersale);

    int updateForFinish(BizOrderAftersale aftersale);
}
