|
@@ -23,6 +23,7 @@ public class ESCourse {
|
|
// 用于 Elasticsearch 的主键注解
|
|
// 用于 Elasticsearch 的主键注解
|
|
@Id
|
|
@Id
|
|
@Field(name = "id",type = FieldType.Long)
|
|
@Field(name = "id",type = FieldType.Long)
|
|
|
|
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
|
|
private Long id;
|
|
private Long id;
|
|
|
|
|
|
@Field(name = "name", type = FieldType.Text, analyzer = "ik_max_word")
|
|
@Field(name = "name", type = FieldType.Text, analyzer = "ik_max_word")
|
|
@@ -30,6 +31,7 @@ public class ESCourse {
|
|
@Field(name = "price")
|
|
@Field(name = "price")
|
|
private BigDecimal price;
|
|
private BigDecimal price;
|
|
@Field(name = "category_id")
|
|
@Field(name = "category_id")
|
|
|
|
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
|
|
private Long categoryId;
|
|
private Long categoryId;
|
|
@Field(name = "cover_img")
|
|
@Field(name = "cover_img")
|
|
private String coverImg;
|
|
private String coverImg;
|