From 4f015b8c624484e0c3b2d88b944163ce43a48d1f Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期六, 27 十一月 2021 17:15:28 +0800
Subject: [PATCH] 功能完善

---
 app/src/main/java/com/yeshi/location/app/service/impl/location/LocationUsersServiceImpl.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/app/src/main/java/com/yeshi/location/app/service/impl/location/LocationUsersServiceImpl.java b/app/src/main/java/com/yeshi/location/app/service/impl/location/LocationUsersServiceImpl.java
index 02a702f..958186a 100644
--- a/app/src/main/java/com/yeshi/location/app/service/impl/location/LocationUsersServiceImpl.java
+++ b/app/src/main/java/com/yeshi/location/app/service/impl/location/LocationUsersServiceImpl.java
@@ -67,6 +67,10 @@
             locationUsers.setId(LocationUsers.createId(locationUsers.getUid(), locationUsers.getTargetUid()));
         }
 
+        if (locationUsers.getUid().equals(locationUsers.getTargetUid())) {
+            throw new Exception("涓嶈兘娣诲姞鑷繁");
+        }
+
         //鏌ヨ涓婚敭ID鏄惁瀛樺湪
         if (locationUsersDao.get(locationUsers.getId()) != null) {
             throw new Exception("宸插瓨鍦�");
@@ -103,12 +107,13 @@
     }
 
     @Override
-    public List<LocationUsers> listMyLocationUser(Long uid, LocationUsers.LocationInviteStatus status, int page, int pageSize) {
+    public List<LocationUsers> listMyLocationUser(Long uid,Long targetUid, LocationUsers.LocationInviteStatus status, int page, int pageSize) {
         DaoQuery daoQuery = new DaoQuery();
         daoQuery.start = (page - 1) * pageSize;
         daoQuery.count = pageSize;
         daoQuery.status = status;
         daoQuery.uid = uid;
+        daoQuery.targetUid = targetUid;
         return locationUsersDao.list(daoQuery);
     }
 

--
Gitblit v1.8.0