用户优惠券列表3

This commit is contained in:
2025-09-24 17:14:08 +08:00
parent 55f488db7f
commit 5cd753cc1c
9 changed files with 250 additions and 13 deletions

View File

@@ -17,6 +17,7 @@ public class UserCouponVo {
private String shopName;
private BigDecimal fullAmount;
private BigDecimal discountAmount;
private BigDecimal discountRate;
private Long couponId;
private String foods;
//优惠券名称

View File

@@ -6,6 +6,7 @@ import com.czg.account.vo.UserCouponVo;
import com.czg.market.dto.MkRewardCouponDTO;
import com.czg.market.dto.MkShopCouponGiftDTO;
import com.czg.market.dto.MkShopCouponRecordDTO;
import com.czg.market.vo.UserCouponVO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.czg.market.entity.MkShopCouponRecord;
@@ -23,7 +24,7 @@ public interface MkShopCouponRecordService extends IService<MkShopCouponRecord>
List<CouponReceiveVo> queryReceive(QueryReceiveDto param);
List<MkShopCouponRecord> findByUser(List<Long> shopUserIds, Integer status);
List<UserCouponVO> findByUser(String name, List<Long> shopUserIds, Integer status);
List<UserCouponVo> queryByVipIdAndShopId(Long shopId, Long shopUserId, Integer type);

View File

@@ -3,6 +3,7 @@ package com.czg.market.service;
import com.czg.account.vo.UserCouponVo;
import com.czg.market.dto.ShopCouponDTO;
import com.czg.market.entity.MkShopCouponRecord;
import com.czg.market.vo.UserCouponVO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.czg.market.entity.ShopCoupon;
@@ -26,7 +27,7 @@ public interface ShopCouponService extends IService<ShopCoupon> {
void deleteCoupon(Long id);
Page<MkShopCouponRecord> find(Long userId, Long shopId, Integer status);
Page<UserCouponVO> find(Long userId, String name, Long shopId, Integer status);
List<UserCouponVo> findCoupon(Long shopId, Long shopUserId, Integer type);

View File

@@ -0,0 +1,156 @@
package com.czg.market.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
* 优惠券发放记录表 实体类。
*
* @author ww
* @since 2025-09-13
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class UserCouponVO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
private Long id;
/**
* 店铺id
*/
private Long shopId;
/**
* 卷名称
*/
private String name;
/**
* 优惠券类型1-满减券2-商品兑换券3-折扣券4-第二件半价券, 6-买一送一券7-固定价格券8-免配送费券
*/
private Integer type;
/**
* 满多少金额
*/
private BigDecimal fullAmount;
/**
* 减多少金额
*/
private BigDecimal discountAmount;
/**
* 折扣率 %
*/
private Integer discountRate;
/**
* 领取时间
*/
private LocalDateTime createTime;
/**
* 使用时间
*/
private LocalDateTime useTime;
/**
* 过期时间
*/
private LocalDateTime effectEndTime;
/**
* 优惠券生效时间
*/
private LocalDateTime effectStartTime;
/**
* 0未使用
* 1已使用
* 2已过期
*/
private Integer status;
/**
* 可用门店类型only-仅本店all-所有门店custom-指定门店
*/
private String useShopType;
/**
* 可用门店
*/
private String useShops;
/**
* 可用商品
*/
private String foods;
/**
* 可使用类型dine堂食/pickup自取/deliv配送/express快递
*/
private String useType;
/**
* 可用周期,如:周一,周二,周三,周四,周五,周六,周七
*/
private String useDays;
/**
* 可用时间段类型all-全时段custom-指定时段
*/
private String useTimeType;
/**
* 可用开始时间
*/
private LocalDateTime useStartTime;
/**
* 可用结束时间
*/
private LocalDateTime useEndTime;
/**
* 每人领取限量,-10086为不限量
*/
private Integer getLimit;
/**
* 每人每日使用限量,-10086为不限量
*/
private Integer useLimit;
/**
* 与限时折扣同享0-否1-是
*/
private Integer discountShare;
/**
* 与会员价同享0-否1-是
*/
private Integer vipPriceShare;
/**
* 附加规则说明
*/
private String ruleDetails;
private String deductNum;
}