Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
0ba2d058
提交
0ba2d058
authored
11月 25, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改商品bug
上级
3a1b2142
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
52 行增加
和
51 行删除
+52
-51
TbCfStationItemServiceImpl.java
...com/platform/service/impl/TbCfStationItemServiceImpl.java
+50
-50
platform.properties
platform-admin/src/main/resources/dev/platform.properties
+1
-1
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+1
-0
没有找到文件。
platform-admin/src/main/java/com/platform/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
0ba2d058
...
...
@@ -204,26 +204,26 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
int
orederNum
=
1
;
List
<
TbCfItemSkusEntity
>
itemList
=
itemSkus
.
getPrevItem
();
//先清空之前的sku
tbCfItemSkusDao
.
deleteByItemId
(
itemId
);
//商品sku
//
tbCfItemSkusDao.deleteByItemId(itemId); //商品sku
//保存新的sku
List
<
TbCfItemSkusEntity
>
item
=
itemSkus
.
getPrevItem
();
for
(
TbCfItemSkusEntity
entity
:
item
)
{
TbCfItemSkusEntity
skusEntity
=
new
TbCfItemSkusEntity
();
skusEntity
.
setId
(
IdUtil
.
createIdbyUUID
());
skusEntity
.
setItemId
(
itemId
);
skusEntity
.
setDelFlag
(
1
);
skusEntity
.
setCreateTime
(
new
Date
());
skusEntity
.
setUpdateTime
(
new
Date
());
skusEntity
.
setSkuName
(
entity
.
getSkuName
());
skusEntity
.
setSkuDesc
(
entity
.
getSkuDesc
());
skusEntity
.
setSkuPrice
(
entity
.
getSkuPrice
());
skusEntity
.
setSkuCount
(
entity
.
getSkuCount
());
skusEntity
.
setOrderNum
(
orederNum
);
skusEntity
.
setSkuImg
(
entity
.
getSkuImg
());
skusEntity
.
setSkuCode
(
entity
.
getSkuCode
());
tbCfItemSkusDao
.
save
(
skusE
ntity
);
//
TbCfItemSkusEntity skusEntity = new TbCfItemSkusEntity();
//
skusEntity.setId(IdUtil.createIdbyUUID());
//
skusEntity.setItemId(itemId);
//
skusEntity.setDelFlag(1);
//
skusEntity.setCreateTime(new Date());
//
skusEntity.setUpdateTime(new Date());
//
skusEntity.setSkuName(entity.getSkuName());
//
skusEntity.setSkuDesc(entity.getSkuDesc());
//
skusEntity.setSkuPrice(entity.getSkuPrice());
//
skusEntity.setSkuCount(entity.getSkuCount());
//
skusEntity.setOrderNum(orederNum);
//
skusEntity.setSkuImg(entity.getSkuImg());
//
skusEntity.setSkuCode(entity.getSkuCode());
tbCfItemSkusDao
.
update
(
e
ntity
);
count
+=
entity
.
getSkuCount
();
orederNum
++;
//
orederNum++;
}
//先删除之前的商品参数
tbCfItemParamDao
.
deleteByItemId
(
itemId
);
...
...
@@ -297,40 +297,40 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
tbCfItemDescDao
.
update
(
itemDescEntity
);
}
//先删除之前的属性模板
tbCfCategoryDao
.
deleteByItemId
(
itemId
);
tbCfOptionDao
.
deleteByItemId
(
itemId
);
//商品规格
List
<
TbCfCategoryEntity
>
tree
=
itemSkus
.
getTree
();
for
(
int
i
=
0
;
i
<
tree
.
size
();
i
++)
{
String
cid
=
IdUtil
.
createIdbyUUID
();
String
categoryDesc
=
tree
.
get
(
i
).
getCategoryDesc
();
TbCfCategoryEntity
categoryEntity
=
new
TbCfCategoryEntity
();
categoryEntity
.
setCategoryId
(
cid
);
categoryEntity
.
setCreateTime
(
new
Date
());
categoryEntity
.
setUpdateTime
(
new
Date
());
categoryEntity
.
setDelFlag
(
1
);
categoryEntity
.
setItemId
(
itemId
);
categoryEntity
.
setCategoryName
(
tree
.
get
(
i
).
getCategoryName
());
categoryEntity
.
setCategoryDesc
(
categoryDesc
);
int
num
=
i
+
1
;
categoryEntity
.
setOrderNum
(
num
);
categoryEntity
.
setOption
(
"option"
+
num
);
tbCfCategoryDao
.
save
(
categoryEntity
);
String
[]
desc
=
categoryDesc
.
split
(
","
);
for
(
int
j
=
0
;
j
<
desc
.
length
;
j
++)
{
//商品属性
TbCfOptionEntity
optionEntity
=
new
TbCfOptionEntity
();
optionEntity
.
setOptionId
(
IdUtil
.
createIdbyUUID
());
optionEntity
.
setCid
(
cid
);
optionEntity
.
setItemId
(
itemId
);
optionEntity
.
setOptiionSpecies
(
desc
[
j
]);
optionEntity
.
setCreateTime
(
new
Date
());
optionEntity
.
setUpdateTime
(
new
Date
());
optionEntity
.
setDelFlag
(
1
);
optionEntity
.
setOptionName
(
"option"
+
num
);
tbCfOptionDao
.
save
(
optionEntity
);
}
}
//
tbCfCategoryDao.deleteByItemId(itemId);
//
tbCfOptionDao.deleteByItemId(itemId);
//
//商品规格
//
List<TbCfCategoryEntity> tree = itemSkus.getTree();
//
for (int i = 0; i < tree.size(); i++) {
//
String cid = IdUtil.createIdbyUUID();
//
String categoryDesc = tree.get(i).getCategoryDesc();
//
TbCfCategoryEntity categoryEntity = new TbCfCategoryEntity();
//
categoryEntity.setCategoryId(cid);
//
categoryEntity.setCreateTime(new Date());
//
categoryEntity.setUpdateTime(new Date());
//
categoryEntity.setDelFlag(1);
//
categoryEntity.setItemId(itemId);
//
categoryEntity.setCategoryName(tree.get(i).getCategoryName());
//
categoryEntity.setCategoryDesc(categoryDesc);
//
int num = i + 1;
//
categoryEntity.setOrderNum(num);
//
categoryEntity.setOption("option" + num);
//
tbCfCategoryDao.save(categoryEntity);
//
String[] desc = categoryDesc.split(",");
//
for (int j = 0; j < desc.length; j++) {
//
//商品属性
//
TbCfOptionEntity optionEntity = new TbCfOptionEntity();
//
optionEntity.setOptionId(IdUtil.createIdbyUUID());
//
optionEntity.setCid(cid);
//
optionEntity.setItemId(itemId);
//
optionEntity.setOptiionSpecies(desc[j]);
//
optionEntity.setCreateTime(new Date());
//
optionEntity.setUpdateTime(new Date());
//
optionEntity.setDelFlag(1);
//
optionEntity.setOptionName("option" + num);
//
tbCfOptionDao.save(optionEntity);
//
}
//
}
}
@Override
...
...
platform-admin/src/main/resources/dev/platform.properties
浏览文件 @
0ba2d058
...
...
@@ -6,7 +6,7 @@
#jdbc.username=root
#jdbc.password=diaoyun666
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.url
:
jdbc:mysql://159.138.48.71:3306/chinafrica
_ref
?useUnicode=true&characterEncoding=UTF-8&rewriteBatchedStatements=true&autoReconnect=true&failOverReadOnly=false&zeroDateTimeBehavior=convertToNull&useSSL=false
jdbc.username
:
root
jdbc.password
:
Diaoyunnuli.8
...
...
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
0ba2d058
...
...
@@ -712,6 +712,7 @@ let vm = new Vue({
_this
.
tmdSkudata
=
r
.
tbCfStationItem
.
itemSkusList
r
.
tbCfStationItem
.
itemSkusList
.
map
(
item
=>
{
_this
.
prevItem
.
push
({
id
:
item
.
id
,
skuImg
:
null
,
skuName
:
item
.
skuName
,
skuDesc
:
item
.
skuDesc
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论