Browse Source

修复小程序端好友操作定时任务BUG

leon 4 years ago
parent
commit
413ec28507

+ 2 - 0
src/main/java/com/mokamrp/privates/task/pangu/SyncFosterwxMobileEdit.java

@@ -99,6 +99,8 @@ public class SyncFosterwxMobileEdit {
                     List<Integer> friendIds = fosterwxMobile.getFriend().stream().map(FosterwxMobileWxfriend::getFriendId).collect(Collectors.toList());
                     addFosterwxMobileHandle.setFriendIds(friendIds);
                     fosterwxMobileWxfriendService.removeAndAdd(addFosterwxMobileHandle);
+                }else{
+                    fosterwxMobileWxfriendService.remove(new QueryWrapper<FosterwxMobileWxfriend>().eq("mobile_id",fosterwxMobile.getId()));
                 }
                 //.立刻更新账号REDIS
                 List<FosterwxMobile> fosterwxMobileList = fosterwxMobileService.list(new QueryWrapper<FosterwxMobile>().eq("station_id", fosterwxMobile.getStationId()));