消息--修改--查看新增关注时记录更新时间

This commit is contained in:
haotianmingyue 2024-12-27 19:15:31 +08:00
parent d7dc35bc88
commit 08e0934895
3 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,6 @@
package com.ruoyi.system.mapper;
import java.util.Date;
import java.util.List;
import com.ruoyi.system.domain.SysUserNotification;
import org.apache.ibatis.annotations.Param;
@ -70,5 +71,5 @@ public interface SysUserNotificationMapper
/*
* 读消息
* */
public Long readNotifiaction(@Param("userId") Long userId, @Param("type") String type, @Param("status") String status);
public Long readNotifiaction(@Param("userId") Long userId, @Param("type") String type, @Param("status") String status, @Param("updateTime") Date updateDate);
}

View File

@ -1,5 +1,6 @@
package com.ruoyi.system.service.impl;
import java.util.Date;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.SysUserFollow;
@ -168,6 +169,7 @@ public class SysUserNotificationServiceImpl implements ISysUserNotificationServi
* */
@Override
public Long readNotifiaction(Long userId, String type, String status){
return sysUserNotificationMapper.readNotifiaction(userId, type, status);
Date now = DateUtils.getNowDate();
return sysUserNotificationMapper.readNotifiaction(userId, type, status, now);
}
}

View File

@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<update id="readNotifiaction">
update sys_user_notification
set status = #{status}
set status = #{status}, update_time = #{updateTime}
where user_id = #{userId} and type = #{type}
</update>