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
d8862251
Commit
d8862251
authored
Feb 27, 2023
by
weijiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单时校验订单中sku数量
parent
6a086d5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
soss-system/src/main/java/com/soss/system/domain/Goods.java
+2
-0
soss-system/src/main/java/com/soss/system/service/impl/ShopServiceImpl.java
+9
-7
No files found.
soss-system/src/main/java/com/soss/system/domain/Goods.java
View file @
d8862251
...
@@ -131,8 +131,10 @@ public class Goods extends BaseEntity {
...
@@ -131,8 +131,10 @@ public class Goods extends BaseEntity {
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:dd"
)
private
Date
recommendDate
;
private
Date
recommendDate
;
/** 是否推荐 */
private
String
recommend
;
private
String
recommend
;
/** 是否特惠 */
private
String
preferential
;
private
String
preferential
;
/** 商品sku数量 */
/** 商品sku数量 */
...
...
soss-system/src/main/java/com/soss/system/service/impl/ShopServiceImpl.java
View file @
d8862251
...
@@ -288,19 +288,21 @@ public class ShopServiceImpl implements IShopService {
...
@@ -288,19 +288,21 @@ public class ShopServiceImpl implements IShopService {
shopRecommend
.
setShopId
(
String
.
valueOf
(
shopId
));
shopRecommend
.
setShopId
(
String
.
valueOf
(
shopId
));
shopRecommend
.
setGoodsId
(
String
.
valueOf
(
goods
.
getId
()));
shopRecommend
.
setGoodsId
(
String
.
valueOf
(
goods
.
getId
()));
shopRecommend
.
setType
(
"1"
);
shopRecommend
.
setType
(
"1"
);
goods
.
setPreferential
(
"1"
);
goods
.
setRecommend
(
"1"
);
List
<
ShopRecommend
>
shopRecommends
=
shopRecommendMapper
.
selectShopRecommendList
(
shopRecommend
);
List
<
ShopRecommend
>
shopRecommends
=
shopRecommendMapper
.
selectShopRecommendList
(
shopRecommend
);
if
(
shopRecommends
.
size
()
>
0
)
{
if
(
CollectionUtils
.
isEmpty
(
shopRecommends
)
)
{
goods
.
setRecommend
(
"0"
);
goods
.
setRecommend
(
"0"
);
}
}
else
{
if
(!
StringUtils
.
isEmpty
(
goods
.
getRecommendTag
()))
{
goods
.
setRecommend
(
"1"
);
goods
.
setRecommendTagList
(
JSON
.
parseArray
(
goods
.
getRecommendTag
(),
String
.
class
));
}
}
shopRecommend
.
setType
(
"2"
);
shopRecommend
.
setType
(
"2"
);
shopRecommends
=
shopRecommendMapper
.
selectShopRecommendList
(
shopRecommend
);
shopRecommends
=
shopRecommendMapper
.
selectShopRecommendList
(
shopRecommend
);
if
(
shopRecommends
.
size
()
>
0
)
{
if
(
CollectionUtils
.
isEmpty
(
shopRecommends
)
)
{
goods
.
setPreferential
(
"0"
);
goods
.
setPreferential
(
"0"
);
}
else
{
goods
.
setPreferential
(
"1"
);
}
if
(!
StringUtils
.
isEmpty
(
goods
.
getRecommendTag
()))
{
goods
.
setRecommendTagList
(
JSON
.
parseArray
(
goods
.
getRecommendTag
(),
String
.
class
));
}
}
goods
.
setSalesVolume
(
orderMapper
.
selectSalesVolume
(
shopId
,
goods
.
getId
()));
goods
.
setSalesVolume
(
orderMapper
.
selectSalesVolume
(
shopId
,
goods
.
getId
()));
...
...
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