优惠券查询DTO
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package com.ai.da.mapper.primary;
|
||||
|
||||
import com.ai.da.common.config.mybatis.plus.CommonMapper;
|
||||
import com.ai.da.mapper.primary.entity.ProductCoupons;
|
||||
|
||||
public interface ProductCouponsMapper extends CommonMapper<ProductCoupons> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.ai.da.mapper.primary.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@TableName("t_product_coupons")
|
||||
public class ProductCoupons extends BaseEntity{
|
||||
// 优惠券id
|
||||
private String couponId;
|
||||
// 优惠券有效期的截止日期
|
||||
private Long redeemBy;
|
||||
// 绑定的推广码id
|
||||
private String promotionCodeId;
|
||||
// 对应的推广码
|
||||
private String promotionCode;
|
||||
// 最大兑换次数
|
||||
private Integer maxRedemptions;
|
||||
// 优惠券的折扣
|
||||
private float percentOff;
|
||||
// 佣金比例
|
||||
private float commissionRate;
|
||||
// 合作者
|
||||
private String cooperator;
|
||||
// 使用了该优惠券支付的总金额
|
||||
private float totalEarnings;
|
||||
// 佣金
|
||||
private float commission;
|
||||
// 已付佣金
|
||||
private float paidCommission;
|
||||
// 未付佣金
|
||||
private float unpaidCommission;
|
||||
// 备注
|
||||
private String remark;
|
||||
|
||||
public ProductCoupons() {
|
||||
}
|
||||
|
||||
public ProductCoupons(String couponId, Long redeemBy, String promotionCodeId, String promotionCode, float percentOff, float commissionRate) {
|
||||
this.couponId = couponId;
|
||||
this.redeemBy = redeemBy;
|
||||
this.promotionCodeId = promotionCodeId;
|
||||
this.promotionCode = promotionCode;
|
||||
this.percentOff = percentOff;
|
||||
this.commissionRate = commissionRate;
|
||||
}
|
||||
}
|
||||
22
src/main/java/com/ai/da/model/dto/QueryCouponsPageDTO.java
Normal file
22
src/main/java/com/ai/da/model/dto/QueryCouponsPageDTO.java
Normal file
@@ -0,0 +1,22 @@
|
||||
package com.ai.da.model.dto;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel
|
||||
public class QueryCouponsPageDTO extends QueryPageByTimeDTO {
|
||||
@ApiModelProperty("DESC(按id降序) || ASC(按id升序)")
|
||||
private String orderById;
|
||||
@ApiModelProperty("推广码")
|
||||
private String promotionCode;
|
||||
@ApiModelProperty("查询过期 || 未过期的优惠券")
|
||||
private Boolean isExpired;
|
||||
@ApiModelProperty("按合作者名字查询")
|
||||
private String cooperator;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user