Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
603a2938
提交
603a2938
authored
7月 27, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
后台新增状态查询,小程序根据子分类数组查询
上级
1e10a7ee
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
27 行增加
和
15 行删除
+27
-15
AppMallGoodsController.java
...a/com/mmc/pms/controller/mall/AppMallGoodsController.java
+5
-7
AppMallGoodsDao.java
src/main/java/com/mmc/pms/dao/mall/AppMallGoodsDao.java
+1
-1
MallGoodsQO.java
src/main/java/com/mmc/pms/model/sale/qo/MallGoodsQO.java
+3
-0
AppMallGoodsService.java
...in/java/com/mmc/pms/service/mall/AppMallGoodsService.java
+3
-1
AppMallGoodsServiceImpl.java
...om/mmc/pms/service/mall/impl/AppMallGoodsServiceImpl.java
+2
-2
AppMallGoodsDao.xml
src/main/resources/mapper/mall/AppMallGoodsDao.xml
+5
-2
MallGoodsDao.xml
src/main/resources/mapper/mall/MallGoodsDao.xml
+8
-2
没有找到文件。
src/main/java/com/mmc/pms/controller/mall/AppMallGoodsController.java
浏览文件 @
603a2938
...
...
@@ -9,12 +9,10 @@ import io.swagger.annotations.Api;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* @Author LW
...
...
@@ -45,9 +43,9 @@ public class AppMallGoodsController extends BaseController {
}
@ApiOperation
(
value
=
"根据子分类查询商品信息"
)
@
Ge
tMapping
(
"queryGoodsInfoByCategorySub"
)
@
Pos
tMapping
(
"queryGoodsInfoByCategorySub"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
MallGoodsVO
.
class
)})
public
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
@Request
Param
Integer
categorySubId
)
{
return
appMallGoodsService
.
queryGoodsInfoByCategorySub
(
categorySubId
);
public
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
@Request
Body
List
<
Integer
>
categorySubIds
)
{
return
appMallGoodsService
.
queryGoodsInfoByCategorySub
(
categorySubId
s
);
}
}
src/main/java/com/mmc/pms/dao/mall/AppMallGoodsDao.java
浏览文件 @
603a2938
...
...
@@ -13,5 +13,5 @@ import java.util.List;
*/
@Mapper
public
interface
AppMallGoodsDao
{
List
<
MallGoodsDO
>
queryGoodsInfo
(
@Param
(
"userAccountId"
)
Integer
userAccountId
,
@Param
(
"categorySubId
"
)
Integer
categorySubId
);
List
<
MallGoodsDO
>
queryGoodsInfo
(
@Param
(
"userAccountId"
)
Integer
userAccountId
,
@Param
(
"categorySubId
s"
)
List
<
Integer
>
categorySubIds
);
}
src/main/java/com/mmc/pms/model/sale/qo/MallGoodsQO.java
浏览文件 @
603a2938
...
...
@@ -29,6 +29,9 @@ public class MallGoodsQO {
@ApiModelProperty
(
value
=
"用户id"
,
hidden
=
true
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"商品状态 0:下架 1:上架"
)
private
Integer
shelfStatus
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"页码不能为空"
,
...
...
src/main/java/com/mmc/pms/service/mall/AppMallGoodsService.java
浏览文件 @
603a2938
...
...
@@ -3,6 +3,8 @@ package com.mmc.pms.service.mall;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
java.util.List
;
/**
* @Author LW
* @date 2023/7/26 14:55
...
...
@@ -11,5 +13,5 @@ import com.mmc.pms.model.mall.MallGoodsVO;
public
interface
AppMallGoodsService
{
ResultBody
<
MallGoodsVO
>
queryBrandGoods
(
Integer
userAccountId
);
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
Integer
categorySubId
);
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
List
<
Integer
>
categorySubIds
);
}
src/main/java/com/mmc/pms/service/mall/impl/AppMallGoodsServiceImpl.java
浏览文件 @
603a2938
...
...
@@ -30,8 +30,8 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
@Override
public
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
Integer
categorySubId
)
{
List
<
MallGoodsDO
>
mallGoodsList
=
appMallGoodsDao
.
queryGoodsInfo
(
null
,
categorySubId
);
public
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
List
<
Integer
>
categorySubIds
)
{
List
<
MallGoodsDO
>
mallGoodsList
=
appMallGoodsDao
.
queryGoodsInfo
(
null
,
categorySubId
s
);
return
checkGoodsInfo
(
mallGoodsList
);
}
...
...
src/main/resources/mapper/mall/AppMallGoodsDao.xml
浏览文件 @
603a2938
...
...
@@ -26,8 +26,11 @@
<if
test=
"userAccountId != null"
>
and mg.user_account_id = #{userAccountId}
</if>
<if
test=
"categorySubId != null"
>
and mg.category_sub_id =#{categorySubId}
<if
test=
"categorySubIds != null"
>
<foreach
collection=
"categorySubIds"
item=
"item"
open=
"and mg.category_sub_id in ("
close=
")"
separator=
","
>
#{item}
</foreach>
</if>
</where>
</select>
...
...
src/main/resources/mapper/mall/MallGoodsDao.xml
浏览文件 @
603a2938
...
...
@@ -211,7 +211,10 @@
and category_primary_id = #{categoryPrimaryId}
</if>
<if
test=
"userAccountId != null"
>
and user_account_id = #{userAccountId}
and mg.user_account_id = #{userAccountId}
</if>
<if
test=
"shelfStatus != null"
>
and mg.shelf_status = #{shelfStatus}
</if>
</where>
</select>
...
...
@@ -239,7 +242,10 @@
and mg.category_primary_id = #{categoryPrimaryId}
</if>
<if
test=
"userAccountId != null"
>
and user_account_id = #{userAccountId}
and mg.user_account_id = #{userAccountId}
</if>
<if
test=
"shelfStatus != null"
>
and mg.shelf_status = #{shelfStatus}
</if>
</where>
ORDER BY
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论