记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
e07f5bc1
Commit
e07f5bc1
authored
May 12, 2026
by
姜秀龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sqb 规格
parent
b5d9dcb9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
17 deletions
+25
-17
GoblinStoreMgtGoodsEditSkuParam.java
...ce/goblin/dto/manage/GoblinStoreMgtGoodsEditSkuParam.java
+1
-2
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+9
-2
GoblinStoreMgtGoodsServiceImpl.java
...n/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
+15
-13
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsEditSkuParam.java
View file @
e07f5bc1
...
@@ -47,9 +47,8 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
...
@@ -47,9 +47,8 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
@NotNull
(
message
=
"单品默认图片不能为空"
)
@NotNull
(
message
=
"单品默认图片不能为空"
)
@Size
(
max
=
256
,
message
=
"单品默认图片URL过长"
)
@Size
(
max
=
256
,
message
=
"单品默认图片URL过长"
)
private
String
skuPic
;
private
String
skuPic
;
@ApiModelProperty
(
position
=
14
,
required
=
true
,
value
=
"单品规格信息
"
)
@ApiModelProperty
(
position
=
14
,
required
=
false
,
value
=
"单品规格信息;编辑时可不传或传[]表示沿用/无规格(如收钱吧同步SKU)
"
)
@Valid
@Valid
@NotNull
(
message
=
"规格信息不能为空"
)
private
List
<
GoblinGoodsSpecDto
>
skuSpecList
;
private
List
<
GoblinGoodsSpecDto
>
skuSpecList
;
@ApiModelProperty
(
position
=
15
,
required
=
false
,
value
=
"单品销售价-原价[20,2]"
)
@ApiModelProperty
(
position
=
15
,
required
=
false
,
value
=
"单品销售价-原价[20,2]"
)
private
BigDecimal
sellPrice
;
private
BigDecimal
sellPrice
;
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
e07f5bc1
...
@@ -948,8 +948,12 @@ public class GoblinStoreMgtGoodsController {
...
@@ -948,8 +948,12 @@ public class GoblinStoreMgtGoodsController {
Map
<
String
,
String
>
delSpuSpecMap
=
CollectionUtil
.
mapStringString
();
Map
<
String
,
String
>
delSpuSpecMap
=
CollectionUtil
.
mapStringString
();
Map
<
String
,
String
>
addSpuSpecMap
=
CollectionUtil
.
mapStringString
();
Map
<
String
,
String
>
addSpuSpecMap
=
CollectionUtil
.
mapStringString
();
{
// 规格校验、处理
{
// 规格校验、处理
Map
<
String
,
String
>
befSkuSpecNameVnameMap
=
mgtGoodsSkuInfoVo
.
getSkuSpecList
().
stream
()
if
(
null
==
mgtGoodsEditSkuParam
.
getSkuSpecList
())
{
.
collect
(
Collectors
.
toMap
(
GoblinGoodsSpecDto:
:
getSpecName
,
GoblinGoodsSpecDto:
:
getSpecVname
));
mgtGoodsEditSkuParam
.
setSkuSpecList
(
new
ArrayList
<>());
}
List
<
GoblinGoodsSpecDto
>
befSkuSpecList
=
mgtGoodsSkuInfoVo
.
getSkuSpecList
();
Map
<
String
,
String
>
befSkuSpecNameVnameMap
=
CollectionUtils
.
isEmpty
(
befSkuSpecList
)
?
CollectionUtil
.
mapStringString
()
:
befSkuSpecList
.
stream
().
collect
(
Collectors
.
toMap
(
GoblinGoodsSpecDto:
:
getSpecName
,
GoblinGoodsSpecDto:
:
getSpecVname
));
List
<
GoblinGoodsSpecDto
>
paramSkuSpecList
=
mgtGoodsEditSkuParam
.
getSkuSpecList
();
List
<
GoblinGoodsSpecDto
>
paramSkuSpecList
=
mgtGoodsEditSkuParam
.
getSkuSpecList
();
Set
<
String
>
befSkuSpecNameSet
=
befSkuSpecNameVnameMap
.
keySet
();
Set
<
String
>
befSkuSpecNameSet
=
befSkuSpecNameVnameMap
.
keySet
();
Map
<
String
,
String
>
paramUpdateSkuSpecMap
=
CollectionUtil
.
mapStringString
();
Map
<
String
,
String
>
paramUpdateSkuSpecMap
=
CollectionUtil
.
mapStringString
();
...
@@ -1268,6 +1272,9 @@ public class GoblinStoreMgtGoodsController {
...
@@ -1268,6 +1272,9 @@ public class GoblinStoreMgtGoodsController {
}
}
}
}
}
}
if
(
CollectionUtils
.
isEmpty
(
mgtGoodsEditSkuParam
.
getSkuSpecList
()))
{
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"规格信息不能为空"
);
}
List
<
String
>
skuIdList
=
goodsInfoVo
.
getSkuIdList
();
List
<
String
>
skuIdList
=
goodsInfoVo
.
getSkuIdList
();
List
<
GoblinGoodsSpecDto
>
paramSkuSpecDtoList
=
mgtGoodsEditSkuParam
.
getSkuSpecList
();
List
<
GoblinGoodsSpecDto
>
paramSkuSpecDtoList
=
mgtGoodsEditSkuParam
.
getSkuSpecList
();
for
(
String
skuId
:
skuIdList
)
{
// 比对所有SKU规格信息
for
(
String
skuId
:
skuIdList
)
{
// 比对所有SKU规格信息
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
View file @
e07f5bc1
...
@@ -1313,6 +1313,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -1313,6 +1313,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
boolean
updateGoodsInfoVoFlg
=
false
;
boolean
updateGoodsInfoVoFlg
=
false
;
List
<
GoblinGoodsSpecDto
>
skuSpecList
=
updateSkuInfoVo
.
getSkuSpecList
();
List
<
GoblinGoodsSpecDto
>
skuSpecList
=
updateSkuInfoVo
.
getSkuSpecList
();
List
<
GoblinGoodsSpecVo
>
specVoList
=
goodsInfoVo
.
getSpecVoList
();
List
<
GoblinGoodsSpecVo
>
specVoList
=
goodsInfoVo
.
getSpecVoList
();
if
(!
CollectionUtils
.
isEmpty
(
skuSpecList
))
{
skuSpecList
.
forEach
(
spec
->
{
skuSpecList
.
forEach
(
spec
->
{
String
specName
=
spec
.
getSpecName
(),
specVname
=
spec
.
getSpecVname
();
String
specName
=
spec
.
getSpecName
(),
specVname
=
spec
.
getSpecVname
();
...
@@ -1326,6 +1327,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -1326,6 +1327,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
.
add
(
new
Object
[]
{
specVname
,
marketSkuId
,
specName
}));
.
add
(
new
Object
[]
{
specVname
,
marketSkuId
,
specName
}));
}
}
});
});
}
if
(!
delSpuSpecMap
.
isEmpty
())
{
// 删除了规格值,需要同步SPU里的规格信息
if
(!
delSpuSpecMap
.
isEmpty
())
{
// 删除了规格值,需要同步SPU里的规格信息
updateGoodsInfoVoFlg
=
true
;
updateGoodsInfoVoFlg
=
true
;
goodsInfoVo
.
setUpdatedBy
(
uid
);
goodsInfoVo
.
setUpdatedBy
(
uid
);
...
...
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