| 夜雨声烦 | 35c9da9 | 2025-05-20 00:12:48 +0800 | [diff] [blame] | 1 | package com.example.g8backend.mapper; |
| 2 | |
| 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| 4 | import com.example.g8backend.entity.UserSignin; |
| 5 | import org.apache.ibatis.annotations.Mapper; |
| 6 | import org.apache.ibatis.annotations.Param; |
| 7 | import org.apache.ibatis.annotations.Select; |
| 8 | |
| 9 | @Mapper |
| 10 | public interface UserSigninMapper extends BaseMapper<UserSignin> { |
| 11 | |
| 12 | @Select("SELECT COUNT(*) FROM user_signin WHERE user_id = #{userId} AND signin_date = #{date}") |
| 13 | boolean existsByUserIdAndDate(@Param("userId") Long userId, @Param("date") String date); |
| 14 | } |