package com.fuint.repository.mapper;

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

/**
 * 积分变化表 Mapper 接口
 *
 * Created by FSQ
 * CopyRight https://www.fuint.cn
 */
public interface MtGrowMapper extends BaseMapper<MtGrow> {

    @Insert("insert into mt_grow values (#{id},#{userId},#{signTime},#{consecutiveDays},#{createTime},#{updateTime},#{operator},#{status},#{advNum},#{advTotal},#{growTotal})")
    @SelectKey(statement="select last_insert_id() from dual",before=false,
            resultType = Integer.class, keyColumn="id",keyProperty = "id")
    int insertForId(MtGrow signInfo);
}
