zhibing.pu
2024-08-26 9f35dc84a6af0a9019e5ae2c8ac4b2c8e2c99fe9
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
@@ -116,7 +116,20 @@
    private TInviteUserService inviteUserService;
    /**
     * 远程调用 积分兑换订单 退款回退积分
     * @return
     */
    @PostMapping(value = "/refundPoints/{param}")
    public R refundPoints(@PathVariable("param")String param) {
        String[] split = param.split("-");
        String userId = split[0];
        String points = split[1];
        TAppUser byId = appUserService.getById(userId);
        byId.setPoints(byId.getPoints()+Integer.parseInt(points));
        appUserService.updateById(byId);
        return R.ok();
    }
    @ApiOperation(value = "查询当前用户是否为会员 0否1是", tags = {"小程序--查询当前用户是否为会员"})
    @PostMapping(value = "/getUserInfo")
@@ -424,6 +437,7 @@
        for (TAppUserIntegralChange record : page.getRecords()) {
            record.setDateTime(record.getCreateTime());
            record.setUid(record.getId().toString());
            if (record.getChangeType()==2){
                R<TChargingOrder> tChargingOrderR = chargingOrderClient.orderDetail(Long.valueOf(record.getExtension()));
                if (tChargingOrderR.getData()!=null) {
@@ -440,6 +454,13 @@
        return R.ok(page);
    }
    @ApiOperation(value = "积分详情", tags = {"小程序-个人中心"})
    @GetMapping(value = "/user/points/detail")
    public R<TAppUserIntegralChange> pointsDetail(String id) {
        TAppUserIntegralChange byId = integralChangeService.getById(id);
        return R.ok(byId);
    }
    @ApiOperation(value = "冻结解冻用户", tags = {"后台-用户管理-用户列表"})
@@ -529,7 +550,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);
@@ -593,7 +615,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("验证码已过期,请重新获取验证码!");
        }
@@ -809,6 +831,12 @@
        return R.ok();
    }
    @ApiOperation(value = "添加编辑车辆", tags = {"小程序-个人中心-车辆"})
    @DeleteMapping(value = "/user/car/delete")
    public R carDelete(String id) {
        boolean b = appUserCarService.removeById(id);
        return R.ok();
    }
    @ApiOperation(value = "车辆详情", tags = {"小程序-个人中心-车辆"})
    @GetMapping(value = "/user/car/detail")
    public R<TAppUserCar> carDetail(String id) {