Files
mp-java/src/main/java/com/gxwebsoft/cms/entity/CmsAd.java
赵忠林 7b22c8c56e refactor(time): 统一时间格式化为 yyyy-MM-dd HH:mm:ss
- 在多个实体类中添加 @JsonFormat 注解,统一 LocalDateTime 类型字段的时间格式
- 移除 JacksonConfig 中自定义的时间格式化配置,使用默认的 ISO 日期时间格式
2025-08-12 13:46:08 +08:00

104 lines
2.7 KiB
Java

package com.gxwebsoft.cms.entity;
import cn.hutool.core.util.DesensitizedUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.gxwebsoft.common.core.utils.JSONUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 广告位
*
* @author 科技小王子
* @since 2024-09-10 20:47:57
*/
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "CmsAd对象", description = "广告位")
public class CmsAd implements Serializable {
private static final long serialVersionUID = 1L;
@Schema(description = "ID")
@TableId(value = "ad_id", type = IdType.AUTO)
private Integer adId;
@Schema(description = "类型")
private Integer type;
@Schema(description = "栏目ID")
private Integer categoryId;
@Schema(description = "栏目名称")
@TableField(exist = false)
private String categoryName;
@Schema(description = "广告位名称")
private String name;
@Schema(description = "")
private String width;
@Schema(description = "")
private String height;
@Schema(description = "边框")
private String border;
@Schema(description = "CSS样式")
private String style;
@Schema(description = "广告图片")
private String images;
@Schema(description = "广告图片")
@TableField(exist = false)
private JSONArray imageList;
@Schema(description = "路由/链接地址")
private String path;
@Schema(description = "用户ID")
private Integer userId;
@Schema(description = "国际化语言")
private String lang;
@Schema(description = "排序(数字越小越靠前)")
private Integer sortNumber;
@Schema(description = "备注")
private String comments;
@Schema(description = "状态, 0正常, 1冻结")
private Integer status;
@Schema(description = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@Schema(description = "租户id")
private Integer tenantId;
@Schema(description = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
public JSONArray getImageList() {
return JSON.parseArray(this.images);
}
}