Pu Zhibing
2025-01-16 c137760697814b57c8ccb92cb1e0ed9d873f3045
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java
@@ -162,6 +162,7 @@
        appUserForPhoe.setTotalAvailablePoint(appUserForPhoe.getTotalAvailablePoint() + point);
        appUserService.updateById(appUserForPhoe);
        //构建积分流水记录
        if(point > 0){
        UserPoint userPoint = new UserPoint();
        userPoint.setType(12);
        userPoint.setHistoricalPoint(lavePoint1);
@@ -170,6 +171,7 @@
        userPoint.setCreateTime(LocalDateTime.now());
        userPoint.setAppUserId(appUserForPhoe.getId());
        userPointService.save(userPoint);
        }
        Integer lavePoint = appUser.getLavePoint();
        appUser.setLavePoint(appUser.getLavePoint() - point);
@@ -177,7 +179,8 @@
        appUser.setAvailablePoint(appUser.getAvailablePoint() - point);
        appUserService.updateById(appUser);
        //构建积分流水记录
        userPoint = new UserPoint();
        if(point > 0){
            UserPoint userPoint = new UserPoint();
        userPoint.setType(13);
        userPoint.setHistoricalPoint(lavePoint);
        userPoint.setVariablePoint(point);
@@ -185,6 +188,7 @@
        userPoint.setCreateTime(LocalDateTime.now());
        userPoint.setAppUserId(appUser.getId());
        userPointService.save(userPoint);
        }
        return R.ok();
    }