| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | |
| | | @GetMapping("/detail") |
| | | @ApiOperation(value = "用户列表-详情", tags = {"管理后台"}) |
| | | public R<AppUser> detail(Long id, Integer shopId) { |
| | | public R<AppUser> detail(Long id, Integer shopId, Integer pageNum, Integer pageSize) { |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | SysUser sysUser = sysUserClient.getSysUser(userid).getData(); |
| | | AppUser byId = appUserService.getById(id); |
| | |
| | | if (lastOrder.getData() != null) { |
| | | byId.setLastOrderTime(lastOrder.getData().getCreateTime()); |
| | | } |
| | | List<AppUser> list = appUserService.lambdaQuery().eq(AppUser::getInviteUserId, id).list(); |
| | | byId.setBottomUsers(list); |
| | | Page<AppUser> page = appUserService.page(Page.of(pageNum, pageSize), new LambdaQueryWrapper<AppUser>().eq(AppUser::getInviteUserId, id)); |
| | | byId.setBottomUsersPage(page); |
| | | //消费总金额 |
| | | if(null == shopId || 1 == sysUser.getRoleType()){ |
| | | shopId = -1; |