luodangjia
2025-01-16 0e1039395827eb8c2cbc4cf85e4ded5f993c9df4
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;