Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
soss
Overview
Overview
Details
Activity
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
hooloo
ms
soss
Commits
3eac39b6
Commit
3eac39b6
authored
Mar 07, 2023
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复部分代码
parent
aab0b5e1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
38 deletions
+13
-38
soss-system/src/main/java/com/soss/system/service/impl/OrderTakingServiceImpl.java
+13
-38
No files found.
soss-system/src/main/java/com/soss/system/service/impl/OrderTakingServiceImpl.java
View file @
3eac39b6
...
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.soss.common.exception.ServiceException
;
import
com.soss.common.utils.StringUtils
;
import
com.soss.system.domain.*
;
import
com.soss.system.domain.vo.SkuCountVo
;
import
com.soss.system.domain.vo.orderTaking.*
;
import
com.soss.system.mapper.*
;
import
jodd.util.StringPool
;
...
...
@@ -74,45 +75,10 @@ public class OrderTakingServiceImpl {
ImagesVo
imagesVo
=
new
ImagesVo
();
imagesVo
.
setLeft
(
bannerService
.
getKDSBannerByShopId
(
shopId
));
orderTakingVo
.
setImages
(
imagesVo
);
// String menuLeft = sysConfigService.selectConfigByKey("menu.left");
// if (StringUtils.isNotEmpty(menuLeft)) {
// if (menuLeft.startsWith("[")) {
// imagesVo.setLeft(JSONArray.parseArray(menuLeft));
// } else {
// imagesVo.setLeft(JSONArray.parseArray(JSONArray.toJSONString(Collections.singletonList(menuLeft))));
// }
// }
// imagesVo.setRight(JSONObject.parseObject(sysConfigService.selectConfigByKey("menu.right")));
orderTakingVo
.
setCountOfOrder
(
sysConfigService
.
selectConfigByKey
(
"goods.limit"
));
orderTakingVo
.
setTips
(
sysConfigService
.
selectConfigByKey
(
"tips.address"
));
List
<
CategoryVo
>
categoryVos
=
new
ArrayList
<>();
// CategoryVo preferentialCategoryVo = new CategoryVo();
// categoryVos.add(preferentialCategoryVo);
// preferentialCategoryVo.setId(0L);
// preferentialCategoryVo.setName("今日特惠");
// //查询出该店铺今日特惠的商品
// List<GoodsVo> goodsVos = shopRecommendMapper.selectShopGoodsByTyepe("2", shopId);
// preferentialCategoryVo.setGoods(goodsVos);
// if(!CollectionUtils.isEmpty(goodsVos)){
// for (GoodsVo goodsVo : goodsVos) {
// GoodsTag goodsTag = new GoodsTag();
// goodsTag.setState("1");
// goodsVo.setSpecs(buildGoodsSpec(goodsVo.getSpecString()));
// goodsVo.setSpecString(null);
// goodsTag.setGoodsId(Long.parseLong(goodsVo.getGoodsId()));
// goodsVo.setPics(JSONObject.parseObject(goodsVo.getPictures()));
// goodsVo.setPictures(null);
// List<GoodsTag> goodsTags = goodsTagMapper.selectGoodsTagList(goodsTag);
// List<String> tags = goodsTags.stream().map(GoodsTag::getTag).collect(Collectors.toList());
// goodsVo.setTags(tags);
// //获取产品信息
// List<SkuVo> skuVos = shopGoodsSkuMapper.selectSkuByGoodAndShop(shopId, goodsVo.getGoodsId());
// buildSkuRules(skuVos);
// goodsVo.setSkus(skuVos);
// }
// }
//推荐
// List<String> recommendGoodsId = new ArrayList<>();
List
<
RecommendVo
>
recommendVos
=
new
ArrayList
<>();
List
<
GoodsVo
>
recommendGoods
=
shopRecommendMapper
.
selectShopGoodsByTyepe
(
"1"
,
shopId
);
...
...
@@ -168,7 +134,7 @@ public class OrderTakingServiceImpl {
categoryVo
.
setIcon
(
category
.
getIcon
());
List
<
Goods
>
goodsList
=
shopGoodsMapper
.
selectShopCategoryGoodsByCategoryId
(
shopId
,
category
.
getId
());
List
<
GoodsVo
>
goodsVoList
=
new
ArrayList
<>();
categoryVo
.
setGoods
(
goodsVoList
);
List
<
GoodsVo
>
selloutList
=
new
ArrayList
<>(
);
if
(!
CollectionUtils
.
isEmpty
(
goodsList
))
{
for
(
Goods
good
:
goodsList
)
{
GoodsVo
goodsVo
=
new
GoodsVo
();
...
...
@@ -203,9 +169,18 @@ public class OrderTakingServiceImpl {
List
<
SkuVo
>
skuVos
=
shopGoodsSkuMapper
.
selectSkuByGoodAndShop
(
shopId
,
goodsVo
.
getGoodsId
());
buildSkuRules
(
skuVos
);
goodsVo
.
setSkus
(
skuVos
);
goodsVoList
.
add
(
goodsVo
);
SkuCountVo
skuCountVo
=
shopGoodsSkuMapper
.
getSkuCount
(
shopId
,
good
.
getId
());
if
(
skuCountVo
==
null
||
skuCountVo
.
getSellin
()
==
null
||
skuCountVo
.
getSellin
()
<=
0
)
{
selloutList
.
add
(
goodsVo
);
}
else
{
goodsVoList
.
add
(
goodsVo
);
}
}
}
if
(!
CollectionUtils
.
isEmpty
(
selloutList
))
{
goodsVoList
.
addAll
(
selloutList
);
}
categoryVo
.
setGoods
(
goodsVoList
);
categoryVos
.
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