package com.cyksj.mapper.market.sign;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cyksj.model.entity.SignUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;

public interface SignUserMapper extends BaseMapper<SignUser> {
    @Update("update sign_user set day = #{day}, day_period = #{dayPeriod},update_time = current_timestamp() where user_id = #{userId} and update_time = #{originalTime}")
    Integer updateUserSignDay(@Param("day") Integer day, @Param("dayPeriod") Integer dayPeriod, @Param("userId") Long userId, @Param("originalTime") Date originalTime);
}
