连接es报错问题修复
This commit is contained in:
parent
bd1bc8b99e
commit
1bf9a4b7b7
@ -91,8 +91,8 @@ public class UmsAdminServiceImpl implements UmsAdminService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//将密码进行加密操作
|
//将密码进行加密操作
|
||||||
String md5Password = passwordEncoder.encode(umsAdmin.getPassword());
|
String encodePassword = passwordEncoder.encode(umsAdmin.getPassword());
|
||||||
umsAdmin.setPassword(md5Password);
|
umsAdmin.setPassword(encodePassword);
|
||||||
adminMapper.insert(umsAdmin);
|
adminMapper.insert(umsAdmin);
|
||||||
return umsAdmin;
|
return umsAdmin;
|
||||||
}
|
}
|
||||||
@ -172,7 +172,9 @@ public class UmsAdminServiceImpl implements UmsAdminService {
|
|||||||
@Override
|
@Override
|
||||||
public int update(Long id, UmsAdmin admin) {
|
public int update(Long id, UmsAdmin admin) {
|
||||||
admin.setId(id);
|
admin.setId(id);
|
||||||
return adminMapper.updateByPrimaryKey(admin);
|
//密码已经加密处理,需要单独修改
|
||||||
|
admin.setPassword(null);
|
||||||
|
return adminMapper.updateByPrimaryKeySelective(admin);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -18,20 +18,20 @@ public class EsProduct implements Serializable {
|
|||||||
private static final long serialVersionUID = -1L;
|
private static final long serialVersionUID = -1L;
|
||||||
@Id
|
@Id
|
||||||
private Long id;
|
private Long id;
|
||||||
@Field(index = false)
|
@Field(type = FieldType.Keyword)
|
||||||
private String productSn;
|
private String productSn;
|
||||||
private Long brandId;
|
private Long brandId;
|
||||||
@Field(index = false)
|
@Field(type = FieldType.Keyword)
|
||||||
private String brandName;
|
private String brandName;
|
||||||
private Long productCategoryId;
|
private Long productCategoryId;
|
||||||
@Field(index = false)
|
@Field(type = FieldType.Keyword)
|
||||||
private String productCategoryName;
|
private String productCategoryName;
|
||||||
private String pic;
|
private String pic;
|
||||||
@Field(analyzer = "ik_max_word")
|
@Field(analyzer = "ik_max_word",type = FieldType.Text)
|
||||||
private String name;
|
private String name;
|
||||||
@Field(analyzer = "ik_max_word")
|
@Field(analyzer = "ik_max_word",type = FieldType.Text)
|
||||||
private String subTitle;
|
private String subTitle;
|
||||||
@Field(analyzer = "ik_max_word")
|
@Field(analyzer = "ik_max_word",type = FieldType.Text)
|
||||||
private String keywords;
|
private String keywords;
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
private Integer sale;
|
private Integer sale;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.macro.mall.search.domain;
|
package com.macro.mall.search.domain;
|
||||||
|
|
||||||
import org.springframework.data.elasticsearch.annotations.Field;
|
import org.springframework.data.elasticsearch.annotations.Field;
|
||||||
|
import org.springframework.data.elasticsearch.annotations.FieldType;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@ -13,12 +14,12 @@ public class EsProductAttributeValue implements Serializable {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private Long productAttributeId;
|
private Long productAttributeId;
|
||||||
//属性值
|
//属性值
|
||||||
@Field(index = false)
|
@Field(type = FieldType.Keyword)
|
||||||
private String value;
|
private String value;
|
||||||
//属性参数:0->规格;1->参数
|
//属性参数:0->规格;1->参数
|
||||||
private Integer type;
|
private Integer type;
|
||||||
//属性名称
|
//属性名称
|
||||||
@Field(index = false)
|
@Field(type=FieldType.Keyword)
|
||||||
private String name;
|
private String name;
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user