From 559ee10df3622e4802ca5664b83b713cd3a75f97 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期一, 25 十一月 2024 11:42:40 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java | 76 ++++++++++++++++++++++++++++---------- 1 files changed, 56 insertions(+), 20 deletions(-) diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java index 678b09f9..3318a24 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java @@ -1,6 +1,20 @@ package com.ruoyi.account.controller; +import com.ruoyi.account.api.model.AppUser; +import com.ruoyi.account.service.AppUserService; +import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.security.service.TokenService; +import org.junit.Test; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; + +import javax.annotation.Resource; +import java.util.List; import com.ruoyi.account.vo.*; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.BaseTable; @@ -20,12 +34,12 @@ @RestController @RequestMapping("/app-user") public class AppUserController { - - - - - - + + + + + + @ResponseBody @PostMapping("/appletLogin") @ApiOperation(value = "小程序一键登录", tags = {"登录注册-小程序"}) @@ -33,8 +47,8 @@ // todo 待完善 pu return AjaxResult.success(); } - - + + @ResponseBody @PostMapping("/mobileLogin") @ApiOperation(value = "手机号登录", tags = {"登录注册-小程序"}) @@ -42,9 +56,9 @@ // todo 待完善 pu return AjaxResult.success(); } - - - + + + @ResponseBody @PostMapping("/getSMSCode") @ApiOperation(value = "获取短信验证码", tags = {"登录注册-小程序"}) @@ -52,9 +66,9 @@ // todo 待完善 pu return AjaxResult.success(); } - - - + + + @ResponseBody @PostMapping("/registerAccount") @ApiOperation(value = "注册新账号", tags = {"登录注册-小程序"}) @@ -62,8 +76,8 @@ // todo 待完善 pu return AjaxResult.success(); } - - + + @ResponseBody @GetMapping("/getReferrer/{id}") @ApiOperation(value = "获取推荐人信息", tags = {"登录注册-小程序"}) @@ -74,9 +88,9 @@ // todo 待完善 pu return AjaxResult.success(); } - - - + + + @ResponseBody @GetMapping("/getNearbyReferrer") @ApiOperation(value = "获取附近推荐人列表", tags = {"登录注册-小程序"}) @@ -84,6 +98,28 @@ // todo 待完善 pu return AjaxResult.success(); } - + + @Resource + private TokenService tokenService; + @Resource + private AppUserService appUserService; + @PostMapping("/index") + @ApiOperation(value = "个人中心首页", tags = {"小程序-个人中心首页"}) + @Test + public void index(){ + System.err.println("=-===="); +// Long userId = tokenService.getLoginUserApplet().getUserId(); + } + public void test(Long userId,Integer count){ + List<AppUser> list = appUserService.lambdaQuery().eq(AppUser::getInviteUserId, userId).list(); + count = count + list.size(); + for (AppUser appUser : list) { + test(appUser.getId(),count); + } + + + } + + } -- Gitblit v1.7.1