Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
234d607f
Commit
234d607f
authored
Jul 25, 2023
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
标准件
parent
0498e10c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
20 deletions
+28
-20
ch-admin-api/src/main/java/com/wwdz/ch/admin/entity/vo/CategoryVo.java
...src/main/java/com/wwdz/ch/admin/entity/vo/CategoryVo.java
+23
-15
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/CategoryServiceImpl.java
...main/java/com/wwdz/ch/admin/impl/CategoryServiceImpl.java
+5
-5
No files found.
ch-admin-api/src/main/java/com/wwdz/ch/admin/entity/vo/CategoryVo.java
View file @
234d607f
...
@@ -69,14 +69,14 @@ public class CategoryVo implements Serializable {
...
@@ -69,14 +69,14 @@ public class CategoryVo implements Serializable {
private
String
material
;
private
String
material
;
@ApiModelProperty
(
value
=
"直径
(mm * 100)
"
)
@ApiModelProperty
(
value
=
"直径
范围
"
)
private
Integer
diameter
;
private
String
diameter
;
@ApiModelProperty
(
value
=
" 厚度
(mm * 100)
"
)
@ApiModelProperty
(
value
=
" 厚度
范围
"
)
private
Integer
thickness
;
private
String
thickness
;
@ApiModelProperty
(
value
=
"重量
(g * 100)
"
)
@ApiModelProperty
(
value
=
"重量
范围
"
)
private
Integer
weight
;
private
String
weight
;
@ApiModelProperty
(
value
=
"合金成分分析表图片路径"
)
@ApiModelProperty
(
value
=
"合金成分分析表图片路径"
)
...
@@ -162,9 +162,9 @@ public class CategoryVo implements Serializable {
...
@@ -162,9 +162,9 @@ public class CategoryVo implements Serializable {
this
.
publisher
=
extractExtra
(
extraData
,
"publisher"
);
this
.
publisher
=
extractExtra
(
extraData
,
"publisher"
);
this
.
exiQuantity
=
extractExtraInt
(
extraData
,
"exiQuantity"
);
this
.
exiQuantity
=
extractExtraInt
(
extraData
,
"exiQuantity"
);
this
.
dynasty
=
extractExtra
(
extraData
,
"dynasty"
);
this
.
dynasty
=
extractExtra
(
extraData
,
"dynasty"
);
this
.
diameter
=
extractExtra
Int
(
extraData
,
"diameter"
);
this
.
diameter
=
extractExtra
String
(
extraData
,
"diameter"
);
this
.
thickness
=
extractExtra
Int
(
extraData
,
"thickness"
);
this
.
thickness
=
extractExtra
String
(
extraData
,
"thickness"
);
this
.
weight
=
extractExtra
Int
(
extraData
,
"weight"
);
this
.
weight
=
extractExtra
String
(
extraData
,
"weight"
);
this
.
extendName
=
extractExtra
(
extraData
,
"extendName"
);
this
.
extendName
=
extractExtra
(
extraData
,
"extendName"
);
this
.
serialNo
=
extractExtra
(
extraData
,
"serialNo"
);
this
.
serialNo
=
extractExtra
(
extraData
,
"serialNo"
);
this
.
caTableImage
=
extractExtra
(
extraData
,
"caTableImage"
);
this
.
caTableImage
=
extractExtra
(
extraData
,
"caTableImage"
);
...
@@ -288,27 +288,27 @@ public class CategoryVo implements Serializable {
...
@@ -288,27 +288,27 @@ public class CategoryVo implements Serializable {
this
.
extendName
=
extendName
;
this
.
extendName
=
extendName
;
}
}
public
Integer
getDiameter
()
{
public
String
getDiameter
()
{
return
diameter
;
return
diameter
;
}
}
public
void
setDiameter
(
Integer
diameter
)
{
public
void
setDiameter
(
String
diameter
)
{
this
.
diameter
=
diameter
;
this
.
diameter
=
diameter
;
}
}
public
Integer
getThickness
()
{
public
String
getThickness
()
{
return
thickness
;
return
thickness
;
}
}
public
void
setThickness
(
Integer
thickness
)
{
public
void
setThickness
(
String
thickness
)
{
this
.
thickness
=
thickness
;
this
.
thickness
=
thickness
;
}
}
public
Integer
getWeight
()
{
public
String
getWeight
()
{
return
weight
;
return
weight
;
}
}
public
void
setWeight
(
Integer
weight
)
{
public
void
setWeight
(
String
weight
)
{
this
.
weight
=
weight
;
this
.
weight
=
weight
;
}
}
...
@@ -326,6 +326,14 @@ public class CategoryVo implements Serializable {
...
@@ -326,6 +326,14 @@ public class CategoryVo implements Serializable {
return
null
;
return
null
;
}
}
private
String
extractExtraString
(
Map
<
String
,
Object
>
extraData
,
String
key
)
{
if
(!
StringUtils
.
isEmpty
(
extraData
.
get
(
key
)))
{
return
extraData
.
get
(
key
).
toString
();
}
return
null
;
}
public
Category
toDo
()
{
public
Category
toDo
()
{
Category
category
=
new
Category
();
Category
category
=
new
Category
();
category
.
setId
(
this
.
id
);
category
.
setId
(
this
.
id
);
...
...
ch-admin-api/src/main/java/com/wwdz/ch/admin/impl/CategoryServiceImpl.java
View file @
234d607f
...
@@ -62,17 +62,17 @@ public class CategoryServiceImpl implements CategoryService {
...
@@ -62,17 +62,17 @@ public class CategoryServiceImpl implements CategoryService {
categoryVo
.
setCategoryPath
(
StringUtils
.
join
(
categoryManager
.
getCategoryPath
(
c
.
getId
()),
">"
));
categoryVo
.
setCategoryPath
(
StringUtils
.
join
(
categoryManager
.
getCategoryPath
(
c
.
getId
()),
">"
));
//如果是叶子结点,就从商品表中查询标准件信息作为该分类的信息
//如果是叶子结点,就从商品表中查询标准件信息作为该分类的信息
if
(
c
.
getIsLeaf
())
{
/*
if (c.getIsLeaf()) {
Item item = itemManager.findStandard(categoryVo.getId());
Item item = itemManager.findStandard(categoryVo.getId());
if (item != null) {
if (item != null) {
String extra = item.getExtra();
String extra = item.getExtra();
Map<String, Object> map = JsonUtils.toMap(extra);
Map<String, Object> map = JsonUtils.toMap(extra);
categoryVo
.
setDiameter
(
map
.
get
(
"diameter"
)
==
null
?
null
:
Integer
.
valueOf
(
map
.
get
(
"diameter"
).
toString
()
));
categoryVo.setDiameter(map.get("diameter") == null? null:
map.get("diameter").toString(
));
categoryVo
.
setThickness
(
map
.
get
(
"thickness"
)==
null
?
null
:
Integer
.
valueOf
(
map
.
get
(
"thickness"
).
toString
()
));
categoryVo.setThickness(map.get("thickness")== null? null:
map.get("thickness").toString(
));
categoryVo
.
setWeight
(
map
.
get
(
"weight"
)==
null
?
null
:
Integer
.
valueOf
(
map
.
get
(
"weight"
).
toString
()
));
categoryVo.setWeight(map.get("weight")== null? null:
map.get("weight").toString(
));
categoryVo.setIcon(item.getTopImage());
categoryVo.setIcon(item.getTopImage());
}
}
}
}
*/
// categoryVoList.add(new CategoryVo(c));
// categoryVoList.add(new CategoryVo(c));
categoryVoList
.
add
(
categoryVo
);
categoryVoList
.
add
(
categoryVo
);
}
}
...
...
Write
Preview
Markdown
is supported
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