| | |
| | | @ApiOperation(value = "用户列表-更换绑定人", tags = {"管理后台"}) |
| | | public R<AppUser> select(Long id, Long inviteId) { |
| | | AppUser byId = appUserService.getById(id); |
| | | Long userId = byId.getId(); |
| | | if (userId.equals(inviteId)) { |
| | | return R.fail("不能选择自己为绑定人。"); |
| | | } |
| | | byId.setInviteUserId(inviteId); |
| | | byId.setTopInviteId(getTop(inviteId)); |
| | | appUserService.updateById(byId); |
| | |
| | | } |
| | | |
| | | |
| | | @GetMapping("/listByIds") |
| | | List<AppUser> listByIds(@RequestParam("ids") List<Long> ids) { |
| | | @PostMapping("/listByIds") |
| | | public List<AppUser> listByIds(@RequestParam("ids") List<Long> ids) { |
| | | if(ids.size() == 0){ |
| | | return new ArrayList<>(); |
| | | } |
| | |
| | | /** |
| | | * 设置指定用户的下级用户绑定门店 |
| | | */ |
| | | @PutMapping("setLowerUserShop") |
| | | @PostMapping("/setLowerUserShop") |
| | | public R<Void> setLowerUserShop(@RequestParam("userId") Long userId,@RequestParam("shopId") Integer shopId) { |
| | | appUserService.update(new LambdaUpdateWrapper<AppUser>() |
| | | .set(AppUser::getShopId,shopId) |