| | |
| | | import com.ruoyi.order.api.model.TGrantVip; |
| | | import com.ruoyi.other.api.domain.*; |
| | | import com.ruoyi.other.api.domain.TCoupon; |
| | | import com.ruoyi.other.api.domain.TVip; |
| | | import com.ruoyi.other.api.dto.UnitListQueryDto; |
| | | import com.ruoyi.other.api.feignClient.IntegralRuleClient; |
| | | import com.ruoyi.other.api.feignClient.OtherClient; |
| | |
| | | |
| | | |
| | | @ApiOperation(value = "优惠卷详情(1可使用2不可用)", tags = {"小程序-个人中心"}) |
| | | @GetMapping(value = "/user/coupon/getById") |
| | | @PostMapping(value = "/user/coupon/getById") |
| | | public R<TAppCoupon> couponGetById(@RequestParam("id")Long id) { |
| | | TAppCoupon appCoupon = appCouponService.getById(id); |
| | | appCoupon.setUid(id.toString()); |
| | |
| | | TVip info = vipClient.getInfo1(giveVipDto.getVipId()).getData(); |
| | | switch (giveVipDto.getType()){ |
| | | case 1: |
| | | bigDecimal = bigDecimal.add(info.getMonthlyCard()); |
| | | bigDecimal = bigDecimal.add(info.getMonthlyCard()==null?new BigDecimal(0):info.getMonthlyCard()); |
| | | break; |
| | | case 2: |
| | | bigDecimal = bigDecimal.add(info.getSeasonCard()); |
| | | bigDecimal = bigDecimal.add(info.getSeasonCard()==null?new BigDecimal(0):info.getSeasonCard()); |
| | | break; |
| | | case 3: |
| | | bigDecimal = bigDecimal.add(info.getAnnualCard()); |
| | | bigDecimal = bigDecimal.add(info.getAnnualCard()==null?new BigDecimal(0):info.getAnnualCard()); |
| | | break; |
| | | } |
| | | //增加vipDetail |
| | |
| | | .eq(TAppUserSign::getAppUserId, userId) |
| | | .orderByDesc(TAppUserSign::getSignDay) |
| | | .list(); |
| | | for (TAppUserSign signRecord : signRecords) { |
| | | int i = signDayUtil.calculateContinuousSignDays1(signRecord.getAppUserId(), signRecord.getSignDay()); |
| | | signRecord.setContinueDays(i); |
| | | } |
| | | return R.ok(signRecords); |
| | | |
| | | } |