记得上下班打卡 | 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
96fada6d
Commit
96fada6d
authored
Jan 21, 2022
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
~API:商品管理:SKU库存展示;
parent
019c8662
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
20 deletions
+29
-20
GoblinStoreMgtGoodsAddParam.java
...ervice/goblin/dto/manage/GoblinStoreMgtGoodsAddParam.java
+2
-1
GoblinStoreMgtGoodsEditSkuParam.java
...ce/goblin/dto/manage/GoblinStoreMgtGoodsEditSkuParam.java
+2
-2
GoblinGoodsSkuInfoVo.java
...liquidnet/service/goblin/dto/vo/GoblinGoodsSkuInfoVo.java
+0
-1
GoblinStoreMgtGoodsController.java
...blin/controller/manage/GoblinStoreMgtGoodsController.java
+3
-0
GoblinStoreMgtGoodsServiceImpl.java
...n/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
+22
-16
No files found.
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsAddParam.java
View file @
96fada6d
...
@@ -165,7 +165,8 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
...
@@ -165,7 +165,8 @@ public class GoblinStoreMgtGoodsAddParam implements Serializable {
vo
.
setVirtualFlg
(
this
.
getVirtualFlg
());
vo
.
setVirtualFlg
(
this
.
getVirtualFlg
());
vo
.
setStatus
(
"1"
);
vo
.
setStatus
(
"1"
);
// vo.setReason(null);
// vo.setReason(null);
vo
.
setShelvesStatus
(
"0"
);
// vo.setShelvesStatus("0");
vo
.
setShelvesStatus
(
vo
.
getShelvesHandle
().
equals
(
"2"
)
?
"3"
:
"0"
);
// 只有`上架处理方式`:2-直接上架售卖,直接上架
vo
.
setSpuAppear
(
"0"
);
vo
.
setSpuAppear
(
"0"
);
vo
.
setDelFlg
(
"0"
);
vo
.
setDelFlg
(
"0"
);
// vo.setShelvesAt(null);
// vo.setShelvesAt(null);
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/manage/GoblinStoreMgtGoodsEditSkuParam.java
View file @
96fada6d
...
@@ -43,9 +43,9 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
...
@@ -43,9 +43,9 @@ public class GoblinStoreMgtGoodsEditSkuParam implements Serializable {
private
BigDecimal
priceMember
;
private
BigDecimal
priceMember
;
@ApiModelProperty
(
position
=
18
,
required
=
false
,
value
=
"单品的重量[20,2]"
)
@ApiModelProperty
(
position
=
18
,
required
=
false
,
value
=
"单品的重量[20,2]"
)
private
BigDecimal
weight
;
private
BigDecimal
weight
;
@ApiModelProperty
(
position
=
19
,
required
=
true
,
value
=
"总库存
"
)
@ApiModelProperty
(
position
=
19
,
required
=
false
,
value
=
"总库存[添加SKU必传]
"
)
private
Integer
stock
;
private
Integer
stock
;
@ApiModelProperty
(
position
=
20
,
required
=
tru
e
,
value
=
"SKU库存"
)
@ApiModelProperty
(
position
=
20
,
required
=
fals
e
,
value
=
"SKU库存"
)
private
Integer
skuStock
;
private
Integer
skuStock
;
@ApiModelProperty
(
position
=
21
,
required
=
false
,
value
=
"预警库存"
)
@ApiModelProperty
(
position
=
21
,
required
=
false
,
value
=
"预警库存"
)
private
Integer
warningStock
;
private
Integer
warningStock
;
...
...
liquidnet-bus-api/liquidnet-service-goblin-api/src/main/java/com/liquidnet/service/goblin/dto/vo/GoblinGoodsSkuInfoVo.java
View file @
96fada6d
...
@@ -94,7 +94,6 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
...
@@ -94,7 +94,6 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
/* -------------------------------- 只展示,不存储 -------------------------------- */
/* -------------------------------- 只展示,不存储 -------------------------------- */
@ApiModelProperty
(
position
=
50
,
value
=
"剩余库存"
)
@ApiModelProperty
(
position
=
50
,
value
=
"剩余库存"
)
@JsonIgnore
private
Integer
surplusStock
;
private
Integer
surplusStock
;
private
static
final
GoblinGoodsSkuInfoVo
obj
=
new
GoblinGoodsSkuInfoVo
();
private
static
final
GoblinGoodsSkuInfoVo
obj
=
new
GoblinGoodsSkuInfoVo
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/controller/manage/GoblinStoreMgtGoodsController.java
View file @
96fada6d
...
@@ -155,6 +155,9 @@ public class GoblinStoreMgtGoodsController {
...
@@ -155,6 +155,9 @@ public class GoblinStoreMgtGoodsController {
if
(
null
!=
mgtGoodsInfoVo
)
{
if
(
null
!=
mgtGoodsInfoVo
)
{
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149007"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"149007"
));
}
}
if
(
storeMgtGoodsAddParam
.
getShelvesHandle
().
equals
(
"3"
)
&&
null
==
storeMgtGoodsAddParam
.
getShelvesTime
())
{
return
ResponseDto
.
failure
(
ErrorCode
.
HTTP_PARAM_ERROR
.
getCode
(),
"预约上架时间未指定"
);
}
LocalDateTime
now
=
LocalDateTime
.
now
();
LocalDateTime
now
=
LocalDateTime
.
now
();
GoblinGoodsInfoVo
goodsInfoVo
=
storeMgtGoodsAddParam
.
initGoodsInfoVo
();
GoblinGoodsInfoVo
goodsInfoVo
=
storeMgtGoodsAddParam
.
initGoodsInfoVo
();
...
...
liquidnet-bus-service/liquidnet-service-goblin/liquidnet-service-goblin-impl/src/main/java/com/liquidnet/service/goblin/service/impl/manage/GoblinStoreMgtGoodsServiceImpl.java
View file @
96fada6d
...
@@ -44,28 +44,30 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -44,28 +44,30 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
public
PagedResult
<
GoblinStoreMgtGoodsListVo
>
goodsList
(
GoblinStoreMgtGoodsFilterParam
filterParam
)
{
public
PagedResult
<
GoblinStoreMgtGoodsListVo
>
goodsList
(
GoblinStoreMgtGoodsFilterParam
filterParam
)
{
PagedResult
<
GoblinStoreMgtGoodsListVo
>
goodsListVoPagedResult
=
goblinMongoUtils
.
getMgtGoodsInfoVos
(
filterParam
);
PagedResult
<
GoblinStoreMgtGoodsListVo
>
goodsListVoPagedResult
=
goblinMongoUtils
.
getMgtGoodsInfoVos
(
filterParam
);
if
(
goodsListVoPagedResult
.
getTotal
()
>
0
)
{
if
(
goodsListVoPagedResult
.
getTotal
()
>
0
)
{
List
<
GoblinS
elfGoodsCategoryVo
>
selfGoodsCategoryVos
=
goblinStoreMgtExtraService
.
listCategoryVo
();
List
<
GoblinS
toreMgtGoodsListVo
>
voList
=
goodsListVoPagedResult
.
getList
();
List
<
GoblinSelfGoodsCategoryVo
>
selfGoodsCategoryVos
=
goblinStoreMgtExtraService
.
listCategoryVo
();
voList
.
forEach
(
vo
->
{
GoblinGoodsInfoVo
mgtGoodsInfoVo
=
goblinRedisUtils
.
getMgtGoodsInfoVo
(
vo
.
getSpuId
());
int
totalStock
=
0
,
surplusStock
=
0
;
for
(
String
skuId
:
mgtGoodsInfoVo
.
getSkuIdList
())
{
GoblinGoodsSkuInfoVo
mgtGoodsSkuInfoVo
=
goblinRedisUtils
.
getMgtGoodsSkuInfoVo
(
skuId
);
totalStock
+=
mgtGoodsSkuInfoVo
.
getStock
();
surplusStock
+=
goblinRedisUtils
.
getSkuStock
(
null
,
skuId
);
}
vo
.
setTotalStock
(
totalStock
);
vo
.
setSurplusStock
(
surplusStock
);
List
<
GoblinStoreMgtGoodsListVo
>
list
=
goodsListVoPagedResult
.
getList
();
String
cateFid
=
vo
.
getCateFid
(),
cateSid
=
vo
.
getCateSid
(),
cateTid
=
vo
.
getCateTid
();
list
.
forEach
(
r
->
{
String
cateFid
=
r
.
getCateFid
(),
cateSid
=
r
.
getCateSid
(),
cateTid
=
r
.
getCateTid
();
List
<
GoblinSelfGoodsCategoryVo
>
categoryVoList
=
selfGoodsCategoryVos
.
stream
()
List
<
GoblinSelfGoodsCategoryVo
>
categoryVoList
=
selfGoodsCategoryVos
.
stream
()
.
filter
(
cr
->
Arrays
.
asList
(
cateFid
,
cateSid
,
cateTid
).
contains
(
cr
.
getCateId
())).
collect
(
Collectors
.
toList
());
.
filter
(
cr
->
Arrays
.
asList
(
cateFid
,
cateSid
,
cateTid
).
contains
(
cr
.
getCateId
())).
collect
(
Collectors
.
toList
());
categoryVoList
.
forEach
(
cr
->
{
categoryVoList
.
forEach
(
cr
->
{
if
(
cr
.
getCateId
().
equals
(
cateFid
))
{
if
(
cr
.
getCateId
().
equals
(
cateFid
))
vo
.
setCateFid
(
cr
.
getName
());
r
.
setCateFid
(
cr
.
getName
());
if
(
cr
.
getCateId
().
equals
(
cateSid
))
vo
.
setCateSid
(
cr
.
getName
());
}
if
(
cr
.
getCateId
().
equals
(
cateSid
))
vo
.
setCateTid
(
cr
.
getName
());
if
(
cr
.
getCateId
().
equals
(
cateSid
))
{
r
.
setCateFid
(
cr
.
getName
());
}
if
(
cr
.
getCateId
().
equals
(
cateSid
))
{
r
.
setCateFid
(
cr
.
getName
());
}
});
});
});
});
goodsListVoPagedResult
.
setList
(
l
ist
);
goodsListVoPagedResult
.
setList
(
voL
ist
);
}
}
return
goodsListVoPagedResult
;
return
goodsListVoPagedResult
;
}
}
...
@@ -204,7 +206,11 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
...
@@ -204,7 +206,11 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
List
<
String
>
skuIdList
=
goodsInfoVo
.
getSkuIdList
();
List
<
String
>
skuIdList
=
goodsInfoVo
.
getSkuIdList
();
if
(!
CollectionUtils
.
isEmpty
(
skuIdList
))
{
if
(!
CollectionUtils
.
isEmpty
(
skuIdList
))
{
List
<
GoblinGoodsSkuInfoVo
>
goodsSkuInfoVoList
=
ObjectUtil
.
getGoblinGoodsSkuInfoVoArrayList
();
List
<
GoblinGoodsSkuInfoVo
>
goodsSkuInfoVoList
=
ObjectUtil
.
getGoblinGoodsSkuInfoVoArrayList
();
skuIdList
.
forEach
(
skuId
->
goodsSkuInfoVoList
.
add
(
goblinRedisUtils
.
getMgtGoodsSkuInfoVo
(
skuId
)));
skuIdList
.
forEach
(
skuId
->
{
GoblinGoodsSkuInfoVo
mgtGoodsSkuInfoVo
=
goblinRedisUtils
.
getMgtGoodsSkuInfoVo
(
skuId
);
mgtGoodsSkuInfoVo
.
setSurplusStock
(
goblinRedisUtils
.
getSkuStock
(
null
,
skuId
));
goodsSkuInfoVoList
.
add
(
mgtGoodsSkuInfoVo
);
});
vo
.
setGoodsSkuInfoVoList
(
goodsSkuInfoVoList
);
vo
.
setGoodsSkuInfoVoList
(
goodsSkuInfoVoList
);
}
}
}
}
...
...
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