后台日志管理,优惠卷列表以及增加优惠卷

This commit is contained in:
liuyingfang
2024-03-21 09:20:09 +08:00
parent 42f401469a
commit 1981baeb94
15 changed files with 795 additions and 0 deletions

View File

@@ -0,0 +1,185 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.ysk.cashier.pojo.shop;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.io.Serializable;
/**
* @website https://eladmin.vip
* @description /
* @author lyf
* @date 2024-03-20
**/
@Entity
@Data
@Table(name="tb_merchant_coupon")
public class TbMerchantCoupon implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`id`")
@ApiModelProperty(value = "自增")
private Integer id;
@Column(name = "`status`")
@ApiModelProperty(value = "状态0-关闭 1 正常")
private Integer status;
@Column(name = "`title`")
@ApiModelProperty(value = " 优惠券名称")
private String title;
@Column(name = "`template_id`",nullable = false)
@NotBlank
@ApiModelProperty(value = "templateId")
private String templateId;
@Column(name = "`shop_id`")
@ApiModelProperty(value = "shopId")
private String shopId;
@Column(name = "`shop_snap`")
@ApiModelProperty(value = "shopSnap")
private String shopSnap;
@Column(name = "`from_time`",nullable = false)
@NotNull
@ApiModelProperty(value = "开始时间")
private Long fromTime;
@Column(name = "`to_time`",nullable = false)
@NotNull
@ApiModelProperty(value = "到期时间")
private Long toTime;
@Column(name = "`limit_number`")
@ApiModelProperty(value = "限领数量")
private Integer limitNumber;
@Column(name = "`number`")
@ApiModelProperty(value = "发放数量")
private Integer number;
@Column(name = "`left_number`",nullable = false)
@NotNull
@ApiModelProperty(value = "剩余数量")
private Integer leftNumber;
@Column(name = "`amount`")
@ApiModelProperty(value = "优惠金额")
private BigDecimal amount;
@Column(name = "`limit_amount`")
@ApiModelProperty(value = "订单满赠金额")
private BigDecimal limitAmount;
@Column(name = "`is_show`")
@ApiModelProperty(value = "是否显示0-不显示 1显示")
private Integer isShow;
@Column(name = "`pic`")
@ApiModelProperty(value = "图标")
private String pic;
@Column(name = "`type`")
@ApiModelProperty(value = "0-满减 1-折扣")
private Integer type;
@Column(name = "`ratio`")
@ApiModelProperty(value = "折扣 ,一位小数")
private Float ratio;
@Column(name = "`max_ratio_amount`")
@ApiModelProperty(value = "最大折扣金额")
private BigDecimal maxRatioAmount;
@Column(name = "`track`")
@ApiModelProperty(value = "优惠券途径,首充|分销")
private String track;
@Column(name = "`class_type`")
@ApiModelProperty(value = "品类product 商品券 ---cateogry 品类券common -通 用券")
private String classType;
@Column(name = "`effect_type`")
@ApiModelProperty(value = "有效期类型0-toTime有效 1-effectDays有效")
private Integer effectType;
@Column(name = "`effect_days`")
@ApiModelProperty(value = "领取之日有效天数")
private Integer effectDays;
@Column(name = "`relation_ids`")
@ApiModelProperty(value = "关联商品Id")
private String relationIds;
@Column(name = "`relation_list`")
@ApiModelProperty(value = "relationList")
private String relationList;
@Column(name = "`editor`")
@ApiModelProperty(value = "发放人")
private String editor;
@Column(name = "`note`")
@ApiModelProperty(value = "说明")
private String note;
@Column(name = "`created_at`",nullable = false)
@NotNull
@ApiModelProperty(value = "createdAt")
private Long createdAt;
@Column(name = "`updated_at`",nullable = false)
@NotNull
@ApiModelProperty(value = "updatedAt")
private Long updatedAt;
@Column(name = "`furnish_meal`")
@ApiModelProperty(value = "支持堂食")
private Integer furnishMeal;
@Column(name = "`furnish_express`")
@ApiModelProperty(value = "支持配送")
private Integer furnishExpress;
@Column(name = "`furnish_draw`")
@ApiModelProperty(value = "支持自提")
private Integer furnishDraw;
@Column(name = "`furnish_vir`")
@ApiModelProperty(value = "支持虚拟")
private Integer furnishVir;
@Column(name = "`disable_distribute`")
@ApiModelProperty(value = "disableDistribute")
private Integer disableDistribute;
@Column(name = "`merchant_id`")
@ApiModelProperty(value = "商户Id")
private String merchantId;
public void copy(TbMerchantCoupon source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
}
}