Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
travel-cloud
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cloud
travel-cloud
Commits
5cc92d08
提交
5cc92d08
authored
4月 23, 2025
作者:
hzh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品增加没有数据过滤的列表
上级
4e45677d
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
18 行增加
和
9 行删除
+18
-9
ProductSpuController.java
...ll/controller/product/admin/spu/ProductSpuController.java
+11
-3
ProductSpuMapper.java
...ava/org/dromara/mall/mapper/product/ProductSpuMapper.java
+2
-2
ProductSpuService.java
...a/org/dromara/mall/service/product/ProductSpuService.java
+3
-2
ProductSpuServiceImpl.java
...mara/mall/service/product/impl/ProductSpuServiceImpl.java
+2
-2
没有找到文件。
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/controller/product/admin/spu/ProductSpuController.java
浏览文件 @
5cc92d08
...
@@ -103,14 +103,22 @@ public class ProductSpuController {
...
@@ -103,14 +103,22 @@ public class ProductSpuController {
@SaCheckPermission
(
"product:spu:query"
)
@SaCheckPermission
(
"product:spu:query"
)
public
R
<
List
<
ProductSpuRespVO
>>
getSpuList
(
@RequestParam
(
"spuIds"
)
Collection
<
Long
>
spuIds
)
{
public
R
<
List
<
ProductSpuRespVO
>>
getSpuList
(
@RequestParam
(
"spuIds"
)
Collection
<
Long
>
spuIds
)
{
return
R
.
ok
(
ProductSpuConvert
.
INSTANCE
.
convertForSpuDetailRespListVO
(
return
R
.
ok
(
ProductSpuConvert
.
INSTANCE
.
convertForSpuDetailRespListVO
(
productSpuService
.
getSpuList
(
spuIds
),
productSkuService
.
getSkuListBySpuId
(
spuIds
)));
productSpuService
.
getSpuList
(
spuIds
),
productSkuService
.
getSkuListBySpuId
(
spuIds
)));
}
}
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
@Operation
(
summary
=
"获得商品 SPU 分页"
)
@Operation
(
summary
=
"获得商品 SPU 分页"
)
@SaCheckPermission
(
"product:spu:query"
)
@SaCheckPermission
(
"product:spu:query"
)
public
R
<
PageResult
<
ProductSpuRespVO
>>
getSpuPage
(
@Valid
ProductSpuPageReqVO
pageVO
)
{
public
R
<
PageResult
<
ProductSpuRespVO
>>
getSpuPage
(
@Valid
ProductSpuPageReqVO
pageVO
)
{
PageResult
<
ProductSpuDO
>
pageResult
=
productSpuService
.
getSpuPage
(
pageVO
);
PageResult
<
ProductSpuDO
>
pageResult
=
productSpuService
.
getSpuPage
(
pageVO
,
true
);
return
R
.
ok
(
org
.
dromara
.
common
.
mybatis
.
util
.
BeanUtils
.
toBean
(
pageResult
,
ProductSpuRespVO
.
class
));
}
@GetMapping
(
"/all/page"
)
@Operation
(
summary
=
"获得商品 SPU 分页"
)
@SaCheckPermission
(
"product:spu:query"
)
public
R
<
PageResult
<
ProductSpuRespVO
>>
getSpuPageAll
(
@Valid
ProductSpuPageReqVO
pageVO
)
{
PageResult
<
ProductSpuDO
>
pageResult
=
productSpuService
.
getSpuPage
(
pageVO
,
false
);
return
R
.
ok
(
org
.
dromara
.
common
.
mybatis
.
util
.
BeanUtils
.
toBean
(
pageResult
,
ProductSpuRespVO
.
class
));
return
R
.
ok
(
org
.
dromara
.
common
.
mybatis
.
util
.
BeanUtils
.
toBean
(
pageResult
,
ProductSpuRespVO
.
class
));
}
}
...
@@ -127,7 +135,7 @@ public class ProductSpuController {
...
@@ -127,7 +135,7 @@ public class ProductSpuController {
public
void
exportSpuList
(
@Validated
ProductSpuPageReqVO
reqVO
,
public
void
exportSpuList
(
@Validated
ProductSpuPageReqVO
reqVO
,
HttpServletResponse
response
)
{
HttpServletResponse
response
)
{
reqVO
.
setPageSize
(
PAGE_SIZE_NONE
);
reqVO
.
setPageSize
(
PAGE_SIZE_NONE
);
List
<
ProductSpuDO
>
list
=
productSpuService
.
getSpuPage
(
reqVO
).
getList
();
List
<
ProductSpuDO
>
list
=
productSpuService
.
getSpuPage
(
reqVO
,
true
).
getList
();
ExcelUtil
.
exportExcel
(
BeanUtils
.
toBean
(
list
,
ProductSpuRespVO
.
class
),
"商品列表"
,
ProductSpuRespVO
.
class
,
response
);
ExcelUtil
.
exportExcel
(
BeanUtils
.
toBean
(
list
,
ProductSpuRespVO
.
class
),
"商品列表"
,
ProductSpuRespVO
.
class
,
response
);
}
}
...
...
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/mapper/product/ProductSpuMapper.java
浏览文件 @
5cc92d08
...
@@ -34,7 +34,7 @@ public interface ProductSpuMapper extends BaseMapperPlusPlus<ProductSpuDO, Produ
...
@@ -34,7 +34,7 @@ public interface ProductSpuMapper extends BaseMapperPlusPlus<ProductSpuDO, Produ
* @param reqVO 分页请求参数
* @param reqVO 分页请求参数
* @return 商品 SPU 分页列表数据
* @return 商品 SPU 分页列表数据
*/
*/
default
PageResult
<
ProductSpuDO
>
selectPage
(
ProductSpuPageReqVO
reqVO
)
{
default
PageResult
<
ProductSpuDO
>
selectPage
(
ProductSpuPageReqVO
reqVO
,
Boolean
dataPermission
)
{
Integer
tabType
=
reqVO
.
getTabType
();
Integer
tabType
=
reqVO
.
getTabType
();
LambdaQueryWrapperX
<
ProductSpuDO
>
queryWrapper
=
new
LambdaQueryWrapperX
<
ProductSpuDO
>()
LambdaQueryWrapperX
<
ProductSpuDO
>
queryWrapper
=
new
LambdaQueryWrapperX
<
ProductSpuDO
>()
.
likeIfPresent
(
ProductSpuDO:
:
getName
,
reqVO
.
getName
())
.
likeIfPresent
(
ProductSpuDO:
:
getName
,
reqVO
.
getName
())
...
@@ -44,7 +44,7 @@ public interface ProductSpuMapper extends BaseMapperPlusPlus<ProductSpuDO, Produ
...
@@ -44,7 +44,7 @@ public interface ProductSpuMapper extends BaseMapperPlusPlus<ProductSpuDO, Produ
.
orderByDesc
(
ProductSpuDO:
:
getId
);
.
orderByDesc
(
ProductSpuDO:
:
getId
);
appendTabQuery
(
tabType
,
queryWrapper
);
appendTabQuery
(
tabType
,
queryWrapper
);
// 设置权限
// 设置权限
if
(
CustomerDataPermissionHelper
.
isNeedFilter
())
{
if
(
dataPermission
&&
CustomerDataPermissionHelper
.
isNeedFilter
())
{
if
(
CustomerDataPermissionHelper
.
isNeedFilterDeptId
())
{
if
(
CustomerDataPermissionHelper
.
isNeedFilterDeptId
())
{
queryWrapper
.
in
(
ProductSpuDO:
:
getDeptId
,
CustomerDataPermissionHelper
.
getDeptIds
());
queryWrapper
.
in
(
ProductSpuDO:
:
getDeptId
,
CustomerDataPermissionHelper
.
getDeptIds
());
}
else
{
}
else
{
...
...
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/product/ProductSpuService.java
浏览文件 @
5cc92d08
...
@@ -82,10 +82,11 @@ public interface ProductSpuService {
...
@@ -82,10 +82,11 @@ public interface ProductSpuService {
/**
/**
* 获得商品 SPU 分页,提供给挂你兰后台使用
* 获得商品 SPU 分页,提供给挂你兰后台使用
*
*
* @param pageReqVO 分页查询
* @param pageReqVO 分页查询
* @param dataPermission 是否需要过滤权限
* @return 商品spu分页
* @return 商品spu分页
*/
*/
PageResult
<
ProductSpuDO
>
getSpuPage
(
ProductSpuPageReqVO
pageReqVO
);
PageResult
<
ProductSpuDO
>
getSpuPage
(
ProductSpuPageReqVO
pageReqVO
,
Boolean
dataPermission
);
/**
/**
* 获得商品 SPU 分页,提供给用户 App 使用
* 获得商品 SPU 分页,提供给用户 App 使用
...
...
ruoyi-modules/ruoyi-mall/src/main/java/org/dromara/mall/service/product/impl/ProductSpuServiceImpl.java
浏览文件 @
5cc92d08
...
@@ -209,8 +209,8 @@ public class ProductSpuServiceImpl implements ProductSpuService {
...
@@ -209,8 +209,8 @@ public class ProductSpuServiceImpl implements ProductSpuService {
}
}
@Override
@Override
public
PageResult
<
ProductSpuDO
>
getSpuPage
(
ProductSpuPageReqVO
pageReqVO
)
{
public
PageResult
<
ProductSpuDO
>
getSpuPage
(
ProductSpuPageReqVO
pageReqVO
,
Boolean
dataPermission
)
{
return
productSpuMapper
.
selectPage
(
pageReqVO
);
return
productSpuMapper
.
selectPage
(
pageReqVO
,
dataPermission
);
}
}
@Override
@Override
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论