| | |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/app-user") |
| | | public class AppUserController { |
| | | @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); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |