package com.fuint.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.repository.model.MtRaffle;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectKey;

import java.util.Date;
import java.util.List;

/**
 * 会员个人信息 Mapper 接口
 *
 * Created by FSQ
 * CopyRight https://www.fuint.cn
 */
public interface MtRaffleMapper extends BaseMapper<MtRaffle> {
    @Insert("insert into mt_raffle values (#{id},#{raffleType},#{title},#{brief},#{hot},#{image},#{description},#{click}," +
            "#{nowCnt},#{allCnt},#{extraPrize},#{extraImage},#{extraType},#{createTime},#{updateTime},#{operator}," +
            "#{sort},#{status},#{rafflePoint},#{userId},#{userTime},#{forwardPoint})")
    @SelectKey(statement="select last_insert_id() from dual",before=false,
        resultType = Integer.class, keyColumn="id",keyProperty = "id")
    int insertForId(MtRaffle mtRaffle);
}
