| | |
| | | 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") |
| | |
| | | .in(!types.isEmpty(), TAppUserIntegralChange::getChangeType, types).page(Page.of(pointsQueryDto.getPageCurr(), pointsQueryDto.getPageSize())); |
| | | |
| | | 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) { |
| | |
| | | |
| | | 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 = {"后台-用户管理-用户列表"}) |
| | |
| | | |
| | | } |
| | | |
| | | @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); |
| | |
| | | @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("验证码已过期,请重新获取验证码!"); |
| | | } |
| | |
| | | |
| | | 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) { |