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

import com.ym.mec.biz.dal.entity.SysUserCashAccount;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

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

public interface SysUserCashAccountDao extends BaseDAO<Integer, SysUserCashAccount> {

    /**
     * 获取行级锁
     *
     * @param userId
     * @return
     */
    SysUserCashAccount getLocked(Integer userId);

    /**
     * @param userIds: 用户编号列表
     * @return java.util.List<com.ym.mec.biz.dal.entity.SysUserCashAccount>
     * @describe 根据用户编号获取现金账户信息
     * @author Joburgess
     * @date 2019/11/17
     */
    List<SysUserCashAccount> findByUserIds(@Param("userIds") Set<Integer> userIds);


    /**
     * 获取预收余额
     * @return
     */
    BigDecimal getTotalUserBalance(Map<String, Object> params);
}
