diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppSystemController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppSystemController.java
index c3c1b7a5..2c8d9cf3 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppSystemController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/app/AppSystemController.java
@@ -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("取消关注成功");
}
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/backstage/SysMarketController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/backstage/SysMarketController.java
index 6b51ae89..fb08bec0 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/backstage/SysMarketController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/backstage/SysMarketController.java
@@ -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----------------------------------------------------------------
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserNotificationMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserNotificationMapper.java
index 99038fee..998c040d 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserNotificationMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserNotificationMapper.java
@@ -95,4 +95,11 @@ public interface SysUserNotificationMapper
* 注销账户是 删除通知数据
* */
public int deleteSysUserNotificationBySenderId(Long userId);
+
+
+ /**
+ * 取消关注时删除关注通知
+ *
+ */
+ public int deleteSysUserNotificationBySenderIdAndUserId(@Param("userId") Long userId, @Param("followedUserId") Long followedUserId);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserNotificationService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserNotificationService.java
index 1a2ccd08..0064eb11 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserNotificationService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserNotificationService.java
@@ -95,4 +95,11 @@ public interface ISysUserNotificationService
* 注销账户是 删除通知数据
* */
public int deleteSysUserNotificationBySenderId(Long userId);
+
+
+ /**
+ * 取消关注时删除关注通知
+ *
+ */
+ public int deleteSysUserNotificationBySenderIdAndUserId(Long userId, Long followedUserId);
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserNotificationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserNotificationServiceImpl.java
index 71999c9f..a59d7d3f 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserNotificationServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserNotificationServiceImpl.java
@@ -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);
+ }
}
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysUserNotificationMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysUserNotificationMapper.xml
index 33e52249..b90d8129 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysUserNotificationMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysUserNotificationMapper.xml
@@ -152,4 +152,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from sys_user_notification where sender_id = #{userId}
+
+ delete from sys_user_notification where sender_id = #{userId} and user_id = #{followedUserId} and type = '1'
+
\ No newline at end of file