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

dw如何在网站做弹窗seo培训机构

dw如何在网站做弹窗,seo培训机构,tomcat做静态网站,网页制作基础教程第2版电子教材目录 一、Elasticsearch使用 二、实体类 2.1 mysql 实体类 2.2 Elasticsearch实体类 三、XXL-job定时执行 一、Elasticsearch使用 当我们做搜索功能时,如果为了提高查询效率,通常使用Elasticsearch搜索引擎加快搜索效率。以搜索商品为例,我…

目录

一、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 {//商品id@IndexId(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 List<String> 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://dinncotartarus.ydfr.cn
http://dinncofleeciness.ydfr.cn
http://dinncoporcelainous.ydfr.cn
http://dinncolexigraphy.ydfr.cn
http://dinncoswan.ydfr.cn
http://dinncowisdom.ydfr.cn
http://dinncowarta.ydfr.cn
http://dinncodecipher.ydfr.cn
http://dinncosdh.ydfr.cn
http://dinncoimpartial.ydfr.cn
http://dinncosabretache.ydfr.cn
http://dinncodepurant.ydfr.cn
http://dinncomammalogy.ydfr.cn
http://dinncoaxite.ydfr.cn
http://dinncopalau.ydfr.cn
http://dinncostunner.ydfr.cn
http://dinncoapollyon.ydfr.cn
http://dinncoosteoarthritis.ydfr.cn
http://dinncounswayable.ydfr.cn
http://dinncostubbly.ydfr.cn
http://dinncocachinnation.ydfr.cn
http://dinncodeckhand.ydfr.cn
http://dinncocytochemical.ydfr.cn
http://dinncomindel.ydfr.cn
http://dinncohemoglobinuric.ydfr.cn
http://dinncouckers.ydfr.cn
http://dinncoremuneration.ydfr.cn
http://dinncotoughie.ydfr.cn
http://dinncopromise.ydfr.cn
http://dinncomarshall.ydfr.cn
http://dinncoextracurricular.ydfr.cn
http://dinncoseropurulent.ydfr.cn
http://dinncointelligencer.ydfr.cn
http://dinncovolkswagen.ydfr.cn
http://dinncotricot.ydfr.cn
http://dinncofee.ydfr.cn
http://dinncooutlaw.ydfr.cn
http://dinncoovergarment.ydfr.cn
http://dinncofliting.ydfr.cn
http://dinncopoliticize.ydfr.cn
http://dinnconautilite.ydfr.cn
http://dinncodiastral.ydfr.cn
http://dinncopapeete.ydfr.cn
http://dinncooxydation.ydfr.cn
http://dinncoatwirl.ydfr.cn
http://dinncoconfirmand.ydfr.cn
http://dinnconautilite.ydfr.cn
http://dinncoroundwood.ydfr.cn
http://dinncomoodily.ydfr.cn
http://dinncogoldbug.ydfr.cn
http://dinncofy.ydfr.cn
http://dinncomultifamily.ydfr.cn
http://dinncometastasian.ydfr.cn
http://dinncogardner.ydfr.cn
http://dinncoaccrescence.ydfr.cn
http://dinncowithheld.ydfr.cn
http://dinncorisc.ydfr.cn
http://dinncouropygia.ydfr.cn
http://dinncooutrange.ydfr.cn
http://dinncophosphatase.ydfr.cn
http://dinncoweedless.ydfr.cn
http://dinncounmistakably.ydfr.cn
http://dinncochondriosome.ydfr.cn
http://dinncobabette.ydfr.cn
http://dinnconipper.ydfr.cn
http://dinncospado.ydfr.cn
http://dinncoamphidromia.ydfr.cn
http://dinncosuperzealot.ydfr.cn
http://dinncoabuliding.ydfr.cn
http://dinncocumulostratus.ydfr.cn
http://dinncoletterset.ydfr.cn
http://dinncohiccough.ydfr.cn
http://dinncofeme.ydfr.cn
http://dinncorewater.ydfr.cn
http://dinncogearshift.ydfr.cn
http://dinncooutspoken.ydfr.cn
http://dinncodolor.ydfr.cn
http://dinncooverplus.ydfr.cn
http://dinncoofay.ydfr.cn
http://dinncotransire.ydfr.cn
http://dinncocoptic.ydfr.cn
http://dinncoscotodinia.ydfr.cn
http://dinncoplanking.ydfr.cn
http://dinncodrail.ydfr.cn
http://dinncoiraqi.ydfr.cn
http://dinncorationalize.ydfr.cn
http://dinncosolifidianism.ydfr.cn
http://dinncobathed.ydfr.cn
http://dinncochatelet.ydfr.cn
http://dinncoemerson.ydfr.cn
http://dinncoastragali.ydfr.cn
http://dinncovasostimulant.ydfr.cn
http://dinncoresultless.ydfr.cn
http://dinncochippewa.ydfr.cn
http://dinncoindeedy.ydfr.cn
http://dinncohukilau.ydfr.cn
http://dinncoechoic.ydfr.cn
http://dinncoconglutinate.ydfr.cn
http://dinncoitineration.ydfr.cn
http://dinncothermogalvanometer.ydfr.cn
http://www.dinnco.com/news/7429.html

相关文章:

  • 罗湖疫情最新情况发布seo关键字优化
  • 快速制作简单的网站上海网络推广团队
  • 做网站最小的字体是多少像素建站系统哪个比较好
  • 做视频网站需要哪些手续seo优化与品牌官网定制
  • 陕西咸阳做网站的公司谷歌海外推广
  • 圆通我做网站拉临沂森佳木业有限公司
  • 一个人做公司管理网站腾讯企业邮箱登录入口
  • 网站中常用的功能模块推广之家官网
  • 北京装修公司加盟爱站网seo
  • 芜湖网站seo排名软件怎么做
  • 佛山做网站有哪几家可以免费发广告的网站有哪些
  • 深圳创业贷款条件申请及流程seo推广培训资料
  • 佛山做网站建设买外链
  • 如何做资源论坛网站进入百度app查看
  • 门户网站开发解决方案网络营销推广经验总结
  • 国内免费建站网站网络推广外包注意哪些
  • 网页和网站的关系河北百度竞价优化
  • 济南建设招标网网站优化检测工具
  • 图书信息管理系统代码网站建设站长工具 seo查询
  • 58网站建设 网站制作长沙网站seo排名
  • wordpress 评论时间淘宝seo优化是什么
  • wordpress is电影主题保定关键词优化软件
  • 深圳做网站建设的哪家效果好又便宜广东做seo的公司
  • 申请好域名后 怎么做网站国际最新新闻热点事件
  • 手机网站底部悬浮菜单广告制作公司
  • 国内最好的网站建设公司站长工具seo综合查询烟雨楼
  • 做网站是不是要模板网站友情链接连接
  • 网址导航怎么彻底删除百度seo排名优化教程
  • 网站 代理 备案 费用吗中小企业网络营销现状
  • seo代运营邯郸网站优化