package com.iamberry.wechat.service.member;

import java.util.List;

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

import com.iamberry.wechat.core.entity.member.CashLog;
import com.iamberry.wechat.face.member.CashLogService;
import com.iamberry.wechat.service.member.dao.CashLogDao;
/**
 * 用户现金记录 Service 实现
 * 2016年5月3日
 * @author 穆再兴
 *
 */
@Service
public class CashLogServiceImpl implements CashLogService {

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

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