Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
1a0b595a
提交
1a0b595a
authored
12月 23, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
属性管理
上级
1dedca1a
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
62 行增加
和
13 行删除
+62
-13
TbCfItemParamEntity.java
...rc/main/java/com/platform/entity/TbCfItemParamEntity.java
+35
-1
AttributesServiceImpl.java
...java/com/platform/service/impl/AttributesServiceImpl.java
+2
-1
AttributesDescDao.xml
...src/main/resources/com/platform/dao/AttributesDescDao.xml
+1
-1
TbCfItemParamDao.xml
.../src/main/resources/com/platform/dao/TbCfItemParamDao.xml
+24
-10
没有找到文件。
platform-admin/src/main/java/com/platform/entity/TbCfItemParamEntity.java
浏览文件 @
1a0b595a
...
...
@@ -8,7 +8,7 @@ import java.util.Date;
* 表名 tb_cf_item_param
*
* @author lipengjun
* @date 2020-
05-20 10:50:25
* @date 2020-
12-23 17:12:46
*/
public
class
TbCfItemParamEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -37,6 +37,14 @@ public class TbCfItemParamEntity implements Serializable {
* 更新时间
*/
private
Date
updateTime
;
/**
* 属性ID
*/
private
String
attrId
;
/**
* 属性描述ID
*/
private
String
attrDescId
;
/**
* 设置:商品参数ID
...
...
@@ -116,4 +124,30 @@ public class TbCfItemParamEntity implements Serializable {
public
Date
getUpdateTime
()
{
return
updateTime
;
}
/**
* 设置:属性ID
*/
public
void
setAttrId
(
String
attrId
)
{
this
.
attrId
=
attrId
;
}
/**
* 获取:属性ID
*/
public
String
getAttrId
()
{
return
attrId
;
}
/**
* 设置:属性描述ID
*/
public
void
setAttrDescId
(
String
attrDescId
)
{
this
.
attrDescId
=
attrDescId
;
}
/**
* 获取:属性描述ID
*/
public
String
getAttrDescId
()
{
return
attrDescId
;
}
}
platform-admin/src/main/java/com/platform/service/impl/AttributesServiceImpl.java
浏览文件 @
1a0b595a
...
...
@@ -6,6 +6,7 @@ import com.platform.entity.AttributesDescEntity;
import
com.platform.entity.AttributesEntity
;
import
com.platform.service.AttributesService
;
import
com.platform.utils.IdUtil
;
import
com.platform.utils.StringUtils
;
import
com.platform.vo.AttributesExtends
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -74,7 +75,7 @@ public class AttributesServiceImpl implements AttributesService {
int
res
=
attributesDao
.
update
(
attributes
);
List
<
AttributesDescEntity
>
descs
=
attributes
.
getDescs
();
descs
.
forEach
(
attr
->
{
if
(
attr
.
getAttrDescId
()
!=
null
||
!
attr
.
getAttrDescId
().
isEmpty
())
{
if
(
StringUtils
.
isNotEmpty
(
attr
.
getAttrDescId
())
||
!
attr
.
getAttrDescId
().
isEmpty
())
{
attr
.
setUpdateTime
(
date
);
attributesDescDao
.
update
(
attr
);
}
else
{
...
...
platform-admin/src/main/resources/com/platform/dao/AttributesDescDao.xml
浏览文件 @
1a0b595a
...
...
@@ -36,7 +36,7 @@
`create_time`,
`update_time`
from attributes_desc
where attr_
desc_
id = #{id}
where attr_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.AttributesDescEntity"
>
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfItemParamDao.xml
浏览文件 @
1a0b595a
...
...
@@ -10,6 +10,8 @@
<result
property=
"itemId"
column=
"item_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"attrId"
column=
"attr_id"
/>
<result
property=
"attrDescId"
column=
"attr_desc_id"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfItemParamEntity"
>
...
...
@@ -19,7 +21,9 @@
`param_value`,
`item_id`,
`create_time`,
`update_time`
`update_time`,
`attr_id`,
`attr_desc_id`
from tb_cf_item_param
where id = #{id}
</select>
...
...
@@ -30,7 +34,9 @@
`param_value`,
`item_id`,
`create_time`,
`update_time`
`update_time`,
`attr_id`,
`attr_desc_id`
from tb_cf_item_param
where item_id = #{itemId}
</select>
...
...
@@ -41,7 +47,9 @@
`param_value`,
`item_id`,
`create_time`,
`update_time`
`update_time`,
`attr_id`,
`attr_desc_id`
from tb_cf_item_param
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
...
...
@@ -75,24 +83,30 @@
`param_value`,
`item_id`,
`create_time`,
`update_time`)
`update_time`,
`attr_id`,
`attr_desc_id`)
values(
#{id},
#{paramName},
#{paramValue},
#{itemId},
#{createTime},
#{updateTime})
#{updateTime},
#{attrId},
#{attrDescId})
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfItemParamEntity"
>
update tb_cf_item_param
<set>
<if
test=
"paramName != null"
>
`param_name` = #{paramName},
</if>
<if
test=
"paramValue != null"
>
`param_value` = #{paramValue},
</if>
<if
test=
"itemId != null"
>
`item_id` = #{itemId},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime}
</if>
<if
test=
"paramName != null"
>
`param_name` = #{paramName},
</if>
<if
test=
"paramValue != null"
>
`param_value` = #{paramValue},
</if>
<if
test=
"itemId != null"
>
`item_id` = #{itemId},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"updateTime != null"
>
`update_time` = #{updateTime},
</if>
<if
test=
"attrId != null"
>
`attr_id` = #{attrId},
</if>
<if
test=
"attrDescId != null"
>
`attr_desc_id` = #{attrDescId}
</if>
</set>
where id = #{id}
</update>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论