package com.lz.modules.luck.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lz.modules.luck.dao.LuckRecordMapper;
import com.lz.modules.luck.entity.LuckRecord;
import com.lz.modules.luck.entity.LuckRecordReq;
import com.lz.modules.luck.service.LuckRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* <p>
* 中奖记录 服务类
* </p>
*
* @author quyixiao
* @since 2020-08-21
*/

@Service
public class LuckRecordServiceImpl extends ServiceImpl<LuckRecordMapper, LuckRecord> implements LuckRecordService {


    @Autowired
	private LuckRecordMapper luckRecordMapper;



	@Override
	public LuckRecord selectLuckRecordById(Long id){
		return luckRecordMapper.selectLuckRecordById(id);
	}



	@Override
	public Long insertLuckRecord(LuckRecord luckRecord){
		return luckRecordMapper.insertLuckRecord(luckRecord);
	}



	@Override
	public int updateLuckRecordById(LuckRecord luckRecord){
		return luckRecordMapper.updateLuckRecordById(luckRecord);
	}



	@Override
	public int updateCoverLuckRecordById(LuckRecord luckRecord){
		return luckRecordMapper.updateCoverLuckRecordById(luckRecord);
	}



	@Override
	public int deleteLuckRecordById(Long id){
		return luckRecordMapper.deleteLuckRecordById(id);
	}

	@Override
	public LuckRecord selectLuckRecordByLuckIdAndStaffId(Long luckId, Long id){
		return luckRecordMapper.selectLuckRecordByLuckIdAndStaffId(luckId, id);
	}

	@Override
	public List<LuckRecord> selectLuckRecordByLuckId(String luckId){
		return luckRecordMapper.selectLuckRecordByLuckId(luckId);
	}

	@Override
	public void updateLuckRecordByReqWithId(LuckRecordReq luckRecordReq){
		luckRecordMapper.updateLuckRecordByReqWithId(luckRecordReq);
	}
	
	@Override
	public List<LuckRecord> selectGoodLuckRecordByLuckId(String luckId){
		return luckRecordMapper.selectGoodLuckRecordByLuckId(luckId);
	}

	@Override
	public int selectCountGoodLuckRecordByLuckId(Long luckId){
		return luckRecordMapper.selectCountGoodLuckRecordByLuckId(luckId);
	}

	@Override
	public List<LuckRecord> selectNoGoodLuckRecordByLuckId(String luckId){
		return luckRecordMapper.selectNoGoodLuckRecordByLuckId(luckId);
	}

	@Override
	public int selectCountRecordByLuckId(Long luckId){
		return luckRecordMapper.selectCountRecordByLuckId(luckId);
	}


}
