package com.heyu.api.data.dao.vv;
/**
* <p>
* 逆向表 服务类
* </p>
*
* @author quyixiao
* @since 2025-08-26
*/
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.heyu.api.data.entity.vv.VvReverseOrderEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.mybatis.plugin.annotations.Column;
import com.lz.mybatis.plugin.annotations.IF;
import com.lz.mybatis.plugin.annotations.LIMIT;
import com.lz.mybatis.plugin.annotations.OrderBy;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface VvReverseOrderDao extends BaseMapper<VvReverseOrderEntity> {


	VvReverseOrderEntity selectVvReverseOrderById(@Param("id")Long id);


	Long insertVvReverseOrder(VvReverseOrderEntity vvReverseOrder);


	Long insertOrUpdateVvReverseOrder(VvReverseOrderEntity vvReverseOrder);


	int updateVvReverseOrderById(VvReverseOrderEntity vvReverseOrder);


	int updateCoverVvReverseOrderById(VvReverseOrderEntity vvReverseOrder);


	int deleteVvReverseOrderById(@Param("id")Long id);



	@OrderBy(VvReverseOrderEntity.id_)
	List<VvReverseOrderEntity> selectByAdminCondition(IPage page,
								@IF Long tradeOrderId,
								@IF String status,
								@IF String trackNumber,
								@IF Integer refundType,
								@IF @Column(VvReverseOrderEntity.create_timestamp) Long minCreateTimestamp,
								@IF @Column(VvReverseOrderEntity.create_timestamp) Long maxCreateTimestamp,
								@IF @OrderBy(VvReverseOrderEntity.create_timestamp) String createTimestampSort
	);



    @OrderBy(VvReverseOrderEntity.id_)
    @LIMIT
    VvReverseOrderEntity selectVvReverseOrderByTradeOrderId(Long tradeOrderId);




    @OrderBy(VvReverseOrderEntity.id_)
    @LIMIT
    VvReverseOrderEntity selectVvReverseOrderByTrackNumber(String trackNumber);





    @LIMIT
    VvReverseOrderEntity selectVvReverseOrderByOutRefundNo(String outRefundNo);
}

