| | |
| | | @ApiOperation(value = "用户详情积分明细", tags = {"后台-用户管理-用户列表","小程序-个人中心"}) |
| | | @PostMapping(value = "/user/points/page") |
| | | public R<Page<TAppUserIntegralChange>> pointsDetail(@RequestBody PointsQueryDto pointsQueryDto) { |
| | | if (pointsQueryDto.getUserId()==null){ |
| | | pointsQueryDto.setUserId(tokenService.getLoginUserApplet().getUserId()); |
| | | } |
| | | List<Integer> types = new ArrayList<>(); |
| | | if (pointsQueryDto.getType()!=null){ |
| | | types.add(1); |
| | |
| | | appUserInfoDto.setCouponNum(Math.toIntExact(coupons)); |
| | | //当前绑定的车辆 |
| | | List<TAppUserCar> list = carService.lambdaQuery().eq(TAppUserCar::getAppUserId, userId).list(); |
| | | for (TAppUserCar tAppUserCar : list) { |
| | | tAppUserCar.setUid(tAppUserCar.getId().toString()); |
| | | } |
| | | appUserInfoDto.setUserCars(list); |
| | | return R.ok(appUserInfoDto); |
| | | |
| | |
| | | LoginUserApplet loginUserApplet = tokenService.getLoginUserApplet(); |
| | | Long userId = loginUserApplet.getUserId(); |
| | | TAppUser byId = appUserService.getById(userId); |
| | | |
| | | appUserCar.setAppUserId(userId); |
| | | |
| | | //如果是第一次添加车辆,增加积分 |
| | | Long count = appUserCarService.lambdaQuery().eq(TAppUserCar::getAppUserId, userId).count(); |
| | |
| | | |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "车辆详情", tags = {"小程序-个人中心-车辆"}) |
| | | @GetMapping(value = "/user/car/detail") |
| | | public R<TAppUserCar> carDetail(String id) { |
| | | TAppUserCar byId = appUserCarService.getById(id); |
| | | return R.ok(byId); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取车辆品牌", tags = {"小程序-个人中心-车辆"}) |
| | | @GetMapping(value = "/user/car/getBrands") |