Pu Zhibing
2024-09-27 d153ca8d05991566bed18eed1ae25f0af3c1cc70
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
@@ -223,6 +223,7 @@
        Page<TAppUser> page = appUserService.lambdaQuery()
                .like(userListQueryDto.getUserPhone() != null && !"".equals(userListQueryDto.getUserPhone()), TAppUser::getPhone, userListQueryDto.getUserPhone())
                .eq(userListQueryDto.getCompanyId() != null, TAppUser::getCompanyId, userListQueryDto.getCompanyId())
                .eq(userListQueryDto.getProvinceCode() != null && !"".equals(userListQueryDto.getProvinceCode()), TAppUser::getProvinceCode, userListQueryDto.getProvinceCode())
                .eq(userListQueryDto.getCityCode() != null && !"".equals(userListQueryDto.getCityCode()), TAppUser::getCityCode, userListQueryDto.getCityCode())
                .eq(userListQueryDto.getStatus() != null, TAppUser::getStatus, userListQueryDto.getStatus())
                .eq(userListQueryDto.getVipTypeId() != null, TAppUser::getVipId, userListQueryDto.getVipTypeId())
@@ -294,6 +295,7 @@
                .ge(TAppUser::getVipEndTime, LocalDateTime.now())
                .like(userListQueryDto.getUserPhone() != null && !"".equals(userListQueryDto.getUserPhone()), TAppUser::getPhone, userListQueryDto.getUserPhone())
                .eq(userListQueryDto.getCompanyId() != null, TAppUser::getCompanyId, userListQueryDto.getCompanyId())
                .eq(userListQueryDto.getProvinceCode() != null && !"".equals(userListQueryDto.getProvinceCode()), TAppUser::getProvinceCode, userListQueryDto.getProvinceCode())
                .eq(userListQueryDto.getCityCode() != null && !"".equals(userListQueryDto.getCityCode()), TAppUser::getCityCode, userListQueryDto.getCityCode())
                .eq(userListQueryDto.getStatus() != null, TAppUser::getStatus, userListQueryDto.getStatus())
                .eq(userListQueryDto.getVipTypeId() != null, TAppUser::getVipId, userListQueryDto.getVipTypeId())
@@ -672,7 +674,7 @@
            plusDay = 12;
        }
        //增加vipDetail
        giveVipUtil.sendVip(nowUser, giveVipDto.getVipId(),plusDay);
        giveVipUtil.sendVip(nowUser, giveVipDto.getVipId(),plusDay,giveVipDto.getType());
        appUserService.updateById(nowUser);
        }
        return R.ok();
@@ -976,10 +978,17 @@
            pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+point,5,userId,appUserCar.getLicensePlate(),"","");
            byId.setPoints(byId.getPoints()+point);
            byId.setFirstAdd(1);
            appUserService.updateById(byId);
        }
        CarNumDto carNumDto = CarUtil.carNum(appUserCar.getLicensePlate());
        if (carNumDto==null){
            return R.fail("请输入正确的车牌");
        }
        byId.setCityCode(carNumDto.getAreaCode());
        byId.setProvinceCode(carNumDto.getAreaCode().substring(0,2)+"0000");
        appUserService.updateById(byId);
        //
        appUserCarService.saveOrUpdate(appUserCar);
@@ -1049,5 +1058,17 @@
        return R.ok(jsonObject.getJSONObject("data"));
    }
    @PostMapping(value = "/user/editAppUserInfo")
    @ApiOperation(value = "修改个人信息", tags = {"小程序-个人中心"})
    public AjaxResult editAppUserInfo(@RequestBody TAppUser appUser){
        Long userId = tokenService.getLoginUserApplet().getUserId();
        appUser.setId(userId);
        appUserService.updateById(appUser);
        return AjaxResult.success();
    }
}