当前位置: 首页 > news >正文

微网站平台怎样做网站给彩票网站做代理违法吗

微网站平台怎样做网站,给彩票网站做代理违法吗,北京设计制作网站制作,wordpress链接默认是什么样子目录 一、Elasticsearch使用 二、实体类 2.1 mysql 实体类 2.2 Elasticsearch实体类 三、XXL-job定时执行 一、Elasticsearch使用 当我们做搜索功能时#xff0c;如果为了提高查询效率#xff0c;通常使用Elasticsearch搜索引擎加快搜索效率。以搜索商品为例#xff0c;我…目录 一、Elasticsearch使用 二、实体类 2.1 mysql 实体类 2.2 Elasticsearch实体类 三、XXL-job定时执行 一、Elasticsearch使用 当我们做搜索功能时如果为了提高查询效率通常使用Elasticsearch搜索引擎加快搜索效率。以搜索商品为例我们mysql肯定有一张商品表对应的有一个实体类而我们的es索引中我们要多冗余两个字段销量和好评。当用户搜索的时候我们直接查Elasticsearch中的数据但是当我们的Elasticsearch挂了之后es数据会消失我们可以用xxl-job做个定时任务先查询mysql中的数据再将数据库里的数据遍历出来再添加到Elasticsearch中。 二、实体类 2.1 mysql 实体类 // // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) //package com.beimao.common.model;import com.beimao.common.enums.ProductStatus; import java.math.BigDecimal;public class Product extends BaseModel {private Integer id;private String name;private String subName;private Integer categoryId;private String img;private Integer status 1;private String statusX;private BigDecimal price;private String brief;private Integer seq 0;private String tags;public String getStatusX() {ProductStatus productStatus ProductStatus.findByCode(this.status);return productStatus ! null ? productStatus.getDesc() : 未定义;}public Product() {}public Integer getId() {return this.id;}public String getName() {return this.name;}public String getSubName() {return this.subName;}public Integer getCategoryId() {return this.categoryId;}public String getImg() {return this.img;}public Integer getStatus() {return this.status;}public BigDecimal getPrice() {return this.price;}public String getBrief() {return this.brief;}public Integer getSeq() {return this.seq;}public String getTags() {return this.tags;}public void setId(final Integer id) {this.id id;}public void setName(final String name) {this.name name;}public void setSubName(final String subName) {this.subName subName;}public void setCategoryId(final Integer categoryId) {this.categoryId categoryId;}public void setImg(final String img) {this.img img;}public void setStatus(final Integer status) {this.status status;}public void setStatusX(final String statusX) {this.statusX statusX;}public void setPrice(final BigDecimal price) {this.price price;}public void setBrief(final String brief) {this.brief brief;}public void setSeq(final Integer seq) {this.seq seq;}public void setTags(final String tags) {this.tags tags;}public boolean equals(final Object o) {if (o this) {return true;} else if (!(o instanceof Product)) {return false;} else {Product other (Product)o;if (!other.canEqual(this)) {return false;} else {label143: {Object this$id this.getId();Object other$id other.getId();if (this$id null) {if (other$id null) {break label143;}} else if (this$id.equals(other$id)) {break label143;}return false;}Object this$categoryId this.getCategoryId();Object other$categoryId other.getCategoryId();if (this$categoryId null) {if (other$categoryId ! null) {return false;}} else if (!this$categoryId.equals(other$categoryId)) {return false;}Object this$status this.getStatus();Object other$status other.getStatus();if (this$status null) {if (other$status ! null) {return false;}} else if (!this$status.equals(other$status)) {return false;}label122: {Object this$seq this.getSeq();Object other$seq other.getSeq();if (this$seq null) {if (other$seq null) {break label122;}} else if (this$seq.equals(other$seq)) {break label122;}return false;}label115: {Object this$name this.getName();Object other$name other.getName();if (this$name null) {if (other$name null) {break label115;}} else if (this$name.equals(other$name)) {break label115;}return false;}Object this$subName this.getSubName();Object other$subName other.getSubName();if (this$subName null) {if (other$subName ! null) {return false;}} else if (!this$subName.equals(other$subName)) {return false;}Object this$img this.getImg();Object other$img other.getImg();if (this$img null) {if (other$img ! null) {return false;}} else if (!this$img.equals(other$img)) {return false;}label94: {Object this$statusX this.getStatusX();Object other$statusX other.getStatusX();if (this$statusX null) {if (other$statusX null) {break label94;}} else if (this$statusX.equals(other$statusX)) {break label94;}return false;}label87: {Object this$price this.getPrice();Object other$price other.getPrice();if (this$price null) {if (other$price null) {break label87;}} else if (this$price.equals(other$price)) {break label87;}return false;}Object this$brief this.getBrief();Object other$brief other.getBrief();if (this$brief null) {if (other$brief ! null) {return false;}} else if (!this$brief.equals(other$brief)) {return false;}Object this$tags this.getTags();Object other$tags other.getTags();if (this$tags null) {if (other$tags ! null) {return false;}} else if (!this$tags.equals(other$tags)) {return false;}return true;}}}protected boolean canEqual(final Object other) {return other instanceof Product;}public int hashCode() {int PRIME true;int result 1;Object $id this.getId();result result * 59 ($id null ? 43 : $id.hashCode());Object $categoryId this.getCategoryId();result result * 59 ($categoryId null ? 43 : $categoryId.hashCode());Object $status this.getStatus();result result * 59 ($status null ? 43 : $status.hashCode());Object $seq this.getSeq();result result * 59 ($seq null ? 43 : $seq.hashCode());Object $name this.getName();result result * 59 ($name null ? 43 : $name.hashCode());Object $subName this.getSubName();result result * 59 ($subName null ? 43 : $subName.hashCode());Object $img this.getImg();result result * 59 ($img null ? 43 : $img.hashCode());Object $statusX this.getStatusX();result result * 59 ($statusX null ? 43 : $statusX.hashCode());Object $price this.getPrice();result result * 59 ($price null ? 43 : $price.hashCode());Object $brief this.getBrief();result result * 59 ($brief null ? 43 : $brief.hashCode());Object $tags this.getTags();result result * 59 ($tags null ? 43 : $tags.hashCode());return result;}public String toString() {return Product(id this.getId() , name this.getName() , subName this.getSubName() , categoryId this.getCategoryId() , img this.getImg() , status this.getStatus() , statusX this.getStatusX() , price this.getPrice() , brief this.getBrief() , seq this.getSeq() , tags this.getTags() );} }// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) //package com.beimao.common.model;import java.time.LocalDateTime;public abstract class BaseModel {private String lastUpdateBy;private LocalDateTime lastUpdateTime;public BaseModel() {}public String getLastUpdateBy() {return this.lastUpdateBy;}public void setLastUpdateBy(String lastUpdateBy) {this.lastUpdateBy lastUpdateBy;}public LocalDateTime getLastUpdateTime() {return this.lastUpdateTime;}public void setLastUpdateTime(LocalDateTime lastUpdateTime) {this.lastUpdateTime lastUpdateTime;} }2.2 Elasticsearch实体类 package com.beimao.model;import cn.easyes.annotation.IndexField; import cn.easyes.annotation.IndexId; import cn.easyes.annotation.IndexName; import cn.easyes.annotation.rely.Analyzer; import cn.easyes.annotation.rely.FieldType; import cn.easyes.annotation.rely.IdType; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor;import java.math.BigDecimal; import java.time.LocalDateTime; import java.util.List;/*** EsProduct 类用于表示一个商品实体并定义了商品相关的属性。* 它使用了特定的注解来定义如何在搜索引擎中索引这些属性。*/ IndexName(aliasName beimao_product) // 定义索引的别名 Data NoArgsConstructor AllArgsConstructor Builder public class EsProduct {//商品idIndexId(type IdType.CUSTOMIZE) // 定义自定义的主键IDprivate Integer id;//商品名称IndexField(fieldType FieldType.TEXT, analyzer Analyzer.IK_MAX_WORD, searchAnalyzer Analyzer.IK_MAX_WORD)private String name;// 商品名称使用IK分词器进行索引便于全文检索//商品标签IndexField(fieldType FieldType.TEXT, analyzer Analyzer.IK_MAX_WORD)private ListString tags; //使用列表存储并使用IK分词器便于检索具有多个标签的商品//商品副标题IndexField(fieldType FieldType.TEXT, analyzer Analyzer.IK_MAX_WORD)private String subName; // 假设subName也需要全文搜索//商品价格IndexField(fieldType FieldType.DOUBLE)private BigDecimal price;//商品状态IndexField(fieldType FieldType.INTEGER)private Integer status; // 使用KEYWORD类型更改为TEXT以示例中保持一致实际根据需求可调整为FieldType.KEYWORD以进行精确匹配//商品品类private Integer categoryId; // 商品所属的类别ID//商品图片IndexField(fieldType FieldType.KEYWORD)private String img; // 商品图片链接使用关键词类型索引适用于精确匹配//商品简介IndexField(fieldType FieldType.TEXT, analyzer Analyzer.IK_MAX_WORD)private String brief; // 商品简介使用IK分词器进行索引便于全文检索//商品排序IndexField(fieldType FieldType.INTEGER)private Integer sort;//商品库存IndexField(fieldType FieldType.INTEGER)private String stock;//商品好评数量IndexField(fieldType FieldType.INTEGER)private Integer highOpinion 0; // 默认好评数量为0//商品销量IndexField(fieldType FieldType.INTEGER)private Integer salesVolume 0; // 商品销量整型存储}三、XXL-job定时执行
http://www.w-s-a.com/news/242882/

