From 974c2f29b973d489512146cc8c7fa58448368959 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期五, 29 十一月 2024 14:03:07 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 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 47ee3e3..1deb0cd 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
@@ -23,8 +23,9 @@
 import com.ruoyi.account.api.model.AppUser;
 import com.ruoyi.account.service.AppUserService;
 import com.ruoyi.account.vo.*;
+import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
-import com.ruoyi.common.core.web.page.BaseTable;
+import com.ruoyi.common.core.web.page.TableDataInfo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -32,6 +33,7 @@
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 /**
  * <p>
@@ -109,9 +111,10 @@
 	@ResponseBody
 	@GetMapping("/getNearbyReferrer")
 	@ApiOperation(value = "获取附近推荐人列表")
-	public AjaxResult<BaseTable<NearbyReferrerVo>> getNearbyReferrer(NearbyReferrer nearbyReferrer){
-		BaseTable<NearbyReferrerVo> baseTable = appUserService.getNearbyReferrer(nearbyReferrer);
-		return AjaxResult.success(baseTable);
+	public TableDataInfo<NearbyReferrerVo> getNearbyReferrer(NearbyReferrer nearbyReferrer){
+		startPage();
+		List<NearbyReferrerVo> list = appUserService.getNearbyReferrer(nearbyReferrer);
+		return getDataTable(list);
 	}
 
 
@@ -119,7 +122,7 @@
 	@PostMapping("/info")
 	@ApiOperation(value = "我的资料", tags = {"小程序-个人中心首页-我的资料"})
 	public R<AppUser> info(){
-		Long userId = tokenService.getLoginUserApplet().getUserId();
+		Long userId = tokenService.getLoginUserApplet().getUserid();
 		AppUser user = appUserService.getById(userId);
 		return R.ok(user);
 	}
@@ -130,7 +133,7 @@
 	@PostMapping("/unregis")
 	@ApiOperation(value = "注销", tags = {"小程序-个人中心首页-我的资料"})
 	public R unregis(){
-		Long userId = tokenService.getLoginUserApplet().getUserId();
+		Long userId = tokenService.getLoginUserApplet().getUserid();
 		AppUser user = appUserService.getById(userId);
 
 		//添加注销记录
@@ -148,7 +151,7 @@
 	@ApiOperation(value = "个人中心首页", tags = {"小程序-个人中心首页"})
 	public R<AppUser> index(){
         System.err.println("=-====");
-        Long userId = tokenService.getLoginUserApplet().getUserId();
+        Long userId = tokenService.getLoginUserApplet().getUserid();
 		//当前用户信息
 		AppUser user = appUserService.getById(userId);
 		//当前用户的推荐人信息
@@ -163,7 +166,7 @@
 				user.setShopName(storeById.getData().getName());
 			}
 		}
-		Long count1 = appUserService.lambdaQuery().eq(AppUser::getVipId, 1).eq(AppUser::getTopInviteId, userId).count();
+		Long count1 = appUserService.lambdaQuery().eq(AppUser::getVipId, 1).eq(AppUser::getTopInviteId, 1).count();
 		Long count2 = appUserService.lambdaQuery().eq(AppUser::getVipId, 2).eq(AppUser::getTopInviteId, userId).count();
 		Long count3 = appUserService.lambdaQuery().eq(AppUser::getVipId, 3).eq(AppUser::getTopInviteId, userId).count();
 		Long count4 = appUserService.lambdaQuery().eq(AppUser::getVipId, 4).eq(AppUser::getTopInviteId, userId).count();

--
Gitblit v1.7.1