| package com.example.g8backend.mapper; |
| |
| import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| import com.example.g8backend.entity.UserSignin; |
| import org.apache.ibatis.annotations.Mapper; |
| import org.apache.ibatis.annotations.Param; |
| import org.apache.ibatis.annotations.Select; |
| |
| @Mapper |
| public interface UserSigninMapper extends BaseMapper<UserSignin> { |
| |
| @Select("SELECT COUNT(*) FROM user_signin WHERE user_id = #{userId} AND signin_date = #{date}") |
| boolean existsByUserIdAndDate(@Param("userId") Long userId, @Param("date") String date); |
| } |