From 4cde4815308743acd97e768b676213b1efa40552 Mon Sep 17 00:00:00 2001 From: 18650502300 <18650502300@163.com> Date: Thu, 5 Sep 2024 16:33:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BC=98=E6=83=A0=E5=88=B8=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/web/controller/app/AppVerifyController.java | 4 ++-- .../java/com/ruoyi/system/domain/EtCouponUserLog.java | 11 +++++++++++ .../mapper/system/EtCouponClaimLogMapper.xml | 11 ++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java b/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java index 977a3e2..3db1dc2 100644 --- a/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java +++ b/electripper-admin/src/main/java/com/ruoyi/web/controller/app/AppVerifyController.java @@ -36,7 +36,6 @@ import javax.annotation.Resource; import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.*; -import java.util.stream.Collectors; /** * app接口(需要登录校验的) @@ -1354,12 +1353,13 @@ public class AppVerifyController extends BaseController * 优惠券购买记录 */ @GetMapping("/couponBuyRecord") - public AjaxResult couponBuyRecord(Long userId) + public AjaxResult couponBuyRecord(Long userId, String[] typeList) { logger.info("【优惠券购买记录】:【userId="+userId+"】"); EtCouponUserLog etCouponUserLog = new EtCouponUserLog(); etCouponUserLog.setUserId(userId); etCouponUserLog.setGainMethod(ServiceConstants.COUPON_GAIN_METHOD_BUY); + etCouponUserLog.setTypeList(typeList); List list = etCouponClaimLogService.selectEtCouponClaimLogList(etCouponUserLog); return success(list); } diff --git a/electripper-system/src/main/java/com/ruoyi/system/domain/EtCouponUserLog.java b/electripper-system/src/main/java/com/ruoyi/system/domain/EtCouponUserLog.java index 5ad7338..c9e54e8 100644 --- a/electripper-system/src/main/java/com/ruoyi/system/domain/EtCouponUserLog.java +++ b/electripper-system/src/main/java/com/ruoyi/system/domain/EtCouponUserLog.java @@ -51,6 +51,17 @@ public class EtCouponUserLog extends BaseEntity @Excel(name = "优惠券名称") private String couponName; + /** 有效期值 */ + @Excel(name = "有效期值") + private Integer validityValue; + + /** 有效期单位 */ + @Excel(name = "有效期单位") + private String validityUnit; + + @Excel(name = "类型列表") + private String[] typeList; + /** 零售价 */ @Excel(name = "零售价") private BigDecimal retailPrice; diff --git a/electripper-system/src/main/resources/mapper/system/EtCouponClaimLogMapper.xml b/electripper-system/src/main/resources/mapper/system/EtCouponClaimLogMapper.xml index 24b85db..58f4592 100644 --- a/electripper-system/src/main/resources/mapper/system/EtCouponClaimLogMapper.xml +++ b/electripper-system/src/main/resources/mapper/system/EtCouponClaimLogMapper.xml @@ -33,7 +33,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" l.expiration_time, c.name couponName, c.type, - c.retail_price retailPrice + c.retail_price retailPrice, + c.validity_value validityValue, + c.validity_unit validityUnit, + c.type couponType from et_coupon_user_log l left join et_operating_area a on a.area_id = l.area_id left join et_user u on u.user_id = l.user_id @@ -46,6 +49,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and l.gain_method = #{gainMethod} and l.status = #{status} and l.coupon_id like concat('%', #{couponId}, '%') + + AND c.type IN + + #{type} + +