From 14b303934f8bbbfe4b14d7787d0a7d7fd2ff26f9 Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期五, 16 八月 2024 14:28:52 +0800 Subject: [PATCH] 管理后台文件上传接口编写 --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java | 25 ++----------------------- 1 files changed, 2 insertions(+), 23 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java index cbcd8b3..bc579b9 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TCouponController.java @@ -87,6 +87,8 @@ }else{ record.setMeetTheConditions("满"+byId.getMeetTheConditions()+"元可用"); } + record.setCoverPicture(byId.getCoverPicture()); + record.setDetailsPicture(byId.getDetailsPicture()); } } return AjaxResult.ok(data); @@ -124,29 +126,6 @@ TCoupon byId = tCouponService.getById(couponListVOVO.getCouponId()); BeanUtils.copyProperties(byId,couponListVOVO); couponListVOVO.setCouponName(byId.getName()); - // 根据预付金额 判断是否满足 - if (byId.getMeetTheConditions().compareTo(BigDecimal.ZERO) == 0){ - // 无门槛 - couponListVOVO.setIsUse(1); - }else if (couponListVOVO.getPayMoney().compareTo(byId.getMeetTheConditions()) < 0){ - couponListVOVO.setIsUse(0); - }else{ - couponListVOVO.setIsUse(1); - } - // 根据优惠券类型和预付金额 判断哪一个优惠券减免的金额最大 将其排在第一位 - if (couponListVOVO.getIsUse() == 1){ - switch (byId.getPreferentialMode()){ - case 1: - couponListVOVO.setMoney(byId.getDiscountAmount()); - break; - case 2: - - break; - } - }else{ - couponListVOVO.setMoney(BigDecimal.ZERO); - } - } return R.ok(list); } -- Gitblit v1.7.1