| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getServiceProvider") |
| | | public R<Shop> getServiceProvider(Long userId){ |
| | | public R<Shop> getServiceProvider(@RequestParam("appUserId") Long appUserId){ |
| | | //向上找获取第一个开店的门店 |
| | | List<Shop> list = shopService.list(new LambdaQueryWrapper<Shop>().eq(Shop::getDelFlag, 0).eq(Shop::getStatus, 1)); |
| | | AppUser appUser = appUserClient.getAppUserById(userId); |
| | | AppUser appUser = appUserClient.getAppUserById(appUserId); |
| | | //上级集合,防止循环关联 |
| | | Set<Long> pid = new HashSet<>(); |
| | | Shop shop = getSuperiorStore(appUser, list, 1, 1, pid); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/getSuperiorServiceProvider") |
| | | public R<Shop> getSuperiorServiceProvider(Long userId){ |
| | | public R<Shop> getSuperiorServiceProvider(@RequestParam("appUserId") Long appUserId){ |
| | | //向上找获取第一个开店的门店 |
| | | List<Shop> list = shopService.list(new LambdaQueryWrapper<Shop>().eq(Shop::getDelFlag, 0).eq(Shop::getStatus, 1)); |
| | | AppUser appUser = appUserClient.getAppUserById(userId); |
| | | AppUser appUser = appUserClient.getAppUserById(appUserId); |
| | | //上级集合,防止循环关联 |
| | | Set<Long> pid = new HashSet<>(); |
| | | Shop shop = getSuperiorStore(appUser, list, 2, 1, pid); |