package com.younike.system.mapper;

import com.younike.system.domain.PersonalMerchantSettle;
import com.younike.system.domain.vo.PersonalMerchantSettleVO;
import com.younike.system.param.PersonalMerchantSettleQueryParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 个体户结算Mapper接口
 *
 * @author dail
 * @date 2022-03-02
 */
public interface PersonalMerchantSettleMapper {

    /**
     * 新增个体户结算信息
     *
     * @param personalMerchantSettle
     * @return
     */
    int insertPersonalMerchantSettle(PersonalMerchantSettle personalMerchantSettle);

    /**
     * 删除个体户结算信息
     *
     * @param personalMerchantSettleId
     * @return
     */
    int deleteByPersonalMerchantSettleId(Long personalMerchantSettleId);

    /**
     * 修改个体户结算信息
     *
     * @param personalMerchantSettle
     * @return
     */
    int updatePersonalMerchantSettle(PersonalMerchantSettle personalMerchantSettle);

    /**
     * 查询个体户结算信息列表
     *
     * @param personalMerchantSettle
     * @return
     */
    List<PersonalMerchantSettle> selectPersonalMerchantSettleList(PersonalMerchantSettle personalMerchantSettle);

    /**
     * 查询个体户账单结算信息列表
     *
     * @param queryParam
     * @return
     */
    List<PersonalMerchantSettleVO> listPersonalMerchantSettle(PersonalMerchantSettleQueryParam queryParam);

    /**
     * 批量更新个体户账单结算信息
     *
     * @param list
     * @return
     */
    int updateBatchById(@Param("list")List<PersonalMerchantSettle> list);

    /**
     * 根据年月和商家id查询个体户账单结算记录
     *
     * @param merchantId
     * @param yearMonth
     * @return
     */
    PersonalMerchantSettle getByMerchantIdAndYearMonth(@Param("merchantId") Long merchantId, @Param("yearMonth") String yearMonth);

    /**
     * 批量新增个体户账单结算信息
     *
     * @param list
     * @return
     */
    int saveBatch(@Param("list")List<PersonalMerchantSettle> list);
}