修改--取消关注时删除sys_user_notification中的数据
This commit is contained in:
parent
1ea69507c5
commit
3027abd140
@ -126,6 +126,8 @@ public class AppSystemController extends BaseController {
|
||||
private IDailySourceService dailySourceService;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 账号密码登录
|
||||
*
|
||||
@ -1728,6 +1730,9 @@ public class AppSystemController extends BaseController {
|
||||
userInfo1.setFollowers(userInfo1.getFollowers()-1);
|
||||
userInfoService.updateUserInfo(userInfo1);
|
||||
|
||||
// 删除消息通知
|
||||
userNotificationService.deleteSysUserNotificationBySenderIdAndUserId(userId, followedUserId);
|
||||
|
||||
return success("取消关注成功");
|
||||
|
||||
}
|
||||
|
||||
@ -54,18 +54,18 @@ public class SysMarketController extends BaseController {
|
||||
Long income2 = sysIncomeDtoList.get(0).gettIncome();
|
||||
Long income1 = sysIncomeDtoList.get(1).gettIncome();
|
||||
|
||||
Long incomeChange = income1 - income2;
|
||||
Long incomeChange = income2 - income1;
|
||||
|
||||
success.put("income", income1);
|
||||
success.put("income", income2);
|
||||
success.put("incomeChange", incomeChange);
|
||||
|
||||
|
||||
|
||||
Long refund2 = sysIncomeDtoList.get(0).gettRefund();
|
||||
Long refund1 = sysIncomeDtoList.get(1).gettRefund();
|
||||
Long refundChange = refund1 - refund2;
|
||||
Long refundChange = refund2 - refund1;
|
||||
|
||||
success.put("refund", refund1);
|
||||
success.put("refund", refund2);
|
||||
success.put("refundChange", refundChange);
|
||||
|
||||
//---------------------------------------------真实接口end----------------------------------------------------------------
|
||||
|
||||
@ -95,4 +95,11 @@ public interface SysUserNotificationMapper
|
||||
* 注销账户是 删除通知数据
|
||||
* */
|
||||
public int deleteSysUserNotificationBySenderId(Long userId);
|
||||
|
||||
|
||||
/**
|
||||
* 取消关注时删除关注通知
|
||||
*
|
||||
*/
|
||||
public int deleteSysUserNotificationBySenderIdAndUserId(@Param("userId") Long userId, @Param("followedUserId") Long followedUserId);
|
||||
}
|
||||
|
||||
@ -95,4 +95,11 @@ public interface ISysUserNotificationService
|
||||
* 注销账户是 删除通知数据
|
||||
* */
|
||||
public int deleteSysUserNotificationBySenderId(Long userId);
|
||||
|
||||
|
||||
/**
|
||||
* 取消关注时删除关注通知
|
||||
*
|
||||
*/
|
||||
public int deleteSysUserNotificationBySenderIdAndUserId(Long userId, Long followedUserId);
|
||||
}
|
||||
|
||||
@ -206,4 +206,13 @@ public class SysUserNotificationServiceImpl implements ISysUserNotificationServi
|
||||
public int deleteSysUserNotificationBySenderId(Long userId){
|
||||
return sysUserNotificationMapper.deleteSysUserNotificationBySenderId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消关注时删除关注通知
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysUserNotificationBySenderIdAndUserId(Long userId, Long followedUserId){
|
||||
return sysUserNotificationMapper.deleteSysUserNotificationBySenderIdAndUserId(userId, followedUserId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,4 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<delete id="deleteSysUserNotificationBySenderId">
|
||||
delete from sys_user_notification where sender_id = #{userId}
|
||||
</delete>
|
||||
<delete id="deleteSysUserNotificationBySenderIdAndUserId">
|
||||
delete from sys_user_notification where sender_id = #{userId} and user_id = #{followedUserId} and type = '1'
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue
Block a user