| | |
| | | import com.ruoyi.common.security.auth.AuthUtil; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.goods.api.model.OrderQuery; |
| | | import com.ruoyi.management.api.feignClient.ManagementClient; |
| | | import com.ruoyi.management.api.model.*; |
| | | import com.ruoyi.management.api.query.UseGuideQuery; |
| | |
| | | TUser byId = userService.getById(id); |
| | | return R.ok(byId); |
| | | } |
| | | |
| | | @PostMapping("/listAll") |
| | | public R<List<TUser>> listAll(@RequestBody OrderQuery query){ |
| | | List<TUser> list = userService.lambdaQuery() |
| | | .like(StringUtils.hasLength(query.getUserName()), TUser::getName, query.getUserName()) |
| | | .like(StringUtils.hasLength(query.getPhone()), TUser::getPhone, query.getPhone()).list(); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/vipInfoStudy") |
| | | @ApiOperation(value = "会员中心-获取会员说明、当前登录用户是否为会员、会员购买规格", tags = {"学习端-个人中心"}) |
| | |
| | | study.setPair(Constants.BURDEN_ONE); |
| | | userStudyService.save(study); |
| | | } |
| | | map.put("lookVideo", tUser1.getLookVideo()==null?0:tUser1.getLookVideo()); |
| | | return R.ok(map); |
| | | } |
| | | |
| | |
| | | } |
| | | return R.ok(byId); |
| | | } |
| | | @PostMapping("/lookVideo") |
| | | @ApiOperation(value = "看完操作视频调用", tags = {"家长端-登录"}) |
| | | public R<TUser> lookVideo() { |
| | | LoginUserParent loginUserStudy = tokenService.getLoginUser1(); |
| | | if (null == loginUserStudy) { |
| | | return R.tokenError("登录失效!"); |
| | | } |
| | | TUser byId = userService.getById(loginUserStudy.getUserid()); |
| | | byId.setLookVideo(1); |
| | | userService.updateById(byId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/deleteUser") |
| | | @ApiOperation(value = "注销当前帐号", tags = {"家长端-个人中心"}) |
| | |
| | | @ApiOperation(value = "用户列表", tags = {"管理后台-用户管理"}) |
| | | public R<PageInfo<AppUserVO>> couponReceive(@RequestBody AppUserQuery query) { |
| | | PageInfo<AppUserVO> res = new PageInfo<>(query.getPageNumber(), query.getPageSize()); |
| | | List<AppUserVO> list = userService.listAll(query); |
| | | List<AppUserVO> list = userService.listAll(query,res); |
| | | for (AppUserVO appUserVO : list) { |
| | | if (appUserVO.getVipEndTime() == null) { |
| | | appUserVO.setIsVip(0); |
| | |
| | | } |
| | | } |
| | | res.setRecords(list); |
| | | res.setTotal(list.size()); |
| | | return R.ok(res); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "列表查询", tags = {"管理后台-会员管理"}) |
| | | public R<PageInfo<VipOrderVO>> vipOrderList(@RequestBody AppUserQuery query) { |
| | | PageInfo<VipOrderVO> res = new PageInfo<>(query.getPageNumber(), query.getPageSize()); |
| | | List<VipOrderVO> list = vipOrderService.listAll(query); |
| | | List<VipOrderVO> list = vipOrderService.listAll(query,res); |
| | | res.setRecords(list); |
| | | res.setTotal(list.size()); |
| | | return R.ok(res); |
| | | } |
| | | } |