package com.ym.mec.biz.dal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ym.mec.biz.dal.entity.TenantAssetsInfo;
import org.apache.ibatis.annotations.Param;

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

/**
 * 机构资产信息(TenantAssetsInfo)表数据库访问层
 *
 * @author hgw
 * @since 2021-12-22 14:27:02
 */
public interface TenantAssetsInfoDao extends BaseMapper<TenantAssetsInfo> {

    int insertBatch(@Param("entities") List<TenantAssetsInfo> entities);

    int deductAmount(@Param("deductAmount") BigDecimal deductAmount, @Param("tenantId") Integer tenantId);

    int checkDeductAmount(@Param("deductAmount") BigDecimal deductAmount, @Param("tenantId") Integer tenantId);

    Integer queryPeopleNum(@Param("courseId") Integer courseId);

    int updateAmount(@Param("tenantId") Integer tenantId, @Param("amount") BigDecimal amount);
}