xuhy
2025-01-15 48c56a8b6be6183d220f46d417fdeb98521f0c20
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -676,7 +676,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);
@@ -724,7 +724,10 @@
    @GetMapping("/orders")
    @ApiOperation(value = "用户列表-订单列表", tags = {"管理后台"})
    public R<List<Order>> orders(Long id) {
        R<List<Order>> listR = remoteOrderGoodsClient.byUserId(id);
        Long userid = tokenService.getLoginUser().getUserid();
        SysUser sysUser = sysUserClient.getSysUser(userid).getData();
        Integer shopId = sysUser.getObjectId();
        R<List<Order>> listR = remoteOrderGoodsClient.byUserId(id,shopId);
        return R.ok(listR.getData());
    }
@@ -995,6 +998,17 @@
    
    
    /**
     * 检查会员降级
     * @param appUserId
     */
    @PostMapping("/app-user/vipDemotion")
    public void vipDemotion(@RequestParam("appUserId") Long appUserId){
        appUserService.vipDemotion(appUserId);
    }
    /**
     * 用户降级检测
     */
    @PostMapping("/demotionDetection")