From 0e1039395827eb8c2cbc4cf85e4ded5f993c9df4 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期四, 16 一月 2025 11:05:05 +0800 Subject: [PATCH] 12.18 --- ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 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 01a39c9..f581ba4 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 @@ -9,6 +9,7 @@ import com.ruoyi.account.api.model.UserCancellationLog; import com.ruoyi.account.api.model.UserCoupon; import com.ruoyi.account.api.model.UserSignRecord; +import com.ruoyi.account.distributedservice.DistributedService; import com.ruoyi.account.mapper.AppUserMapper; import com.ruoyi.account.service.AppUserService; import com.ruoyi.account.service.UserCancellationLogService; @@ -111,6 +112,8 @@ private UserCancellationLogService userCancellationLogService; @Resource private BalanceChangeRecordService balanceChangeRecordService; + @Resource + private DistributedService distributedService; @ResponseBody @@ -187,7 +190,7 @@ @PostMapping("/registerAccount") @ApiOperation(value = "注册新账号") public R<LoginVo> registerAccount(@RequestBody RegisterAccount registerAccount) { - return appUserService.registerAccount(registerAccount); + return distributedService.registerAccount(registerAccount,registerAccount.getPhone()); } @@ -550,8 +553,8 @@ DangerInfoDto dangerInfoDto = new DangerInfoDto(); BeanUtils.copyProperties(data, dangerInfoDto); List<UserPoint> list1 = userPointService.lambdaQuery().eq(UserPoint::getType, 1).ge(UserPoint::getCreateTime, now.minusDays(data.getKeepBuyDay())).list(); - List<UserPoint> list2 = userPointService.lambdaQuery().eq(UserPoint::getType, 2).ge(UserPoint::getCreateTime, now.minusDays(data.getKeepBuyDay())).list(); - List<UserPoint> list3 = userPointService.lambdaQuery().eq(UserPoint::getType, 5).ge(UserPoint::getCreateTime, now.minusDays(data.getKeepBuyDay())).list(); + List<UserPoint> list2 = userPointService.lambdaQuery().eq(UserPoint::getType, 9).ge(UserPoint::getCreateTime, now.minusDays(data.getKeepBuyDay())).list(); + List<UserPoint> list3 = userPointService.lambdaQuery().eq(UserPoint::getType, 8).ge(UserPoint::getCreateTime, now.minusDays(data.getKeepBuyDay())).list(); Integer userKeepBuyPoint = 0; for (UserPoint userPoint : list1) { userKeepBuyPoint = userPoint.getVariablePoint() + userKeepBuyPoint; @@ -676,7 +679,7 @@ List<AppUser> list = appUserService.lambdaQuery().eq(AppUser::getInviteUserId, id).list(); byId.setBottomUsers(list); //消费总金额 - R<List<Order>> orderR = remoteOrderGoodsClient.byShopId(sysUser.getObjectId()); + R<List<Order>> orderR = remoteOrderGoodsClient.byShopIdAndUserId(id,sysUser.getObjectId()); List<Order> orderList = orderR.getData(); if (!CollectionUtils.isEmpty(orderList)){ BigDecimal paymentAmount = orderList.stream().map(Order::getPaymentAmount).reduce(BigDecimal.ZERO, BigDecimal::add); @@ -726,7 +729,7 @@ public R<List<Order>> orders(Long id) { Long userid = tokenService.getLoginUser().getUserid(); SysUser sysUser = sysUserClient.getSysUser(userid).getData(); - Long shopId = Long.valueOf(sysUser.getObjectId()); + Integer shopId = sysUser.getObjectId(); R<List<Order>> listR = remoteOrderGoodsClient.byUserId(id,shopId); return R.ok(listR.getData()); -- Gitblit v1.7.1