package com.heyu.api.data.dao.vv;
/**
* <p>
* 结算 服务类
* </p>
*
* @author quyixiao
* @since 2025-11-10
*/
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.heyu.api.data.entity.vv.VvMySettlementEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.mybatis.plugin.annotations.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface VvMySettlementDao extends BaseMapper<VvMySettlementEntity> {


	VvMySettlementEntity selectVvMySettlementById(@Param("id")Long id);


	Long insertVvMySettlement(VvMySettlementEntity vvMySettlement);


	Long insertOrUpdateVvMySettlement(VvMySettlementEntity vvMySettlement);


	int updateVvMySettlementById(VvMySettlementEntity vvMySettlement);


	int updateCoverVvMySettlementById(VvMySettlementEntity vvMySettlement);


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


    @OrderBy(VvMySettlementEntity.id_)
    List<VvMySettlementEntity> selectByCondition(IPage page,
                                                 @IF String status,
                                                 @IF @Column(VvMySettlementEntity.amount_) @GE BigDecimal minAmount,
                                                 @IF @Column(VvMySettlementEntity.amount_) @LE BigDecimal maxAmount,
                                                 @IF @Column(VvMySettlementEntity.create_timestamp) @GE Long minCreateTimestamp,
                                                 @IF @Column(VvMySettlementEntity.create_timestamp) @LE Long maxCreateTimestamp
    );


    @OrderBy(VvMySettlementEntity.id_)
    @LIMIT
    VvMySettlementEntity selectVvMySettlementOrderByIdDescLimit1();
}