Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
7f6a4aa4
提交
7f6a4aa4
authored
6月 09, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
编辑修复
上级
34f925a8
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
73 行增加
和
68 行删除
+73
-68
Categories.java
src/main/java/com/mmc/pms/entity/Categories.java
+62
-55
CategoriesInfoListDTO.java
...m/mmc/pms/model/categories/dto/CategoriesInfoListDTO.java
+6
-9
GoodsInfoServiceImpl.java
...n/java/com/mmc/pms/service/Impl/GoodsInfoServiceImpl.java
+5
-4
没有找到文件。
src/main/java/com/mmc/pms/entity/Categories.java
浏览文件 @
7f6a4aa4
package
com
.
mmc
.
pms
.
entity
;
import
com.mmc.pms.model.categories.dto.CategoriesInfoListDTO
;
import
com.mmc.pms.model.categories.dto.ClassifyDetailsDTO
;
import
com.mmc.pms.model.categories.dto.ClassifyInfoDTO
;
...
...
@@ -13,61 +12,70 @@ import java.io.Serializable;
import
java.util.Date
;
/**
* @author lw
* @TableName categories
* @author lw @TableName categories
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
Categories
implements
Serializable
{
private
Integer
id
;
private
Integer
parentId
;
private
String
name
;
private
String
icon
;
private
String
description
;
private
Integer
sort
;
private
Integer
type
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
deleted
;
private
Integer
directoryId
;
private
String
remark
;
public
Categories
(
ClassifyInfoVO
classifyInfoVO
)
{
this
.
id
=
classifyInfoVO
.
getId
();
this
.
parentId
=
classifyInfoVO
.
getPid
();
this
.
name
=
classifyInfoVO
.
getClassifyName
();
this
.
icon
=
classifyInfoVO
.
getIcon
();
this
.
description
=
classifyInfoVO
.
getDescription
();
this
.
type
=
classifyInfoVO
.
getType
();
this
.
directoryId
=
classifyInfoVO
.
getDirectoryId
();
this
.
remark
=
classifyInfoVO
.
getRemark
();
}
public
ClassifyInfoDTO
buildClassifyInfoDTO
()
{
return
ClassifyInfoDTO
.
builder
().
id
(
id
).
description
(
description
)
.
icon
(
icon
).
pid
(
parentId
).
classifyName
(
name
)
.
remark
(
remark
).
createTime
(
createTime
)
.
directoryId
(
directoryId
).
type
(
type
).
build
();
}
public
ClassifyDetailsDTO
buildClassifyDetailsDTO
()
{
return
ClassifyDetailsDTO
.
builder
().
id
(
id
).
description
(
description
)
.
icon
(
icon
).
classifyName
(
name
)
.
remark
(
remark
).
build
();
}
public
CategoriesInfoListDTO
buildCategoriesInfoListDTO
()
{
return
CategoriesInfoListDTO
.
builder
().
id
(
id
).
icon
(
icon
).
directoryId
(
directoryId
).
name
(
name
).
build
();
}
}
\ No newline at end of file
private
Integer
id
;
private
Integer
parentId
;
private
String
name
;
private
String
icon
;
private
String
description
;
private
Integer
sort
;
private
Integer
type
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
deleted
;
private
Integer
directoryId
;
private
String
remark
;
public
Categories
(
ClassifyInfoVO
classifyInfoVO
)
{
this
.
id
=
classifyInfoVO
.
getId
();
this
.
parentId
=
classifyInfoVO
.
getPid
();
this
.
name
=
classifyInfoVO
.
getClassifyName
();
this
.
icon
=
classifyInfoVO
.
getIcon
();
this
.
description
=
classifyInfoVO
.
getDescription
();
this
.
type
=
classifyInfoVO
.
getType
();
this
.
directoryId
=
classifyInfoVO
.
getDirectoryId
();
this
.
remark
=
classifyInfoVO
.
getRemark
();
}
public
ClassifyInfoDTO
buildClassifyInfoDTO
()
{
return
ClassifyInfoDTO
.
builder
()
.
id
(
id
)
.
description
(
description
)
.
icon
(
icon
)
.
pid
(
parentId
)
.
classifyName
(
name
)
.
remark
(
remark
)
.
createTime
(
createTime
)
.
directoryId
(
directoryId
)
.
type
(
type
)
.
build
();
}
public
ClassifyDetailsDTO
buildClassifyDetailsDTO
()
{
return
ClassifyDetailsDTO
.
builder
()
.
id
(
id
)
.
description
(
description
)
.
icon
(
icon
)
.
classifyName
(
name
)
.
remark
(
remark
)
.
build
();
}
public
CategoriesInfoListDTO
buildCategoriesInfoListDTO
()
{
return
CategoriesInfoListDTO
.
builder
().
id
(
id
).
icon
(
icon
).
name
(
name
).
build
();
}
}
src/main/java/com/mmc/pms/model/categories/dto/CategoriesInfoListDTO.java
浏览文件 @
7f6a4aa4
/**
* Copyright 2023 bejson.com
*/
/** Copyright 2023 bejson.com */
package
com
.
mmc
.
pms
.
model
.
categories
.
dto
;
import
lombok.AllArgsConstructor
;
...
...
@@ -19,8 +17,8 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor
@Builder
public
class
CategoriesInfoListDTO
{
private
Integer
id
;
private
Integer
directoryId
;
private
String
name
;
private
String
icon
;
}
\ No newline at end of file
private
Integer
id
;
private
Integer
directoryId
;
private
String
name
;
private
String
icon
;
}
src/main/java/com/mmc/pms/service/Impl/GoodsInfoServiceImpl.java
浏览文件 @
7f6a4aa4
...
...
@@ -380,6 +380,7 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateMallProductSkuSpec
(
GoodsAddVO
goodsAddVO
)
{
GoodsInfo
goodsInfo
=
new
GoodsInfo
(
goodsAddVO
);
// 1、普通的sku修改逻辑
List
<
GoodsProdSpecVO
>
specInfo
=
goodsAddVO
.
getProductSpec
().
stream
()
...
...
@@ -427,7 +428,7 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
// 1.4对新的sku进行操作
List
<
GoodsProdSpecVO
>
list
=
specInfo
.
stream
().
filter
(
d
->
d
.
getId
()
==
null
).
collect
(
Collectors
.
toList
());
productSkuSpecOperation
(
new
GoodsInfo
(
goodsAddVO
.
getId
())
,
list
);
productSkuSpecOperation
(
goodsInfo
,
list
);
// 获取商品对应的skuId
List
<
Integer
>
mallSkuIds
=
goodsAddVO
.
getProductSpec
().
stream
()
...
...
@@ -479,13 +480,13 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
.
filter
(
spec
->
spec
.
getFlag
().
equals
(
1
))
.
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
zdySpecInfo
))
{
updateCustomize
(
zdySpecInfo
,
goodsAddVO
.
getId
());
updateCustomize
(
goodsInfo
,
zdySpecInfo
,
goodsAddVO
.
getId
());
}
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updateCustomize
(
List
<
GoodsProdSpecVO
>
zdySpecInfo
,
Integer
id
)
{
public
void
updateCustomize
(
GoodsInfo
goodsInfo
,
List
<
GoodsProdSpecVO
>
zdySpecInfo
,
Integer
id
)
{
// 先获取自定义的sku及规格(原来有的)
List
<
GoodsProdSpecVO
>
zdySpec
=
...
...
@@ -561,7 +562,7 @@ public class GoodsInfoServiceImpl implements GoodsInfoService {
List
<
GoodsProdSpecVO
>
newZdySpec
=
zdySpecInfo
.
stream
().
filter
(
d
->
d
.
getId
()
==
null
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
newZdySpec
))
{
productSkuSpecOperation
(
new
GoodsInfo
(
id
)
,
newZdySpec
);
productSkuSpecOperation
(
goodsInfo
,
newZdySpec
);
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论