1. 优惠券调整

This commit is contained in:
邱贞招 2024-09-05 16:33:58 +08:00
parent eaf4603295
commit 4cde481530
3 changed files with 23 additions and 3 deletions

View File

@ -36,7 +36,6 @@ import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
/** /**
* app接口需要登录校验的 * app接口需要登录校验的
@ -1354,12 +1353,13 @@ public class AppVerifyController extends BaseController
* 优惠券购买记录 * 优惠券购买记录
*/ */
@GetMapping("/couponBuyRecord") @GetMapping("/couponBuyRecord")
public AjaxResult couponBuyRecord(Long userId) public AjaxResult couponBuyRecord(Long userId, String[] typeList)
{ {
logger.info("【优惠券购买记录】【userId="+userId+""); logger.info("【优惠券购买记录】【userId="+userId+"");
EtCouponUserLog etCouponUserLog = new EtCouponUserLog(); EtCouponUserLog etCouponUserLog = new EtCouponUserLog();
etCouponUserLog.setUserId(userId); etCouponUserLog.setUserId(userId);
etCouponUserLog.setGainMethod(ServiceConstants.COUPON_GAIN_METHOD_BUY); etCouponUserLog.setGainMethod(ServiceConstants.COUPON_GAIN_METHOD_BUY);
etCouponUserLog.setTypeList(typeList);
List<EtCouponUserLog> list = etCouponClaimLogService.selectEtCouponClaimLogList(etCouponUserLog); List<EtCouponUserLog> list = etCouponClaimLogService.selectEtCouponClaimLogList(etCouponUserLog);
return success(list); return success(list);
} }

View File

@ -51,6 +51,17 @@ public class EtCouponUserLog extends BaseEntity
@Excel(name = "优惠券名称") @Excel(name = "优惠券名称")
private String couponName; private String couponName;
/** 有效期值 */
@Excel(name = "有效期值")
private Integer validityValue;
/** 有效期单位 */
@Excel(name = "有效期单位")
private String validityUnit;
@Excel(name = "类型列表")
private String[] typeList;
/** 零售价 */ /** 零售价 */
@Excel(name = "零售价") @Excel(name = "零售价")
private BigDecimal retailPrice; private BigDecimal retailPrice;

View File

@ -33,7 +33,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
l.expiration_time, l.expiration_time,
c.name couponName, c.name couponName,
c.type, 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 from et_coupon_user_log l
left join et_operating_area a on a.area_id = l.area_id 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 left join et_user u on u.user_id = l.user_id
@ -46,6 +49,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="gainMethod != null "> and l.gain_method = #{gainMethod}</if> <if test="gainMethod != null "> and l.gain_method = #{gainMethod}</if>
<if test="status != null and status != ''"> and l.status = #{status}</if> <if test="status != null and status != ''"> and l.status = #{status}</if>
<if test="couponId != null "> and l.coupon_id like concat('%', #{couponId}, '%')</if> <if test="couponId != null "> and l.coupon_id like concat('%', #{couponId}, '%')</if>
<if test="typeList != null">
AND c.type IN
<foreach item="item" index="index" collection="typeList" open="(" separator="," close=")">
#{type}
</foreach>
</if>
</where> </where>
</select> </select>