Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
67f8dea4
提交
67f8dea4
authored
7月 05, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复,商品名称查询
上级
56f7a706
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
22 行增加
和
9 行删除
+22
-9
WebDeviceDao.java
src/main/java/com/mmc/pms/dao/WebDeviceDao.java
+4
-2
WareInfoQO.java
src/main/java/com/mmc/pms/model/qo/WareInfoQO.java
+3
-0
ProductSpecVO.java
src/main/java/com/mmc/pms/model/sale/dto/ProductSpecVO.java
+1
-1
GoodsInfoServiceImpl.java
...n/java/com/mmc/pms/service/impl/GoodsInfoServiceImpl.java
+3
-1
WebDeviceServiceImpl.java
...n/java/com/mmc/pms/service/impl/WebDeviceServiceImpl.java
+2
-2
ProductDao.xml
src/main/resources/mapper/ProductDao.xml
+3
-3
WebDeviceDao.xml
src/main/resources/mapper/WebDeviceDao.xml
+6
-0
没有找到文件。
src/main/java/com/mmc/pms/dao/WebDeviceDao.java
浏览文件 @
67f8dea4
...
...
@@ -37,12 +37,14 @@ public interface WebDeviceDao {
int
countListWareInfoPage
(
@Param
(
"categoryIds"
)
List
<
Integer
>
categoryIds
,
@Param
(
"userIds"
)
List
<
Integer
>
userIds
,
@Param
(
"type"
)
Integer
type
);
@Param
(
"type"
)
Integer
type
,
@Param
(
"goodsName"
)
String
goodsName
);
List
<
GoodsInfo
>
listWareInfoPage
(
@Param
(
"param"
)
WareInfoQO
param
,
@Param
(
"userIds"
)
List
<
Integer
>
userIds
,
@Param
(
"type"
)
Integer
type
);
@Param
(
"type"
)
Integer
type
,
@Param
(
"goodsName"
)
String
goodsName
);
WareInfoDO
getWareInfoById
(
Integer
id
);
...
...
src/main/java/com/mmc/pms/model/qo/WareInfoQO.java
浏览文件 @
67f8dea4
...
...
@@ -23,6 +23,9 @@ public class WareInfoQO implements Serializable {
@ApiModelProperty
(
name
=
"districtId"
,
value
=
"地域id"
,
example
=
"440000"
)
private
Integer
provinceId
;
@ApiModelProperty
(
name
=
"goodsName"
,
value
=
"商品名称"
,
example
=
"6"
)
private
String
goodsName
;
@ApiModelProperty
(
name
=
"categoryId"
,
value
=
"分类id"
)
private
List
<
Integer
>
categoryId
;
...
...
src/main/java/com/mmc/pms/model/sale/dto/ProductSpecVO.java
浏览文件 @
67f8dea4
...
...
@@ -25,7 +25,7 @@ public class ProductSpecVO implements Serializable {
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"
productSkuI
d"
)
@ApiModelProperty
(
value
=
"
产品i
d"
)
@NotNull
(
message
=
"修改时productSkuId不能为空"
,
groups
=
{
Create
.
class
})
private
Integer
productSkuId
;
...
...
src/main/java/com/mmc/pms/service/impl/GoodsInfoServiceImpl.java
浏览文件 @
67f8dea4
...
...
@@ -520,8 +520,10 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
// 删除所有的随后在新增
productDao
.
removeProductSpecCPQ
(
productSpecCPQVO
);
productSkuService
.
insertSpecPrice
(
productSpecCPQVO
);
ProductSpecDO
productSpecDO
=
new
ProductSpecDO
(
d
);
productSpecDO
.
setId
(
productSpecCPQVO
.
getProductSpecId
());
// ②在修改自定义的数据
productDao
.
updateProductSpec
(
new
ProductSpecDO
(
d
)
);
productDao
.
updateProductSpec
(
productSpecDO
);
}
// 【2】删除多余的自定义规格
if
(!
CollectionUtils
.
isEmpty
(
goodsSpecVO
.
getDelProductSpecId
()))
{
...
...
src/main/java/com/mmc/pms/service/impl/WebDeviceServiceImpl.java
浏览文件 @
67f8dea4
...
...
@@ -179,14 +179,14 @@ public class WebDeviceServiceImpl implements WebDeviceService {
userIds
=
Collections
.
singletonList
(-
1
);
}
}
int
count
=
webDeviceDao
.
countListWareInfoPage
(
param
.
getCategoryId
(),
userIds
,
param
.
getType
());
int
count
=
webDeviceDao
.
countListWareInfoPage
(
param
.
getCategoryId
(),
userIds
,
param
.
getType
()
,
param
.
getGoodsName
()
);
if
(
count
==
0
)
{
return
ResultBody
.
success
(
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
));
}
int
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
GoodsInfo
>
list
=
webDeviceDao
.
listWareInfoPage
(
param
,
userIds
,
param
.
getType
());
List
<
GoodsInfo
>
list
=
webDeviceDao
.
listWareInfoPage
(
param
,
userIds
,
param
.
getType
()
,
param
.
getGoodsName
()
);
List
<
LeaseGoodsInfoDTO
>
pageList
=
list
.
stream
().
map
(
GoodsInfo:
:
buildLeaseGoodsInfoDTO
).
collect
(
Collectors
.
toList
());
if
(
StringUtils
.
isBlank
(
request
.
getHeader
(
TokenConstant
.
TOKEN
)))
{
...
...
src/main/resources/mapper/ProductDao.xml
浏览文件 @
67f8dea4
...
...
@@ -5,8 +5,8 @@
<mapper
namespace=
"com.mmc.pms.dao.ProductDao"
>
<insert
id=
"insertProductSku"
parameterType=
"com.mmc.pms.entity.ProductDO"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into product (product_name, model, brand_info_id, customize)
values (#{productName}, #{model}, #{brandInfoId}, #{customize})
insert into product (product_name, model, brand_info_id, customize
,`type`
)
values (#{productName}, #{model}, #{brandInfoId}, #{customize}
,#{type}
)
</insert>
<insert
id=
"insertProductSpec"
keyProperty=
"id"
useGeneratedKeys=
"true"
parameterType=
"com.mmc.pms.entity.ProductSpecDO"
>
...
...
@@ -138,7 +138,7 @@
</select>
<select
id=
"countSpecName"
resultType=
"java.lang.Integer"
>
select count(*) from product_spec
where spec_name = #{specName} and is_deleted = 0 and product_id = #{productId}
where spec_name = #{specName} and is_deleted = 0 and product_id = #{product
Sku
Id}
<if
test=
"id !=null and id !=''"
>
and id
<![CDATA[<>]]>
#{id}
</if>
...
...
src/main/resources/mapper/WebDeviceDao.xml
浏览文件 @
67f8dea4
...
...
@@ -169,6 +169,9 @@
#{user}
</foreach>
</if>
<if
test=
"goodsName != null and goodsName != ''"
>
and gi.goods_name like CONCAT('%',#{goodsName},'%')
</if>
</where>
</select>
...
...
@@ -193,6 +196,9 @@
#{user}
</foreach>
</if>
<if
test=
"goodsName != null and goodsName != ''"
>
and gi.goods_name like CONCAT('%',#{goodsName},'%')
</if>
</where>
order by gi.create_time asc
limit #{param.pageNo},#{param.pageSize}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论