2026-05-09 21:29:18 +09:00
|
|
|
package com.ga.common.notification;
|
|
|
|
|
|
|
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
2026-06-12 23:40:28 +09:00
|
|
|
/**
|
|
|
|
|
* 앱 내 알림 DB 매퍼 (MyBatis). deleteOld는 보존기간 지난 알림을 배치로 정리할 때 쓴다.
|
|
|
|
|
*/
|
2026-05-09 21:29:18 +09:00
|
|
|
@Mapper
|
|
|
|
|
public interface NotificationMapper {
|
|
|
|
|
int insert(NotificationVO vo);
|
|
|
|
|
int insertBatch(@Param("list") List<NotificationVO> list);
|
|
|
|
|
List<NotificationVO> selectByUser(@Param("userId") Long userId);
|
|
|
|
|
int countUnread(@Param("userId") Long userId);
|
|
|
|
|
int markRead(@Param("notiId") Long notiId, @Param("userId") Long userId);
|
|
|
|
|
int markAllRead(@Param("userId") Long userId);
|
|
|
|
|
int deleteOld(@Param("days") int days);
|
|
|
|
|
}
|