1. 优惠券调整
This commit is contained in:
parent
eaf4603295
commit
4cde481530
|
@ -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<EtCouponUserLog> list = etCouponClaimLogService.selectEtCouponClaimLogList(etCouponUserLog);
|
||||
return success(list);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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"
|
|||
<if test="gainMethod != null "> and l.gain_method = #{gainMethod}</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="typeList != null">
|
||||
AND c.type IN
|
||||
<foreach item="item" index="index" collection="typeList" open="(" separator="," close=")">
|
||||
#{type}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user