| | |
| | | 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("已存在"); |
| | |
| | | } |
| | | |
| | | @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); |
| | | } |
| | | |