Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
514faba5
提交
514faba5
authored
10月 18, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' of
ssh://git.mmcuav.cn:8222/iuav/pms
into develop
上级
dc0551c0
1a32f3e4
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
168 行增加
和
36 行删除
+168
-36
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
AppMallGoodsController.java
...a/com/mmc/pms/controller/mall/AppMallGoodsController.java
+7
-7
CategoryDao.java
src/main/java/com/mmc/pms/dao/category/CategoryDao.java
+2
-0
MallGoodsDao.java
src/main/java/com/mmc/pms/dao/mall/MallGoodsDao.java
+2
-0
MallGoodsDO.java
src/main/java/com/mmc/pms/entity/mall/MallGoodsDO.java
+13
-6
MallGoodsVO.java
src/main/java/com/mmc/pms/model/mall/MallGoodsVO.java
+3
-0
RecommendVO.java
src/main/java/com/mmc/pms/model/mall/RecommendVO.java
+24
-0
MallGoodsInfoQO.java
src/main/java/com/mmc/pms/model/sale/qo/MallGoodsInfoQO.java
+3
-0
AppMallGoodsService.java
...in/java/com/mmc/pms/service/mall/AppMallGoodsService.java
+3
-4
AppMallGoodsServiceImpl.java
...om/mmc/pms/service/mall/impl/AppMallGoodsServiceImpl.java
+31
-15
CategoryDao.xml
src/main/resources/mapper/category/CategoryDao.xml
+15
-0
AppMallGoodsDao.xml
src/main/resources/mapper/mall/AppMallGoodsDao.xml
+2
-1
MallGoodsDao.xml
src/main/resources/mapper/mall/MallGoodsDao.xml
+61
-2
not-check.yml
src/main/resources/not-check.yml
+1
-0
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
514faba5
...
@@ -18,4 +18,4 @@ patches:
...
@@ -18,4 +18,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag
:
46346bc6755293aa41fd29fc40bb9aad22dff098
newTag
:
81b67df18155005f3f19ee2b615d97f1b7001eb3
src/main/java/com/mmc/pms/controller/mall/AppMallGoodsController.java
浏览文件 @
514faba5
...
@@ -2,10 +2,9 @@ package com.mmc.pms.controller.mall;
...
@@ -2,10 +2,9 @@ package com.mmc.pms.controller.mall;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.entity.mall.MallGoodsDO
;
import
com.mmc.pms.entity.mall.ProductBrowseDO
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.RecommendVO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
com.mmc.pms.model.sale.qo.MallGoodsInfoQO
;
import
com.mmc.pms.model.sale.qo.MallGoodsInfoQO
;
...
@@ -71,10 +70,11 @@ public class AppMallGoodsController extends BaseController {
...
@@ -71,10 +70,11 @@ public class AppMallGoodsController extends BaseController {
public
ResultBody
<
MallGoodsVO
>
listMallGoodsBySearch
(
@ApiParam
(
"商品查询条件QO"
)
@RequestBody
MallGoodsInfoQO
param
,
HttpServletRequest
request
)
{
public
ResultBody
<
MallGoodsVO
>
listMallGoodsBySearch
(
@ApiParam
(
"商品查询条件QO"
)
@RequestBody
MallGoodsInfoQO
param
,
HttpServletRequest
request
)
{
return
ResultBody
.
success
(
mallGoodsService
.
listMallGoodsBySearch
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
)));
return
ResultBody
.
success
(
mallGoodsService
.
listMallGoodsBySearch
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
)));
}
}
@ApiOperation
(
value
=
"商品浏览排行榜"
)
@PostMapping
(
"browseMallGoods"
)
@ApiOperation
(
value
=
"推荐商品"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
MallGoodsVO
.
class
)})
@GetMapping
(
"recommend"
)
public
ResultBody
<
MallGoodsVO
>
browseMallGoods
(
@RequestBody
MallGoodsDO
mallGoodsDO
,
ProductBrowseDO
productBrowseDO
,
HttpServletRequest
request
){
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RecommendVO
.
class
)})
return
appMallGoodsService
.
browseMallGoods
(
mallGoodsDO
,
productBrowseDO
,
this
.
getUserLoginInfoFromRedis
(
request
));
public
ResultBody
<
RecommendVO
>
recommend
()
{
return
appMallGoodsService
.
recommend
();
}
}
}
}
src/main/java/com/mmc/pms/dao/category/CategoryDao.java
浏览文件 @
514faba5
...
@@ -57,4 +57,6 @@ public interface CategoryDao {
...
@@ -57,4 +57,6 @@ public interface CategoryDao {
Integer
selectSubMallGoods
(
Integer
id
);
Integer
selectSubMallGoods
(
Integer
id
);
Integer
selectPrimary
(
Integer
id
);
Integer
selectPrimary
(
Integer
id
);
List
<
CategoryPrimaryDO
>
selectPrimaryListByIds
(
List
<
Integer
>
ids
);
}
}
src/main/java/com/mmc/pms/dao/mall/MallGoodsDao.java
浏览文件 @
514faba5
...
@@ -66,4 +66,6 @@ public interface MallGoodsDao {
...
@@ -66,4 +66,6 @@ public interface MallGoodsDao {
void
updateSpecAttrValue
(
SpecAttrVO
attrVO
);
void
updateSpecAttrValue
(
SpecAttrVO
attrVO
);
int
getMallGoodsCount
();
int
getMallGoodsCount
();
List
<
MallGoodsDO
>
recommendMallGoods
();
}
}
src/main/java/com/mmc/pms/entity/mall/MallGoodsDO.java
浏览文件 @
514faba5
...
@@ -6,11 +6,13 @@ import com.mmc.pms.model.mall.UavCartDTO;
...
@@ -6,11 +6,13 @@ import com.mmc.pms.model.mall.UavCartDTO;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
import
org.apache.commons.collections4.CollectionUtils
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* 商品基本信息(MallGoodsDO)实体类
* 商品基本信息(MallGoodsDO)实体类
...
@@ -71,7 +73,7 @@ public class MallGoodsDO implements Serializable {
...
@@ -71,7 +73,7 @@ public class MallGoodsDO implements Serializable {
private
Integer
sort
;
private
Integer
sort
;
/**
/**
* 商品热度
* 商品热度
*
*
/
*/
private
Integer
hot
;
private
Integer
hot
;
private
Integer
priceShow
;
private
Integer
priceShow
;
...
@@ -82,6 +84,8 @@ public class MallGoodsDO implements Serializable {
...
@@ -82,6 +84,8 @@ public class MallGoodsDO implements Serializable {
private
Integer
deleted
;
private
Integer
deleted
;
private
Integer
recommend
;
private
String
url
;
private
String
url
;
private
Integer
type
;
private
Integer
type
;
private
Integer
imgId
;
private
Integer
imgId
;
...
@@ -99,13 +103,15 @@ public class MallGoodsDO implements Serializable {
...
@@ -99,13 +103,15 @@ public class MallGoodsDO implements Serializable {
this
.
goodsLabel
=
mallGoodsVO
.
getGoodsLabel
();
this
.
goodsLabel
=
mallGoodsVO
.
getGoodsLabel
();
this
.
labelShow
=
mallGoodsVO
.
getLabelShow
();
this
.
labelShow
=
mallGoodsVO
.
getLabelShow
();
this
.
priceShow
=
mallGoodsVO
.
getPriceShow
();
this
.
priceShow
=
mallGoodsVO
.
getPriceShow
();
this
.
recommend
=
mallGoodsVO
.
getRecommend
()
==
null
?
0
:
mallGoodsVO
.
getRecommend
();
this
.
goodsDetails
=
mallGoodsVO
.
getGoodsDetails
();
this
.
goodsDetails
=
mallGoodsVO
.
getGoodsDetails
();
}
}
public
MallGoodsVO
buildMallGoodsVO
()
{
public
MallGoodsVO
buildMallGoodsVO
()
{
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
).
description
(
description
)
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
)
.
categoryPrimaryId
(
categoryPrimaryId
).
categorySubId
(
categorySubId
).
shelfStatus
(
shelfStatus
).
priceShow
(
priceShow
)
.
description
(
description
).
categoryPrimaryId
(
categoryPrimaryId
).
categorySubId
(
categorySubId
)
.
goodsLabel
(
goodsLabel
).
labelShow
(
labelShow
).
createTime
(
createTime
).
goodsDetails
(
goodsDetails
).
build
();
.
shelfStatus
(
shelfStatus
).
priceShow
(
priceShow
).
goodsLabel
(
goodsLabel
).
labelShow
(
labelShow
)
.
createTime
(
createTime
).
goodsDetails
(
goodsDetails
).
recommend
(
recommend
).
build
();
}
}
public
MallGoodsVO
buildListMallGoodsVO
()
{
public
MallGoodsVO
buildListMallGoodsVO
()
{
...
@@ -115,9 +121,10 @@ public class MallGoodsDO implements Serializable {
...
@@ -115,9 +121,10 @@ public class MallGoodsDO implements Serializable {
goodsResourcesVO
.
setUrl
(
url
);
goodsResourcesVO
.
setUrl
(
url
);
goodsResourcesVO
.
setType
(
type
);
goodsResourcesVO
.
setType
(
type
);
resourcesList
.
add
(
goodsResourcesVO
);
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
)
.
categoryPrimaryId
(
categoryPrimaryId
).
labelShow
(
labelShow
).
goodsLabel
(
goodsLabel
).
categorySubId
(
categorySubId
)
.
shelfStatus
(
shelfStatus
).
createTime
(
createTime
).
description
(
description
).
priceShow
(
priceShow
).
build
();
.
shelfStatus
(
shelfStatus
).
createTime
(
createTime
).
priceStock
(
CollectionUtils
.
isEmpty
(
priceStockDOS
)
?
null
:
priceStockDOS
.
stream
()
.
map
(
PriceStockDO:
:
buildPriceStockVO
).
collect
(
Collectors
.
toList
())).
description
(
description
).
priceShow
(
priceShow
).
build
();
}
}
public
UavCartDTO
buildUavCartDTO
()
{
public
UavCartDTO
buildUavCartDTO
()
{
...
...
src/main/java/com/mmc/pms/model/mall/MallGoodsVO.java
浏览文件 @
514faba5
...
@@ -63,6 +63,9 @@ public class MallGoodsVO implements Serializable {
...
@@ -63,6 +63,9 @@ public class MallGoodsVO implements Serializable {
@ApiModelProperty
(
value
=
"标签是否显示 0否 1是"
)
@ApiModelProperty
(
value
=
"标签是否显示 0否 1是"
)
private
Integer
labelShow
;
private
Integer
labelShow
;
@ApiModelProperty
(
value
=
"是否推荐 0否 1是"
)
private
Integer
recommend
;
@ApiModelProperty
(
value
=
"规格"
)
@ApiModelProperty
(
value
=
"规格"
)
@NotEmpty
(
message
=
"规格不能为空"
,
groups
=
{
Update
.
class
,
Create
.
class
})
@NotEmpty
(
message
=
"规格不能为空"
,
groups
=
{
Update
.
class
,
Create
.
class
})
private
List
<
SpecAttrVO
>
specAttrList
;
private
List
<
SpecAttrVO
>
specAttrList
;
...
...
src/main/java/com/mmc/pms/model/mall/RecommendVO.java
0 → 100644
浏览文件 @
514faba5
package
com
.
mmc
.
pms
.
model
.
mall
;
import
com.mmc.pms.model.category.dto.CategoryPrimaryDTO
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author LW
* @date 2023/10/17 14:03
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
RecommendVO
implements
Serializable
{
private
CategoryPrimaryDTO
categoryPrimaryDTO
;
private
List
<
MallGoodsVO
>
mallGoodsList
;
}
src/main/java/com/mmc/pms/model/sale/qo/MallGoodsInfoQO.java
浏览文件 @
514faba5
...
@@ -32,6 +32,9 @@ public class MallGoodsInfoQO {
...
@@ -32,6 +32,9 @@ public class MallGoodsInfoQO {
@ApiModelProperty
(
value
=
"商品状态 0:下架 1:上架"
)
@ApiModelProperty
(
value
=
"商品状态 0:下架 1:上架"
)
private
Integer
shelfStatus
;
private
Integer
shelfStatus
;
@ApiModelProperty
(
value
=
"是否推荐 0:否 1:是"
)
private
Integer
recommend
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
,
example
=
"1"
)
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
@NotNull
(
message
=
"页码不能为空"
,
message
=
"页码不能为空"
,
...
...
src/main/java/com/mmc/pms/service/mall/AppMallGoodsService.java
浏览文件 @
514faba5
package
com
.
mmc
.
pms
.
service
.
mall
;
package
com
.
mmc
.
pms
.
service
.
mall
;
import
com.mmc.pms.auth.dto.LoginSuccessDTO
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.entity.mall.MallGoodsDO
;
import
com.mmc.pms.entity.mall.ProductBrowseDO
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.RecommendVO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
...
@@ -25,5 +23,6 @@ public interface AppMallGoodsService {
...
@@ -25,5 +23,6 @@ public interface AppMallGoodsService {
List
<
UavCartDTO
>
listPriceStock
(
List
<
PriceStockQO
>
priceStockQOS
);
List
<
UavCartDTO
>
listPriceStock
(
List
<
PriceStockQO
>
priceStockQOS
);
ResultBody
<
MallGoodsVO
>
browseMallGoods
(
MallGoodsDO
mallGoodsDO
,
ProductBrowseDO
productBrowseDO
,
LoginSuccessDTO
userLoginInfoFromRedis
);
ResultBody
<
RecommendVO
>
recommend
();
}
}
src/main/java/com/mmc/pms/service/mall/impl/AppMallGoodsServiceImpl.java
浏览文件 @
514faba5
package
com
.
mmc
.
pms
.
service
.
mall
.
impl
;
package
com
.
mmc
.
pms
.
service
.
mall
.
impl
;
import
com.mmc.pms.auth.dto.LoginSuccessDTO
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.dao.category.CategoryDao
;
import
com.mmc.pms.dao.mall.AppMallGoodsDao
;
import
com.mmc.pms.dao.mall.AppMallGoodsDao
;
import
com.mmc.pms.dao.mall.MallGoodsDao
;
import
com.mmc.pms.entity.category.CategoryPrimaryDO
;
import
com.mmc.pms.entity.mall.MallGoodsDO
;
import
com.mmc.pms.entity.mall.MallGoodsDO
;
import
com.mmc.pms.entity.mall.PriceStockDO
;
import
com.mmc.pms.entity.mall.PriceStockDO
;
import
com.mmc.pms.
entity.mall.ProductBrowseD
O
;
import
com.mmc.pms.
model.category.dto.CategoryPrimaryDT
O
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.RecommendVO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
com.mmc.pms.service.mall.AppMallGoodsService
;
import
com.mmc.pms.service.mall.AppMallGoodsService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -31,6 +33,10 @@ import java.util.stream.Collectors;
...
@@ -31,6 +33,10 @@ import java.util.stream.Collectors;
public
class
AppMallGoodsServiceImpl
implements
AppMallGoodsService
{
public
class
AppMallGoodsServiceImpl
implements
AppMallGoodsService
{
@Resource
@Resource
private
AppMallGoodsDao
appMallGoodsDao
;
private
AppMallGoodsDao
appMallGoodsDao
;
@Resource
private
MallGoodsDao
mallGoodsDao
;
@Resource
private
CategoryDao
categoryDao
;
@Override
@Override
public
ResultBody
<
MallGoodsVO
>
queryBrandGoods
(
Integer
userAccountId
)
{
public
ResultBody
<
MallGoodsVO
>
queryBrandGoods
(
Integer
userAccountId
)
{
...
@@ -91,18 +97,28 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
...
@@ -91,18 +97,28 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
}
}
@Override
@Override
@Transactional
public
ResultBody
<
RecommendVO
>
recommend
()
{
public
ResultBody
<
MallGoodsVO
>
browseMallGoods
(
MallGoodsDO
mallGoodsDO
,
ProductBrowseDO
productBrowseDO
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
// 获取所有属于推荐的商品
//获取当前用户id
List
<
MallGoodsDO
>
mallGoodsList
=
mallGoodsDao
.
recommendMallGoods
();
Integer
userAccountId
=
userLoginInfoFromRedis
.
getUserAccountId
();
if
(
mallGoodsList
.
size
()
==
0
)
{
//记录查看商品的用户id
return
ResultBody
.
success
();
productBrowseDO
.
setUserId
(
userAccountId
);
if
(
productBrowseDO
.
getUserId
()
!=
null
){
Integer
hot
=
mallGoodsDO
.
getHot
();
hot
++;
}
}
List
<
RecommendVO
>
recommendList
=
new
ArrayList
<>();
// 获取所有一级分类
return
null
;
List
<
Integer
>
categoryPrimaryIdList
=
mallGoodsList
.
stream
().
map
(
MallGoodsDO:
:
getCategoryPrimaryId
).
distinct
().
collect
(
Collectors
.
toList
());
// 根据一级分类的id进行分组
Map
<
Integer
,
List
<
MallGoodsDO
>>
goodMap
=
mallGoodsList
.
stream
().
collect
(
Collectors
.
groupingBy
(
MallGoodsDO:
:
getCategoryPrimaryId
));
// 根据一级分类集合查询分类信息
List
<
CategoryPrimaryDO
>
categoryPrimaryList
=
categoryDao
.
selectPrimaryListByIds
(
categoryPrimaryIdList
);
List
<
CategoryPrimaryDTO
>
primaryList
=
categoryPrimaryList
.
stream
()
.
map
(
CategoryPrimaryDO:
:
buildCategoryPrimaryDTO
).
collect
(
Collectors
.
toList
());
primaryList
.
forEach
(
categoryPrimaryDTO
->
{
List
<
MallGoodsDO
>
goodsDOList
=
goodMap
.
get
(
categoryPrimaryDTO
.
getId
());
RecommendVO
recommendVO
=
new
RecommendVO
();
recommendVO
.
setCategoryPrimaryDTO
(
categoryPrimaryDTO
);
recommendVO
.
setMallGoodsList
(
goodsDOList
.
stream
().
map
(
MallGoodsDO:
:
buildListMallGoodsVO
).
collect
(
Collectors
.
toList
()));
recommendList
.
add
(
recommendVO
);
});
return
ResultBody
.
success
(
recommendList
);
}
}
}
}
src/main/resources/mapper/category/CategoryDao.xml
浏览文件 @
514faba5
...
@@ -225,5 +225,20 @@
...
@@ -225,5 +225,20 @@
from mall_goods
from mall_goods
where category_primary_id = #{id}
where category_primary_id = #{id}
</select>
</select>
<select
id=
"selectPrimaryListByIds"
resultType=
"com.mmc.pms.entity.category.CategoryPrimaryDO"
>
select id,
`name`,
description,
create_time,
icon,
sort
from category_primary
<where>
<foreach
collection=
"list"
item=
"item"
open=
"id in ("
close=
")"
separator=
","
>
#{item}
</foreach>
</where>
order by sort desc, update_time desc, create_time desc
</select>
</mapper>
</mapper>
src/main/resources/mapper/mall/AppMallGoodsDao.xml
浏览文件 @
514faba5
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
mg.user_account_id,
mg.user_account_id,
mg.goods_label,
mg.goods_label,
mg.label_show,
mg.label_show,
mg.recommend,
mg.category_sub_id,
mg.category_sub_id,
mg.goods_label,
mg.goods_label,
img.id as imgId, img.url,
img.id as imgId, img.url,
...
@@ -74,7 +75,7 @@
...
@@ -74,7 +75,7 @@
<result
column=
"url"
property=
"url"
/>
<result
column=
"url"
property=
"url"
/>
<result
column=
"is_deleted"
property=
"deleted"
/>
<result
column=
"is_deleted"
property=
"deleted"
/>
<result
column=
"shelf_status"
property=
"shelfStatus"
/>
<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"
/>
<id
column=
"productSpecId"
property=
"id"
/>
<result
column=
"product_spec"
property=
"productSpec"
/>
<result
column=
"product_spec"
property=
"productSpec"
/>
<result
column=
"sku_image"
property=
"skuImage"
/>
<result
column=
"sku_image"
property=
"skuImage"
/>
...
...
src/main/resources/mapper/mall/MallGoodsDao.xml
浏览文件 @
514faba5
...
@@ -15,10 +15,12 @@
...
@@ -15,10 +15,12 @@
label_show,
label_show,
goods_details,
goods_details,
user_account_id,
user_account_id,
recommend,
price_show,
price_show,
sort)
sort)
values ( #{goodsNo}, #{tradeName}, #{description}, #{categoryPrimaryId}, #{categorySubId}
values ( #{goodsNo}, #{tradeName}, #{description}, #{categoryPrimaryId}, #{categorySubId}
, #{shelfStatus}, #{goodsLabel}, #{labelShow}, #{goodsDetails}, #{userAccountId}, #{priceShow}, #{sort})
, #{shelfStatus}, #{goodsLabel}, #{labelShow}, #{goodsDetails}
, #{userAccountId}, #{recommend}, #{priceShow}, #{sort})
</insert>
</insert>
<insert
id=
"batchInsertMallGoodsResources"
>
<insert
id=
"batchInsertMallGoodsResources"
>
...
@@ -69,7 +71,8 @@
...
@@ -69,7 +71,8 @@
goods_label = #{mallGoodsDO.goodsLabel},
goods_label = #{mallGoodsDO.goodsLabel},
label_show = #{mallGoodsDO.labelShow},
label_show = #{mallGoodsDO.labelShow},
goods_details = #{mallGoodsDO.goodsDetails},
goods_details = #{mallGoodsDO.goodsDetails},
price_show = #{mallGoodsDO.priceShow}
price_show = #{mallGoodsDO.priceShow},
recommend = #{mallGoodsDO.recommend}
WHERE id = #{mallGoodsDO.id}
WHERE id = #{mallGoodsDO.id}
</update>
</update>
<update
id=
"updateMallGoodsSort"
>
<update
id=
"updateMallGoodsSort"
>
...
@@ -158,6 +161,7 @@
...
@@ -158,6 +161,7 @@
goods_details,
goods_details,
user_account_id,
user_account_id,
price_show,
price_show,
recommend,
sort,
sort,
create_time
create_time
FROM mall_goods
FROM mall_goods
...
@@ -192,6 +196,9 @@
...
@@ -192,6 +196,9 @@
<if
test=
"shelfStatus != null"
>
<if
test=
"shelfStatus != null"
>
and shelf_status = #{shelfStatus}
and shelf_status = #{shelfStatus}
</if>
</if>
<if
test=
"recommend != null"
>
and recommend = #{recommend}
</if>
</where>
</where>
</select>
</select>
<select
id=
"listMallGoods"
resultType=
"com.mmc.pms.entity.mall.MallGoodsDO"
>
<select
id=
"listMallGoods"
resultType=
"com.mmc.pms.entity.mall.MallGoodsDO"
>
...
@@ -205,6 +212,7 @@
...
@@ -205,6 +212,7 @@
mg.user_account_id,
mg.user_account_id,
mg.description,
mg.description,
mg.price_show,
mg.price_show,
mg.recommend,
img.id as imgId,
img.id as imgId,
img.url,
img.url,
img.type
img.type
...
@@ -226,6 +234,9 @@
...
@@ -226,6 +234,9 @@
<if
test=
"shelfStatus != null"
>
<if
test=
"shelfStatus != null"
>
and mg.shelf_status = #{shelfStatus}
and mg.shelf_status = #{shelfStatus}
</if>
</if>
<if
test=
"recommend != null"
>
and mg.recommend = #{recommend}
</if>
</where>
</where>
ORDER BY
ORDER BY
mg.shelf_status DESC , mg.sort DESC,mg.create_time DESC
mg.shelf_status DESC , mg.sort DESC,mg.create_time DESC
...
@@ -266,4 +277,52 @@
...
@@ -266,4 +277,52 @@
FROM mall_goods
FROM mall_goods
WHERE is_deleted = 0
WHERE is_deleted = 0
</select>
</select>
<resultMap
id=
"resultMallGoodsMap"
type=
"com.mmc.pms.entity.mall.MallGoodsDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"trade_name"
property=
"tradeName"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"category_primary_id"
property=
"categoryPrimaryId"
/>
<result
column=
"category_sub_id"
property=
"categorySubId"
/>
<result
column=
"description"
property=
"description"
/>
<result
column=
"recommend"
property=
"recommend"
/>
<result
column=
"imgId"
property=
"imgId"
/>
<result
column=
"price_show"
property=
"priceShow"
/>
<result
column=
"user_account_id"
property=
"userAccountId"
/>
<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"
>
<id
column=
"productSpecId"
property=
"id"
/>
<result
column=
"product_spec"
property=
"productSpec"
/>
<result
column=
"sku_image"
property=
"skuImage"
/>
<result
column=
"sale_price"
property=
"salePrice"
/>
<result
column=
"sku_no"
property=
"skuNo"
/>
</collection>
</resultMap>
<select
id=
"recommendMallGoods"
resultMap=
"resultMallGoodsMap"
>
SELECT mg.id,
mg.trade_name,
mg.shelf_status,
mg.create_time,
mg.category_primary_id,
mg.category_sub_id,
mg.user_account_id,
mg.description,
mg.price_show,
mg.recommend,
img.id as imgId,
img.url,
img.type,
ps.id as productSpecId,
ps.product_spec,
ps.sale_price,
ps.sku_image,
ps.sku_no
FROM mall_goods mg
INNER JOIN mall_goods_resources img ON mg.id = img.mall_goods_id
AND img.type = 0
LEFT JOIN price_stock ps ON ps.mall_goods_id = mg.id
where mg.is_deleted = 0
and mg.recommend = 1
</select>
</mapper>
</mapper>
src/main/resources/not-check.yml
浏览文件 @
514faba5
...
@@ -37,3 +37,4 @@ data-filter:
...
@@ -37,3 +37,4 @@ data-filter:
-
/pms/company-inspection/listInspectionPriceUnit
-
/pms/company-inspection/listInspectionPriceUnit
-
/pms/lease/goods/feignLeaseGoodsInfoByAddressId
-
/pms/lease/goods/feignLeaseGoodsInfoByAddressId
-
/pms/industry/listIndustry
-
/pms/industry/listIndustry
-
/pms/app/goods/recommend
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论