package com.bonus.material.order.mapper;

import com.bonus.material.comprehensive.entity.RentDetailDto;
import com.bonus.material.device.domain.DevInfo;
import com.bonus.material.device.domain.vo.DevInfoVo;
import com.bonus.material.largeScreen.entity.OrderData;
import com.bonus.material.largeScreen.entity.OrderDto;
import com.bonus.material.lease.domain.LeaseRepairRecord;
import com.bonus.material.order.domain.OrderDetailDto;
import com.bonus.material.order.domain.OrderInfoDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author：liang.chao
 * @Date：2024/11/26 - 10:36
 */
public interface OrderMapper {
    Integer insertOrderInfo(OrderInfoDto orderInfoDto);

    Integer insertOrderDetail(OrderDetailDto orderDetailDto);

    DevInfo getdeviceCount(OrderDetailDto orderDetailDto);

    Integer updateDeviceStatus(OrderDetailDto orderDetailDto);

    List<OrderInfoDto> getOrderDetails(OrderInfoDto orderInfoDto);

    OrderInfoDto getOrderDetailsById(OrderDetailDto orderInfoDto);

    List<OrderInfoDto> getOrderStatusCount(OrderDetailDto orderInfoDto);

    OrderDetailDto selectOrderDetailsById(String id);

    void updateMaStatus(OrderDetailDto orderDetailDto);

    Integer updateOrderStatus(@Param("orderId") Integer orderId, @Param("maIds") List<Integer> maIds, @Param("orderStatus") String orderStatus, @Param("userName") String userName, @Param("remark") String remark);

    Integer updateDevCount(OrderDetailDto orderDetailDto);

    Integer updateAddDevCount(OrderDetailDto orderDetailDto);

    List<OrderDetailDto> selectOrderDetailsByOrderId(String orderId);

    List<OrderDetailDto> getOrderDetailsByOrderId(Integer orderId);

    int updateOrder(LeaseRepairRecord leaseRepairRecord);

    int updateOrder4Relief(OrderDetailDto dto);

    int changeReliefPrice(OrderDetailDto dto);

//    int deleteCostReliefs(@Param("orderId") Integer orderId);
//
//    int insertCostReliefs(@Param("list") List<OrderDetailCostReliefDto> reliefList);

    OrderInfoDto getAgreementByOrderId(String orderId);

    List<RentDetailDto> getRentDetails(DevInfoVo devInfo);

    OrderData getOrderData();

    OrderData getCompanysCost();

    OrderDto getTodayOrderCount();

    OrderDto getOrderCount();

    List<OrderData> getBuyerAndSellerCouples();

    /**
     * 订单确认
     */
    Integer orderConfirm(String orderId);

    /**
     * 订单驳回
     */
    int orderReject(String orderId);


    List<Map<String, Object>> getCategoryList(String keyWord);
}
