Ver código fonte

UserTag UserRecommend UserTagProductRelation

guozhaoshun 6 anos atrás
pai
commit
f342259060

+ 32 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/product/vo/UserRecommendVo.java

@@ -0,0 +1,32 @@
+package cn.rankin.data.api.product.vo;
+
+import cn.rankin.common.utils.enums.BaseStatusEnum;
+import cn.rankin.common.utils.enums.ProductTypeEnum;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class UserRecommendVo implements Serializable {
+
+    private String id;
+
+    private String uid;
+
+    private String pid;
+
+    private BaseStatusEnum status;
+
+    private Integer sort;
+
+    private Date gmtCreated;
+
+    private Date gmtModified;
+
+    private ProductTypeEnum type;
+
+    private String name;
+
+    private String code;
+}

+ 30 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/user/dto/UserTagDTO.java

@@ -0,0 +1,30 @@
+package cn.rankin.data.api.user.dto;
+
+import cn.rankin.common.utils.enums.BaseStatusEnum;
+import lombok.Data;
+import lombok.ToString;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+@Data
+@ToString
+public class UserTagDTO implements Serializable {
+
+    private String id;
+
+    private String name;
+
+    private String uid;
+
+    private String typeCode;
+
+    private Integer sort;
+
+    private BaseStatusEnum status;
+
+    private List<String> productList;
+
+}

+ 24 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/user/dto/UserTagSearchDTO.java

@@ -0,0 +1,24 @@
+package cn.rankin.data.api.user.dto;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+@Data
+@ToString
+public class UserTagSearchDTO implements Serializable {
+
+    private String name;
+
+    private String uid;
+
+    private String typeCode;
+
+    private String sort;
+
+    private Integer pageNo = 1;
+
+    private Integer pageSize = 10;
+
+}

+ 58 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/user/entity/UserRecommend.java

@@ -0,0 +1,58 @@
+package cn.rankin.data.api.user.entity;
+
+import cn.rankin.common.utils.enums.BaseStatusEnum;
+import cn.rankin.common.utils.enums.ProductTypeEnum;
+import lombok.Data;
+import lombok.ToString;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * The persistent class for the role database table.
+ * 
+ */
+@Data
+@ToString
+@Entity
+@Table(name="u_user_recommend", uniqueConstraints = {@UniqueConstraint(columnNames = {"uid", "pid"})})
+@DynamicInsert
+@DynamicUpdate
+public class UserRecommend implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+	@Id
+	@Column(name = "id")
+	private String id;
+
+	@Column(name = "uid")
+	private String uid;
+
+	@Column(name = "pid")
+	private String pid;
+
+	@Column(name = "sort")
+	private int sort;
+
+	@Enumerated(EnumType.ORDINAL)
+	private ProductTypeEnum type;
+
+	@Enumerated(EnumType.ORDINAL)
+	private BaseStatusEnum status;
+
+	@Column(name = "gmt_created", updatable = false, insertable = false, columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP")
+	@Temporal(TemporalType.TIMESTAMP)
+	private Date gmtCreated;
+
+	@Column(name = "gmt_modified", updatable = false, insertable = false, columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
+	@Temporal(TemporalType.TIMESTAMP)
+	private Date gmtModified;
+
+
+
+
+}

+ 62 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/user/entity/UserTag.java

@@ -0,0 +1,62 @@
+package cn.rankin.data.api.user.entity;
+
+import cn.rankin.common.utils.enums.BaseStatusEnum;
+import cn.rankin.data.api.product.entity.MerchantProduct;
+import lombok.Data;
+import lombok.ToString;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * The persistent class for the role database table.
+ * 
+ */
+@Data
+@ToString
+@Entity
+@Table(name="u_user_tag")
+@DynamicInsert
+@DynamicUpdate
+public class UserTag implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+	@Id
+	private String id;
+
+	@Column(name = "uid")
+	private String uid;
+
+	@Column
+	private String name;
+
+	@Column(name = "type_code", nullable = false)
+	private String typeCode;
+
+	@Column
+	private Integer sort;
+
+	@Column
+	@Enumerated(EnumType.ORDINAL)
+	private BaseStatusEnum status;
+
+	@Column(name = "gmt_created", updatable = false, insertable = false, columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP")
+	@Temporal(TemporalType.TIMESTAMP)
+	private Date gmtCreated;
+
+	@Column(name = "gmt_modified", updatable = false, insertable = false, columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
+	@Temporal(TemporalType.TIMESTAMP)
+	private Date gmtModified;
+
+	@Transient
+	private List<MerchantProduct> productList;
+
+	@Transient
+	private List<UserTagProductRelation> relationList;
+
+}

+ 46 - 0
rankin-data-api/src/main/java/cn/rankin/data/api/user/entity/UserTagProductRelation.java

@@ -0,0 +1,46 @@
+package cn.rankin.data.api.user.entity;
+
+import cn.rankin.common.utils.enums.BaseStatusEnum;
+import lombok.Data;
+import lombok.ToString;
+import org.hibernate.annotations.DynamicInsert;
+import org.hibernate.annotations.DynamicUpdate;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * The persistent class for the role database table.
+ * 
+ */
+@Data
+@ToString
+@Entity
+@Table(name="u_user_tag_product_relation", uniqueConstraints = {@UniqueConstraint(columnNames = {"pid", "tag_id"})})
+@DynamicInsert
+@DynamicUpdate
+public class UserTagProductRelation implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+	@Id
+	private String id;
+
+	@Column(name = "pid")
+	private String pid;
+
+	@Column(name = "tag_id")
+	private String tagId;
+
+	@Column
+	private Integer sort;
+
+	@Enumerated(EnumType.ORDINAL)
+	private BaseStatusEnum status;
+
+	@Column(name = "gmt_created", updatable = false, insertable = false, columnDefinition = "timestamp NULL DEFAULT CURRENT_TIMESTAMP")
+	@Temporal(TemporalType.TIMESTAMP)
+	private Date gmtCreated;
+
+}