| | |
| | | return R.ok(vipService.getById(id)); |
| | | } |
| | | |
| | | @GetMapping(value = "/getVipList") |
| | | public R<List<TVip>> getVipList(){ |
| | | return R.ok(vipService.lambdaQuery().eq(TVip::getReveal, 1).list()); |
| | | } |
| | | |
| | | /** |
| | | * 远程调用 |
| | | * @param id |
| | |
| | | GetAppUserVipDetail getAppUserVipDetail = new GetAppUserVipDetail(); |
| | | getAppUserVipDetail.setAppUserId(userId); |
| | | getAppUserVipDetail.setVipId(data.getVipId()); |
| | | TAppUserVipDetail data1 = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail).getData(); |
| | | R<TAppUserVipDetail> appUserVipDetail = vipDetailClient.getAppUserVipDetail(getAppUserVipDetail); |
| | | TAppUserVipDetail data1 = appUserVipDetail.getData(); |
| | | String vipJson = data1.getVipJson(); |
| | | TVip tVip = JSON.parseObject(vipJson, TVip.class); |
| | | vips.add(tVip); |
| | |
| | | vipInfoDto.setTotalDiscount(total); |
| | | |
| | | vipInfoDto.setTimeAmount(vip.getMaximumDeduction().multiply(BigDecimal.valueOf(vip.getDiscountTimes()))); |
| | | vipInfoDtos.add(vipInfoDto); |
| | | } |
| | | vipInfoDto.setType(vip.getType()); |
| | | vipInfoDtos.add(vipInfoDto); |
| | | |
| | | } |
| | | return R.ok(vipInfoDtos); |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "购买会员", tags = {"小程序-个人中心"}) |
| | | @GetMapping("/vipInfo/pay") |
| | | public R vipInfoPay(@RequestParam("vipId")Integer vipId,@RequestParam("buyType") Integer buyType, |
| | | public Object vipInfoPay(@RequestParam("vipId")Integer vipId,@RequestParam("buyType") Integer buyType, |
| | | @RequestParam("payType") Integer payType |
| | | ) { |
| | | |
| | |
| | | |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | |
| | | return R.ok(vipService.vipInfoPay(byId,payMoney,payType,discountMoney,discount,buyType,userId)); |
| | | return vipService.vipInfoPay(byId,payMoney,payType,discountMoney,discount,buyType,userId); |
| | | } |
| | | } |
| | | |