| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.api.model.UserCancellationLog; |
| | | import com.ruoyi.account.api.model.UserCoupon; |
| | |
| | | public R<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){ |
| | | return appUserService.mobileLogin(mobileLogin); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | Long userId = tokenService.getLoginUserApplet().getUserid(); |
| | | AppUser user = appUserService.getById(userId); |
| | | |
| | | List<UserSignRecord> list = userSignRecordService.lambdaQuery().eq(UserSignRecord::getSignDay, LocalDate.now()).list(); |
| | | if (!list.isEmpty()){ |
| | | user.setIsSign(1); |
| | | }else { |
| | | user.setIsSign(0); |
| | | } |
| | | |
| | | |
| | | return R.ok(user); |
| | | } |
| | |
| | | user.setCount5(count5); |
| | | user.setCount6(count6); |
| | | user.setCount7(count7); |
| | | |
| | | List<UserSignRecord> list = userSignRecordService.lambdaQuery().eq(UserSignRecord::getSignDay, LocalDate.now()).list(); |
| | | if (!list.isEmpty()){ |
| | | user.setIsSign(1); |
| | | }else { |
| | | user.setIsSign(0); |
| | | } |
| | | return R.ok(user); |
| | | |
| | | |
| | |
| | | AppUser superiorLeader = appUserService.getSuperiorLeader(id); |
| | | return R.ok(superiorLeader); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/onlineRecord") |
| | | @ApiOperation(value = "10分钟定时任务调用,记录用户在线时长", tags = {"小程序-个人中心首页"}) |
| | | public R onlineRecord(){ |
| | | appUserService.onlineRecord(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户列表 |
| | | */ |
| | | @GetMapping("/getAppuserPage") |
| | | @ApiOperation(value = "用户列表", tags = {"管理后台"}) |
| | | public R<IPage<AppUser>> getAppuserPage(@ApiParam("页码") @RequestParam Integer pageNum, |
| | | @ApiParam("每一页数据大小") Integer pageSize, |
| | | AppUser appUser) |
| | | { |
| | | IPage<AppUser> appuserPage = appUserService.getAppuserPage(pageNum, pageSize, appUser); |
| | | return R.ok(appuserPage); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getAppUserByPhone") |
| | | public R<AppUser> getAppUserByPhone(String phone){ |
| | | AppUser appUser = appUserService.lambdaQuery().eq(AppUser::getPhone, phone).one(); |
| | | return R.ok(appUser); |
| | | } |
| | | |
| | | |
| | | |