相关文章:

  • 网站开发需要自己写代码吗12306网站多少钱做的
  • 策勒网站建设四川建设网有限责任公司招聘
  • 网站建设哪里有学网页界面设计论文
  • 怎么做外贸网站推广劳务公司网站怎么做
  • 滴答手表网站中铁建设集团有限公司招聘信息2021
  • 重庆富通科技有限公司网站新闻头条最新消息国家大事
  • 四字母net做网站怎么样企业代运营公司
  • 纪检网站建设方案wordpress首页静态页面
  • 网站右下角浮动效果如何做网站logo设计在线生成
  • 西宁哪里做网站婚纱摄影网站设计思路
  • 凡科用模板做网站网站导入页欣赏
  • 北京响应式网站建设公司十大小程序开发公司
  • dw网站开发删除wordpress主题底部
  • 织梦网站怎样做子域名高德导航怎么看街景地图
  • 宿州专业网站建设株洲网站建设优化
  • 自动生成海报的网站常州建网站公司
  • 网站刷流量对网站有影响吗站长工具欧美高清
  • 百度做网站优化多少钱一年罗庄网站建设
  • 手机网站 自适应屏幕h5网站有哪些
  • 北京企业建站技术临沂网站公众号建设
  • 域名和网站备案一样吗wordpress 封装 app
  • 婚纱摄影网站开题报告c2c模式是什么意思
  • 网站几种颜色wordpress水平菜单
  • php做网站的分站wordpress边下边看
  • 杭州建设实名制报备网站Wordpress外贸网站搭建公司
  • 山西云起时网站建设计算机网站开发实现总结
  • 一个网站做两个优化可以做吗永清网站建设
  • wordpress英文采集wordpress seo 链接
  • 进入建设银行的网站就打不了字工程建设标准化网站
  • 杭州网站推广大全网站建设演讲稿