package com.zcxk.rmcp.core.dao;


import com.zcxk.core.common.pojo.UserCondition;
import com.zcxk.rmcp.api.dto.measurementsettlement.MeasurementSettlementDto;
import com.zcxk.rmcp.core.entity.MeasurementSettlement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * (MeasurementSettlement)表数据库访问层
 *
 * @author hym
 * @since 2021-07-22 14:14:51
 */
@Mapper
public interface MeasurementSettlementMapper {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    MeasurementSettlement selectById(Integer id);


    /**
     * 查询全部
     *
     * @return 对象列表
     */
    List<MeasurementSettlement> selectAll();

    /**
     * 通过实体作为筛选条件查询
     *
     * @param measurementSettlement 实例对象
     * @param userCondition
     * @return 对象列表
     */
    List<MeasurementSettlementDto> selectList(@Param("measurement") MeasurementSettlement measurementSettlement,
                                              @Param("userCondition")UserCondition userCondition);

    /**
     * 新增数据
     *
     * @param measurementSettlement 实例对象
     * @return 影响行数
     */
    int insert(MeasurementSettlement measurementSettlement);

    /**
     * 批量新增
     *
     * @param measurementSettlements 实例对象的集合
     * @return 影响行数
     */
    int batchInsert(@Param("measurementSettlements") List<MeasurementSettlement> measurementSettlements);

    /**
     * 修改数据
     *
     * @param measurementSettlement 实例对象
     * @return 影响行数
     */
    int update(MeasurementSettlement measurementSettlement);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 影响行数
     */
    int deleteById(Integer id);

    /**
     * 查询总数据数
     *
     * @return 数据总数
     */
    int count();

    /**查询记录详情
      * @param measurementRecord
     * @description
     * @author hym
     * @updateTime 2021/8/3 9:51
     * @return java.util.List<com.zcxk.rmcp.api.dto.measurementsettlement.MeasurementSettlementDto>
     * @throws
     */
    List<MeasurementSettlementDto> selectRecordList(MeasurementSettlement measurementRecord);
    /**删除计划
      * @param ids
     * @description
     * @author hym
     * @updateTime 2021/8/3 9:51
     * @return void
     * @throws
     */
    void deletePlan(List<Integer> ids);
    /**删除所有计划
      * @param userCondition
     * @description
     * @author hym
     * @updateTime 2021/8/3 9:58
     * @return void
     * @throws
     */
    void deleteAll(@Param("userCondition")UserCondition userCondition);

    
}