123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118 |
- package com.ruoyi.demo.entity;
- import cn.hutool.core.date.DateUtil;
- import com.baomidou.mybatisplus.annotation.IdType;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableId;
- import com.baomidou.mybatisplus.annotation.TableName;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import com.ruoyi.demo.entity.bo.PlanAddBo;
- import com.ruoyi.demo.utils.OnStateUtil;
- import com.ruoyi.demo.utils.StateUtil;
- import lombok.Data;
- import java.math.BigDecimal;
- import java.util.Date;
- @Data
- @TableName("dl_plan")
- public class Plan {
- @TableId(value = "plan_id",type = IdType.ASSIGN_ID)
- private String planId;
- @TableField("plan_other_id")
- private String planOtherId;
- @TableField("plan_name")
- private String planName;
- @TableField("commercial_id")
- private String commercialId;
- @TableField("commercial_name")
- private String commercialName;
- @TableField("appkey")
- private String appkey;
- @TableField("app_name")
- private String appName;
- @TableField("vendor_id")
- private String vendorId;
- @TableField("vendor_name")
- private String vendorName;
- @TableField("goods_id")
- private String goodsId;
- @TableField("goods_img")
- private String goodsImg;
- @TableField("goods_name")
- private String goodsName;
- @TableField("goods_logo")
- private String goodsLogo;
- @TableField("goods_introduce")
- private String goodsIntroduce;
- @TableField("goods_price")
- private BigDecimal goodsPrice;
- @TableField("goods_classify")
- private String goodsClassify;
- @TableField("template")
- private String template;
- @TableField("plan_create_time")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date planCreateTime;
- @TableField("plan_start_time")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date planStartTime;
- @TableField("plan_end_time")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date planEndTime;
- @TableField("audit_time")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date auditTime;
- @TableField("state")
- private Integer state;
- @TableField("on_state")
- private Integer onState;
- @TableField("principal_name")
- private String principalName;
- @TableField("principal_telephone")
- private String principalTelephone;
- @TableField("deleted")
- private int deleted;
- public Plan(){}
- public Plan(App app, PlanAddBo bo){
- this.planOtherId = bo.getPlanOtherId();
- this.commercialId = app.getCommercialId();
- this.commercialName = app.getCommercialName();
- this.appkey = app.getAppkey();
- this.appName = app.getAppName();
- this.planName = bo.getPlanName();
- this.vendorId = bo.getVendorId();
- this.vendorName = bo.getVendorName();
- this.goodsId = bo.getGoodsId();
- this.goodsImg = bo.getGoodsImg();
- this.goodsName = bo.getGoodsName();
- this.goodsLogo = bo.getGoodsLogo();
- this.goodsPrice = bo.getGoodsPrice();
- this.goodsIntroduce = bo.getGoodsIntroduce();
- this.goodsClassify = bo.getGoodsClassify();
- this.template = bo.getTemplate();
- this.planCreateTime = DateUtil.date();
- this.planStartTime = bo.getPlanStartTime();
- this.planEndTime = bo.getPlanEndTime();
- this.state = StateUtil.NOT_AUDITED;
- this.onState = OnStateUtil.UP;
- this.principalName = bo.getPrincipalName();
- this.principalTelephone = bo.getPrincipalTelephone();
- }
- }
|