Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
52f3d6ad
提交
52f3d6ad
authored
10月 17, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增推荐
上级
98540b94
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
28 行增加
和
8 行删除
+28
-8
MallGoodsDO.java
src/main/java/com/mmc/pms/entity/mall/MallGoodsDO.java
+9
-5
MallGoodsVO.java
src/main/java/com/mmc/pms/model/mall/MallGoodsVO.java
+4
-0
MallGoodsInfoQO.java
src/main/java/com/mmc/pms/model/sale/qo/MallGoodsInfoQO.java
+3
-0
AppMallGoodsDao.xml
src/main/resources/mapper/mall/AppMallGoodsDao.xml
+2
-1
MallGoodsDao.xml
src/main/resources/mapper/mall/MallGoodsDao.xml
+10
-2
没有找到文件。
src/main/java/com/mmc/pms/entity/mall/MallGoodsDO.java
浏览文件 @
52f3d6ad
...
...
@@ -71,7 +71,7 @@ public class MallGoodsDO implements Serializable {
private
Integer
sort
;
/**
* 商品热度
*
*
/
*/
private
Integer
hot
;
private
Integer
priceShow
;
...
...
@@ -82,6 +82,8 @@ public class MallGoodsDO implements Serializable {
private
Integer
deleted
;
private
Integer
recommend
;
private
String
url
;
private
Integer
type
;
private
Integer
imgId
;
...
...
@@ -99,14 +101,16 @@ public class MallGoodsDO implements Serializable {
this
.
goodsLabel
=
mallGoodsVO
.
getGoodsLabel
();
this
.
labelShow
=
mallGoodsVO
.
getLabelShow
();
this
.
priceShow
=
mallGoodsVO
.
getPriceShow
();
this
.
recommend
=
mallGoodsVO
.
getRecommend
();
this
.
goodsDetails
=
mallGoodsVO
.
getGoodsDetails
();
this
.
hot
=
mallGoodsVO
.
getHot
();
}
public
MallGoodsVO
buildMallGoodsVO
()
{
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
).
description
(
description
)
.
categoryPrimaryId
(
categoryPrimaryId
).
categorySubId
(
categorySubId
).
shelfStatus
(
shelfStatus
).
priceShow
(
priceShow
)
.
goodsLabel
(
goodsLabel
).
labelShow
(
labelShow
).
createTime
(
createTime
).
goodsDetails
(
goodsDetails
).
build
();
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
)
.
description
(
description
).
categoryPrimaryId
(
categoryPrimaryId
).
categorySubId
(
categorySubId
)
.
shelfStatus
(
shelfStatus
).
priceShow
(
priceShow
).
goodsLabel
(
goodsLabel
).
labelShow
(
labelShow
)
.
createTime
(
createTime
).
goodsDetails
(
goodsDetails
).
recommend
(
recommend
).
build
();
}
public
MallGoodsVO
buildListMallGoodsVO
()
{
...
...
@@ -116,7 +120,7 @@ public class MallGoodsDO implements Serializable {
goodsResourcesVO
.
setUrl
(
url
);
goodsResourcesVO
.
setType
(
type
);
resourcesList
.
add
(
goodsResourcesVO
);
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
).
resourcesList
(
resourcesList
)
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
recommend
(
recommend
).
tradeName
(
tradeName
).
resourcesList
(
resourcesList
)
.
categoryPrimaryId
(
categoryPrimaryId
).
labelShow
(
labelShow
).
goodsLabel
(
goodsLabel
).
categorySubId
(
categorySubId
)
.
shelfStatus
(
shelfStatus
).
createTime
(
createTime
).
description
(
description
).
priceShow
(
priceShow
).
build
();
}
...
...
src/main/java/com/mmc/pms/model/mall/MallGoodsVO.java
浏览文件 @
52f3d6ad
...
...
@@ -63,6 +63,10 @@ public class MallGoodsVO implements Serializable {
@ApiModelProperty
(
value
=
"标签是否显示 0否 1是"
)
private
Integer
labelShow
;
@ApiModelProperty
(
value
=
"是否推荐 0否 1是"
)
@NotNull
(
message
=
"是否推荐不能为空"
,
groups
=
{
Update
.
class
,
Create
.
class
})
private
Integer
recommend
;
@ApiModelProperty
(
value
=
"规格"
)
@NotEmpty
(
message
=
"规格不能为空"
,
groups
=
{
Update
.
class
,
Create
.
class
})
private
List
<
SpecAttrVO
>
specAttrList
;
...
...
src/main/java/com/mmc/pms/model/sale/qo/MallGoodsInfoQO.java
浏览文件 @
52f3d6ad
...
...
@@ -32,6 +32,9 @@ public class MallGoodsInfoQO {
@ApiModelProperty
(
value
=
"商品状态 0:下架 1:上架"
)
private
Integer
shelfStatus
;
@ApiModelProperty
(
value
=
"是否推荐 0:否 1:是"
)
private
Integer
recommend
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"页码不能为空"
,
...
...
src/main/resources/mapper/mall/AppMallGoodsDao.xml
浏览文件 @
52f3d6ad
...
...
@@ -14,6 +14,7 @@
mg.user_account_id,
mg.goods_label,
mg.label_show,
mg.recommend,
mg.category_sub_id,
mg.goods_label,
img.id as imgId, img.url,
...
...
@@ -74,7 +75,7 @@
<result
column=
"url"
property=
"url"
/>
<result
column=
"is_deleted"
property=
"deleted"
/>
<result
column=
"shelf_status"
property=
"shelfStatus"
/>
<collection
property=
"priceStockDOS"
ofType=
"com.mmc.pms.entity.mall.PriceStockDO"
>
<collection
property=
"priceStockDOS"
ofType=
"com.mmc.pms.entity.mall.PriceStockDO"
>
<id
column=
"productSpecId"
property=
"id"
/>
<result
column=
"product_spec"
property=
"productSpec"
/>
<result
column=
"sku_image"
property=
"skuImage"
/>
...
...
src/main/resources/mapper/mall/MallGoodsDao.xml
浏览文件 @
52f3d6ad
...
...
@@ -15,10 +15,12 @@
label_show,
goods_details,
user_account_id,
recommend,
price_show,
sort)
values ( #{goodsNo}, #{tradeName}, #{description}, #{categoryPrimaryId}, #{categorySubId}
, #{shelfStatus}, #{goodsLabel}, #{labelShow}, #{goodsDetails}, #{userAccountId}, #{priceShow}, #{sort})
, #{shelfStatus}, #{goodsLabel}, #{labelShow}, #{goodsDetails}
, #{userAccountId}, #{recommend}, #{priceShow}, #{sort})
</insert>
<insert
id=
"batchInsertMallGoodsResources"
>
...
...
@@ -69,7 +71,8 @@
goods_label = #{mallGoodsDO.goodsLabel},
label_show = #{mallGoodsDO.labelShow},
goods_details = #{mallGoodsDO.goodsDetails},
price_show = #{mallGoodsDO.priceShow}
price_show = #{mallGoodsDO.priceShow},
recommend = #{mallGoodsDO.recommend}
WHERE id = #{mallGoodsDO.id}
</update>
<update
id=
"updateMallGoodsSort"
>
...
...
@@ -158,6 +161,7 @@
goods_details,
user_account_id,
price_show,
recommend,
sort,
create_time
FROM mall_goods
...
...
@@ -205,6 +209,7 @@
mg.user_account_id,
mg.description,
mg.price_show,
mg.recommend,
img.id as imgId,
img.url,
img.type
...
...
@@ -226,6 +231,9 @@
<if
test=
"shelfStatus != null"
>
and mg.shelf_status = #{shelfStatus}
</if>
<if
test=
"recommend != null"
>
and mg.recommend = #{recommend}
</if>
</where>
ORDER BY
mg.shelf_status DESC , mg.sort DESC,mg.create_time DESC
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论