Commit 1bf9a4b7 authored by macro's avatar macro
Browse files

连接es报错问题修复

parent bd1bc8b9
......@@ -91,8 +91,8 @@ public class UmsAdminServiceImpl implements UmsAdminService {
return null;
}
//将密码进行加密操作
String md5Password = passwordEncoder.encode(umsAdmin.getPassword());
umsAdmin.setPassword(md5Password);
String encodePassword = passwordEncoder.encode(umsAdmin.getPassword());
umsAdmin.setPassword(encodePassword);
adminMapper.insert(umsAdmin);
return umsAdmin;
}
......@@ -172,7 +172,9 @@ public class UmsAdminServiceImpl implements UmsAdminService {
@Override
public int update(Long id, UmsAdmin admin) {
admin.setId(id);
return adminMapper.updateByPrimaryKey(admin);
//密码已经加密处理,需要单独修改
admin.setPassword(null);
return adminMapper.updateByPrimaryKeySelective(admin);
}
@Override
......
......@@ -18,20 +18,20 @@ public class EsProduct implements Serializable {
private static final long serialVersionUID = -1L;
@Id
private Long id;
@Field(index = false)
@Field(type = FieldType.Keyword)
private String productSn;
private Long brandId;
@Field(index = false)
@Field(type = FieldType.Keyword)
private String brandName;
private Long productCategoryId;
@Field(index = false)
@Field(type = FieldType.Keyword)
private String productCategoryName;
private String pic;
@Field(analyzer = "ik_max_word")
@Field(analyzer = "ik_max_word",type = FieldType.Text)
private String name;
@Field(analyzer = "ik_max_word")
@Field(analyzer = "ik_max_word",type = FieldType.Text)
private String subTitle;
@Field(analyzer = "ik_max_word")
@Field(analyzer = "ik_max_word",type = FieldType.Text)
private String keywords;
private BigDecimal price;
private Integer sale;
......
package com.macro.mall.search.domain;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;
import java.io.Serializable;
......@@ -13,12 +14,12 @@ public class EsProductAttributeValue implements Serializable {
private Long id;
private Long productAttributeId;
//属性值
@Field(index = false)
@Field(type = FieldType.Keyword)
private String value;
//属性参数:0->规格;1->参数
private Integer type;
//属性名称
@Field(index = false)
@Field(type=FieldType.Keyword)
private String name;
public Long getId() {
return id;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment