无关风月
2024-08-27 e86ed626de30e3e60ba5e1294b0d134546ac5b4d
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
@@ -523,6 +523,7 @@
            tAppUserCar.setUid(tAppUserCar.getId().toString());
        }
        appUserInfoDto.setUserCars(list);
        appUserInfoDto.setFirstAdd(byId.getFirstAdd()!=null?byId.getFirstAdd():0);
        return R.ok(appUserInfoDto);
@@ -550,7 +551,8 @@
    }
    @ApiOperation(value = "优惠卷列表不分页(1可使用2不可用)", tags = {"小程序-个人中心"})
    @ApiOperation(value = "优惠卷详情(1可使用2不可用)", tags = {"小程序-个人中心"})
    @PostMapping(value = "/user/coupon/getById")
    public R<TAppCoupon> couponGetById(@RequestParam("id")Long id) {
        TAppCoupon appCoupon = appCouponService.getById(id);
@@ -614,7 +616,7 @@
    @ApiOperation(value = "更换手机号", tags = {"小程序-用户管理-更换手机号"})
    @PostMapping(value = "/user/updatePhone")
    public AjaxResult<String> updatePhone(@Validated @RequestBody UpdatePhoneDTO dto) {
        String code = redisService.getCacheObject(dto.getPhone() + Constants.APPLET);
        String code = redisService.getCacheObject(dto.getPhone() + Constants.UPDATE_PHONE);
        if(StringUtils.isEmpty(code)){
            return AjaxResult.error("验证码已过期,请重新获取验证码!");
        }
@@ -820,6 +822,7 @@
            //增加积分记录
            pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+point,5,userId,appUserCar.getLicensePlate(),"");
            byId.setPoints(byId.getPoints()+point);
            byId.setFirstAdd(1);
            appUserService.updateById(byId);
@@ -853,7 +856,7 @@
    }
    @ApiOperation(value = "根据品牌获取车型", tags = {"小程序-个人中心-车辆"})
    @ApiOperation(value = "根据品牌获取车系", tags = {"小程序-个人中心-车辆"})
    @GetMapping(value = "/user/car/getModel")
    public R getModel(String id) throws Exception {
        String modelById = CarBrandUtil.getModelById(id);
@@ -867,5 +870,20 @@
        }
        return R.ok(backList);
    }
    @ApiOperation(value = "根据车系获取车型", tags = {"小程序-个人中心-车辆"})
    @GetMapping(value = "/user/car/getSeries")
    public R getSeries(String id) throws Exception {
        String modelById = CarBrandUtil.getSeriesById(id);
        JSONObject jsonObject = JSON.parseObject(modelById);
        JSONArray data = jsonObject.getJSONArray("data");
        JSONArray backList = new JSONArray();
        for (Object datum : data) {
            JSONObject jsonObject1 = JSON.parseObject(datum.toString());
            JSONArray list = jsonObject1.getJSONArray("list");
            backList.addAll(list);
        }
        return R.ok(backList);
    }
}