package com.lz.modules.luck.dao;
/**
* <p>
* 中奖记录 服务类
* </p>
*
* @author quyixiao
* @since 2020-08-21
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.luck.entity.LuckRecord;
import com.lz.modules.luck.entity.LuckRecordReq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface LuckRecordMapper extends BaseMapper<LuckRecord> {


	LuckRecord selectLuckRecordById(@Param("id")Long id);


	Long insertLuckRecord(LuckRecord luckRecord);


	int updateLuckRecordById(LuckRecord luckRecord);


	int updateCoverLuckRecordById(LuckRecord luckRecord);


	int deleteLuckRecordById(@Param("id")Long id);


    LuckRecord selectLuckRecordByLuckIdAndStaffId(@Param("luckId") Long luckId, @Param("id") Long id);

    List<LuckRecord> selectLuckRecordByLuckId(@Param("luckId") String luckId);

    void updateLuckRecordByReqWithId(LuckRecordReq luckRecordReq);

	List<LuckRecord> selectGoodLuckRecordByLuckId(String luckId);

	int selectCountGoodLuckRecordByLuckId(@Param("luckId") Long luckId);

	List<LuckRecord> selectNoGoodLuckRecordByLuckId(String luckId);

	int selectCountRecordByLuckId(Long luckId);
}