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

import com.ym.mec.biz.dal.entity.SysUserCashAccountDetail;
import com.ym.mec.common.dal.BaseDAO;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface SysUserCashAccountDetailDao extends BaseDAO<Long, SysUserCashAccountDetail> {

    SysUserCashAccountDetail selectDetailByTransNo(String transNo);

    /**
     * @describe 批量插入
     * @author Joburgess
     * @date 2019/11/4
     * @param sysUserCashAccountDetails: 现金账户明细
     * @return int
     */
    int batchInsert(@Param("sysUserCashAccountDetails") List<SysUserCashAccountDetail> sysUserCashAccountDetails);

    Map<String, Object> queryStatisticsWithCurrentMonth(@Param("organId") String organId);

    /**
     * 查看当前月当前老师是否执行过教师奖励
     * @param currentMonth
     * @return
     */
    Integer countByTypeAndTime(@Param("currentMonth") String currentMonth,@Param("teacherId")Integer teacherId,@Param("activeId")Integer activeId);

    /**
     * 流水明细查询-包含账户余额与课程余额
     * @param params
     * @return
     */
    List<SysUserCashAccountDetail> queryAccountDetail(Map<String, Object> params);
    int countAccountDetails(Map<String, Object> params);
}
