| | |
| | | } |
| | | //当前绑定门店的店铺信息 |
| | | if (user.getShopId() != null) { |
| | | R<Shop> storeById = storeClient.getStoreById(user.getShopId()); |
| | | R<Shop> storeById = shopClient.getShopById(user.getShopId()); |
| | | if (storeById.getData() != null) { |
| | | user.setShopName(storeById.getData().getName()); |
| | | } |
| | |
| | | */ |
| | | @GetMapping("/getAppuserPage") |
| | | @ApiOperation(value = "用户列表", tags = {"管理后台"}) |
| | | public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageCurr, |
| | | public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageNum, |
| | | @ApiParam("每一页数据大小") Integer pageSize, |
| | | AppUser appUser) { |
| | | IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageCurr, pageSize, appUser); |
| | | IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageNum, pageSize, appUser); |
| | | for (AppUser record : appuserPage.getRecords()) { |
| | | if (record.getInviteUserId() != null) { |
| | | AppUser byId1 = appUserService.getById(record.getInviteUserId()); |
| | | if (byId1!=null) { |
| | | record.setInviteUserName(byId1.getName()); |
| | | } |
| | | } |
| | | if (record.getShopId()!=null){ |
| | | R<Shop> shopById = shopClient.getShopById(record.getShopId()); |
| | | if (shopById.getData()!=null){ |
| | | record.setShopName(shopById.getData().getName()); |
| | | } |
| | | } |
| | | } |
| | | return R.ok(appuserPage); |
| | | } |
| | | |
| | |
| | | |
| | | @GetMapping("/change/shop") |
| | | @ApiOperation(value = "用户列表-更换门店", tags = {"管理后台"}) |
| | | public R<AppUser> shop(Long id, Long shopId) { |
| | | public R<AppUser> shop(Long id, Integer shopId) { |
| | | AppUser byId = appUserService.getById(id); |
| | | byId.setShopId(shopId); |
| | | appUserService.updateById(byId); |
| | |
| | | //推广人 |
| | | if (byId.getInviteUserId() != null) { |
| | | AppUser byId1 = appUserService.getById(byId.getInviteUserId()); |
| | | byId1.setInviteUserName(byId1.getInviteUserName()); |
| | | byId.setInviteUserName(byId1.getInviteUserName()); |
| | | } |
| | | //最后下单时间 |
| | | R<Order> lastOrder = remoteOrderGoodsClient.getLastOrder(id); |
| | |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 检查会员等级变更 |
| | | * @param appUserId |
| | | */ |
| | | @PostMapping("/vipUpgrade") |
| | | public void vipUpgrade(@RequestParam("appUserId") Long appUserId){ |
| | | appUserService.vipUpgrade(appUserId); |
| | | } |
| | | } |
| | | |