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
34c558bf
Commit
34c558bf
authored
Feb 22, 2023
by
caiyt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/v2' into v2
parents
6ad67b28
86c0b006
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
20 deletions
+32
-20
soss-system/src/main/java/com/soss/system/domain/Goods.java
+4
-1
soss-system/src/main/java/com/soss/system/domain/vo/orderTaking/GoodsVo.java
+4
-0
soss-system/src/main/java/com/soss/system/service/impl/OrderTakingServiceImpl.java
+9
-7
soss-system/src/main/java/com/soss/system/service/impl/SysBannerServiceImpl.java
+6
-6
soss-system/src/main/resources/mapper/system/ShopGoodsMapper.xml
+8
-4
soss-system/src/main/resources/mapper/system/ShopRecommendMapper.xml
+1
-2
No files found.
soss-system/src/main/java/com/soss/system/domain/Goods.java
View file @
34c558bf
...
@@ -66,7 +66,7 @@ public class Goods extends BaseEntity {
...
@@ -66,7 +66,7 @@ public class Goods extends BaseEntity {
* 特惠标签
* 特惠标签
*/
*/
@Excel
(
name
=
"特惠标签"
)
@Excel
(
name
=
"特惠标签"
)
private
BigDecimal
recommendTag
;
private
String
recommendTag
;
/**
/**
* 制作用时 单位 秒
* 制作用时 单位 秒
...
@@ -145,6 +145,9 @@ public class Goods extends BaseEntity {
...
@@ -145,6 +145,9 @@ public class Goods extends BaseEntity {
@Excel
(
name
=
"商品编码"
)
@Excel
(
name
=
"商品编码"
)
private
String
code
;
private
String
code
;
/** 是否特惠商品 */
private
String
isRecommend
;
private
List
<
String
>
goodsTagList
;
private
List
<
String
>
goodsTagList
;
public
List
<
String
>
getGoodsTagList
()
{
public
List
<
String
>
getGoodsTagList
()
{
...
...
soss-system/src/main/java/com/soss/system/domain/vo/orderTaking/GoodsVo.java
View file @
34c558bf
...
@@ -26,7 +26,11 @@ public class GoodsVo {
...
@@ -26,7 +26,11 @@ public class GoodsVo {
private
String
specString
;
private
String
specString
;
/** 特惠商品 */
private
String
isRecommend
;
private
String
isRecommend
;
/** 特惠标签 */
private
String
recommendTag
;
private
String
category
;
private
String
category
;
}
}
soss-system/src/main/java/com/soss/system/service/impl/OrderTakingServiceImpl.java
View file @
34c558bf
...
@@ -104,7 +104,7 @@ public class OrderTakingServiceImpl {
...
@@ -104,7 +104,7 @@ public class OrderTakingServiceImpl {
// }
// }
// }
// }
//推荐
//推荐
List
<
String
>
recommendGoodsId
=
new
ArrayList
<>();
//
List<String> recommendGoodsId = new ArrayList<>();
List
<
RecommendVo
>
recommendVos
=
new
ArrayList
<>();
List
<
RecommendVo
>
recommendVos
=
new
ArrayList
<>();
List
<
GoodsVo
>
recommendGoods
=
shopRecommendMapper
.
selectShopGoodsByTyepe
(
"1"
,
shopId
);
List
<
GoodsVo
>
recommendGoods
=
shopRecommendMapper
.
selectShopGoodsByTyepe
(
"1"
,
shopId
);
...
@@ -125,7 +125,7 @@ public class OrderTakingServiceImpl {
...
@@ -125,7 +125,7 @@ public class OrderTakingServiceImpl {
goodsVo
.
setSpecString
(
null
);
goodsVo
.
setSpecString
(
null
);
goodsVo
.
setPics
(
JSONObject
.
parseObject
(
goodsVo
.
getPictures
()));
goodsVo
.
setPics
(
JSONObject
.
parseObject
(
goodsVo
.
getPictures
()));
goodsVo
.
setPictures
(
null
);
goodsVo
.
setPictures
(
null
);
recommendGoodsId
.
add
(
goodsVo
.
getGoodsId
());
//
recommendGoodsId.add(goodsVo.getGoodsId());
GoodsTag
goodsTag
=
new
GoodsTag
();
GoodsTag
goodsTag
=
new
GoodsTag
();
goodsTag
.
setState
(
"1"
);
goodsTag
.
setState
(
"1"
);
goodsTag
.
setGoodsId
(
Long
.
parseLong
(
goodsVo
.
getGoodsId
()));
goodsTag
.
setGoodsId
(
Long
.
parseLong
(
goodsVo
.
getGoodsId
()));
...
@@ -174,11 +174,13 @@ public class OrderTakingServiceImpl {
...
@@ -174,11 +174,13 @@ public class OrderTakingServiceImpl {
goodsVo
.
setSpecs
(
buildGoodsSpec
(
good
.
getSpec
()));
goodsVo
.
setSpecs
(
buildGoodsSpec
(
good
.
getSpec
()));
goodsVo
.
setCategory
(
good
.
getCategory
());
goodsVo
.
setCategory
(
good
.
getCategory
());
goodsVo
.
setSpecString
(
null
);
goodsVo
.
setSpecString
(
null
);
if
(
recommendGoodsId
.
contains
(
String
.
valueOf
(
good
.
getId
()))){
goodsVo
.
setIsRecommend
(
good
.
getIsRecommend
());
goodsVo
.
setIsRecommend
(
"1"
);
goodsVo
.
setRecommendTag
(
good
.
getRecommendTag
());
}
else
{
// if(recommendGoodsId.contains(String.valueOf(good.getId()))){
goodsVo
.
setIsRecommend
(
"0"
);
// goodsVo.setIsRecommend("1");
}
// }else{
// goodsVo.setIsRecommend("0");
// }
GoodsTag
goodsTag
=
new
GoodsTag
();
GoodsTag
goodsTag
=
new
GoodsTag
();
goodsTag
.
setState
(
"1"
);
goodsTag
.
setState
(
"1"
);
goodsTag
.
setGoodsId
(
Long
.
parseLong
(
goodsVo
.
getGoodsId
()));
goodsTag
.
setGoodsId
(
Long
.
parseLong
(
goodsVo
.
getGoodsId
()));
...
...
soss-system/src/main/java/com/soss/system/service/impl/SysBannerServiceImpl.java
View file @
34c558bf
...
@@ -40,9 +40,9 @@ public class SysBannerServiceImpl implements ISysBannerService {
...
@@ -40,9 +40,9 @@ public class SysBannerServiceImpl implements ISysBannerService {
if
(
StringUtils
.
isEmpty
(
banner
.
getImage
()))
{
if
(
StringUtils
.
isEmpty
(
banner
.
getImage
()))
{
throw
new
ServiceException
(
"图片地址不能为空"
);
throw
new
ServiceException
(
"图片地址不能为空"
);
}
}
if
(
StringUtils
.
isEmpty
(
banner
.
getPage
()))
{
//
if (StringUtils.isEmpty(banner.getPage())) {
throw
new
ServiceException
(
"链接地址不能为空"
);
//
throw new ServiceException("链接地址不能为空");
}
//
}
if
(
banner
.
getType
()
==
null
||
banner
.
getType
()
<
1
||
banner
.
getType
()
>
3
)
{
if
(
banner
.
getType
()
==
null
||
banner
.
getType
()
<
1
||
banner
.
getType
()
>
3
)
{
throw
new
ServiceException
(
"类型不正确,1-小程序,2-KDS,3-点单屏"
);
throw
new
ServiceException
(
"类型不正确,1-小程序,2-KDS,3-点单屏"
);
}
}
...
@@ -71,9 +71,9 @@ public class SysBannerServiceImpl implements ISysBannerService {
...
@@ -71,9 +71,9 @@ public class SysBannerServiceImpl implements ISysBannerService {
if
(
StringUtils
.
isEmpty
(
banner
.
getImage
()))
{
if
(
StringUtils
.
isEmpty
(
banner
.
getImage
()))
{
throw
new
ServiceException
(
"图片地址不能为空"
);
throw
new
ServiceException
(
"图片地址不能为空"
);
}
}
if
(
StringUtils
.
isEmpty
(
banner
.
getPage
()))
{
//
if (StringUtils.isEmpty(banner.getPage())) {
throw
new
ServiceException
(
"链接地址不能为空"
);
//
throw new ServiceException("链接地址不能为空");
}
//
}
if
(
banner
.
getType
()
==
null
||
banner
.
getType
()
<
1
||
banner
.
getType
()
>
3
)
{
if
(
banner
.
getType
()
==
null
||
banner
.
getType
()
<
1
||
banner
.
getType
()
>
3
)
{
throw
new
ServiceException
(
"类型不正确,1-小程序,2-KDS,3-点单屏"
);
throw
new
ServiceException
(
"类型不正确,1-小程序,2-KDS,3-点单屏"
);
}
}
...
...
soss-system/src/main/resources/mapper/system/ShopGoodsMapper.xml
View file @
34c558bf
...
@@ -92,10 +92,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -92,10 +92,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
g.remarks,
g.remarks,
g.shelf_at as shelfAt,
g.shelf_at as shelfAt,
g.code,
g.code,
'1' as state
'1' as state,
from shop_goods sg, goods g where sg.goods_id = g.id and g.state ='3' and g.is_deleted = 0
case when sr.id>0 then 1 else 0 end as isRecommend,
and shop_id = #{shopId} and category like concat('%,', #{categoryId}, ',%')
sr.recommend_tag
order by sg.turn
from goods g
LEFT JOIN shop_goods sg ON g.id = sg.goods_id
LEFT JOIN shop_recommend sr ON g.id = sr.goods_id and sr.`type` = 2
where g.state ='3' and g.is_deleted = 0 and sg.shop_id = #{shopId} and category like concat('%,', #{categoryId}, ',%')
order by sr.recommend_price DESC,sg.turn
</select>
</select>
<select
id=
"selectShopNoAddGoods"
resultType=
"com.soss.system.domain.Goods"
>
<select
id=
"selectShopNoAddGoods"
resultType=
"com.soss.system.domain.Goods"
>
select id, name, category, price, discount, take_time, spec, pics, `desc`, remarks, state, is_deleted, created_at, updated_at, code,shelf_at from goods
select id, name, category, price, discount, take_time, spec, pics, `desc`, remarks, state, is_deleted, created_at, updated_at, code,shelf_at from goods
...
...
soss-system/src/main/resources/mapper/system/ShopRecommendMapper.xml
View file @
34c558bf
...
@@ -135,8 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -135,8 +135,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and sr.`type` = #{type}
and sr.`type` = #{type}
and sr.shop_id =#{shopId}
and sr.shop_id =#{shopId}
and sr.state ='1' and g.is_deleted ='0'
and sr.state ='1' and g.is_deleted ='0'
order by
order by sr.turn
sr.recommend_price desc,sr.turn
</select>
</select>
<select
id=
"selectShopRecommendGoods"
resultType=
"com.soss.system.domain.Goods"
>
<select
id=
"selectShopRecommendGoods"
resultType=
"com.soss.system.domain.Goods"
>
select
select
...
...
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