package com.liquidnet.service.kylin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liquidnet.service.kylin.entity.KylinRewardCode;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface KylinRewardCodeMapper extends BaseMapper<KylinRewardCode> {

    @Select("SELECT * FROM kylin_reward_code WHERE mid = #{mid}")
    KylinRewardCode selectByMid(@Param("mid") Long mid);

    @Update("update kylin_reward_code set state=#{state} where mid=#{mid}")
    int updateByMid(@Param("mid") Long mid, @Param("state") int state);
}
