package com.xisc.pm.infra.mapper;

import io.choerodon.mybatis.common.BaseMapper;
import com.xisc.pm.domain.entity.PmRuntimeContract;

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

import org.apache.ibatis.annotations.Param;

/**
 * 合同范围表(PmRuntimeContract)应用服务
 *
 * @author 纪文桃 wentao.ji01@hand-china.com
 * @since 2024-10-11 09:35:44
 */
public interface PmRuntimeContractMapper extends BaseMapper<PmRuntimeContract> {
    /**
     * 基础查询
     *
     * @param pmRuntimeContract 查询条件
     * @return 返回值
     */
    List<PmRuntimeContract> selectList(PmRuntimeContract pmRuntimeContract);
    
    List<PmRuntimeContract> selectWt(@Param("requestId") Long requestId, @Param("tenantId") Long tenantId);
    
    /**
     * 查询总量
     * @param requestId
     * @param tenantId
     * @return
     */
    BigDecimal selectAllNumberByRemainingFlag(@Param("requestId") Long requestId, @Param("tenantId") Long tenantId);

    int deleteByRequestId(List<Long> requestIds);
}

