package com.iamberry.wechat.service.member.dao.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.iamberry.wechat.core.entity.member.CashLog;
import com.iamberry.wechat.service.mapper.CashLogMapper;
import com.iamberry.wechat.service.member.dao.CashLogDao;

/**
 * 用户现金记录 DAO 实现
 * 2016年5月3日
 * @author 穆再兴
 *
 */
@Repository
public class CashLogDaoImpl implements CashLogDao {

	@Autowired
	private CashLogMapper cashLogMapper;
	/**
	 * 查出符合条件的所有现金记录
	 * 2016年5月3日
	 * @author 穆再兴
	 * @param cashLog
	 * @return
	 */
	@Override
	public List<CashLog> getAllCashLog(CashLog cashLog){
		return cashLogMapper.getAllCashLog(cashLog);
	}

	/**
	 * 添加一条现金记录
	 * @param cashLog
	 * @return
	 */
	public Integer addCashLog(CashLog cashLog){
		return cashLogMapper.addCashLog(cashLog);
	}
	
	
	
	@Override
	public CashLog selectCashLogsInfo(CashLog cashLog) {
		// TODO Auto-generated method stub
		return cashLogMapper.selectCashLogsInfo(cashLog);
	}

	@Override
	public Integer updateCashLogs(CashLog cashLog) {
		// TODO Auto-generated method stub
		return cashLogMapper.updateCashLogs(cashLog);
	}

	/**
	 * 根据 cashLogsOrderid 删除类型是提现的 现金记录
	 * create date 2016年5月14日
	 * @author mzx
	 * @param cashLogsId
	 * @return
	 */
	public Integer deleteCashLogs(Integer cashLogsOrderid){
		return cashLogMapper.deleteCashLogs(cashLogsOrderid);
	}
}
