Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
mall
Commits
1bf9a4b7
Commit
1bf9a4b7
authored
Apr 12, 2019
by
macro
Browse files
连接es报错问题修复
parent
bd1bc8b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
mall-admin/src/main/java/com/macro/mall/service/impl/UmsAdminServiceImpl.java
View file @
1bf9a4b7
...
...
@@ -91,8 +91,8 @@ public class UmsAdminServiceImpl implements UmsAdminService {
return
null
;
}
//将密码进行加密操作
String
md5
Password
=
passwordEncoder
.
encode
(
umsAdmin
.
getPassword
());
umsAdmin
.
setPassword
(
md5
Password
);
String
encode
Password
=
passwordEncoder
.
encode
(
umsAdmin
.
getPassword
());
umsAdmin
.
setPassword
(
encode
Password
);
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
...
...
mall-search/src/main/java/com/macro/mall/search/domain/EsProduct.java
View file @
1bf9a4b7
...
...
@@ -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
;
...
...
mall-search/src/main/java/com/macro/mall/search/domain/EsProductAttributeValue.java
View file @
1bf9a4b7
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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment