Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
abf950cd
提交
abf950cd
authored
10月 21, 2019
作者:
zhengfg
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品管理添加价格字段
上级
443f1174
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
109 行增加
和
80 行删除
+109
-80
TbCfStationItemEntity.java
.../main/java/com/platform/entity/TbCfStationItemEntity.java
+20
-2
TbCfStationItemDao.xml
...rc/main/resources/com/platform/dao/TbCfStationItemDao.xml
+83
-75
tbcfstationitem.html
...min/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
+3
-0
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+1
-0
DateUtils.java
...rm-common/src/main/java/com/platform/utils/DateUtils.java
+2
-3
没有找到文件。
platform-admin/src/main/java/com/platform/entity/TbCfStationItemEntity.java
浏览文件 @
abf950cd
package
com
.
platform
.
entity
;
package
com
.
platform
.
entity
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
* 站点商品实体
* 站点商品实体
* 表名 tb_cf_station_item
* 表名 tb_cf_station_item
*
*
* @author
LHB
* @author
lipengjun
* @date 2019-10-
17 14:30:51
* @date 2019-10-
21 15:13:28
*/
*/
public
class
TbCfStationItemEntity
implements
Serializable
{
public
class
TbCfStationItemEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -33,6 +34,10 @@ public class TbCfStationItemEntity implements Serializable {
...
@@ -33,6 +34,10 @@ public class TbCfStationItemEntity implements Serializable {
* 商品一级分类
* 商品一级分类
*/
*/
private
String
itemCategory
;
private
String
itemCategory
;
/**
* 商品价格
*/
private
BigDecimal
itemPrice
;
/**
/**
* 商品链接
* 商品链接
*/
*/
...
@@ -131,6 +136,19 @@ public class TbCfStationItemEntity implements Serializable {
...
@@ -131,6 +136,19 @@ public class TbCfStationItemEntity implements Serializable {
public
String
getItemCategory
()
{
public
String
getItemCategory
()
{
return
itemCategory
;
return
itemCategory
;
}
}
/**
* 设置:商品价格
*/
public
void
setItemPrice
(
BigDecimal
itemPrice
)
{
this
.
itemPrice
=
itemPrice
;
}
/**
* 获取:商品价格
*/
public
BigDecimal
getItemPrice
()
{
return
itemPrice
;
}
/**
/**
* 设置:商品链接
* 设置:商品链接
*/
*/
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfStationItemDao.xml
浏览文件 @
abf950cd
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<result
property=
"itemName"
column=
"item_name"
/>
<result
property=
"itemName"
column=
"item_name"
/>
<result
property=
"itemBrief"
column=
"item_brief"
/>
<result
property=
"itemBrief"
column=
"item_brief"
/>
<result
property=
"itemCategory"
column=
"item_category"
/>
<result
property=
"itemCategory"
column=
"item_category"
/>
<result
property=
"itemPrice"
column=
"item_price"
/>
<result
property=
"itemUrl"
column=
"item_url"
/>
<result
property=
"itemUrl"
column=
"item_url"
/>
<result
property=
"itemImg"
column=
"item_img"
/>
<result
property=
"itemImg"
column=
"item_img"
/>
<result
property=
"platformCode"
column=
"platform_code"
/>
<result
property=
"platformCode"
column=
"platform_code"
/>
...
@@ -19,73 +20,76 @@
...
@@ -19,73 +20,76 @@
<result
property=
"itemDescritionId"
column=
"item_descrition_id"
/>
<result
property=
"itemDescritionId"
column=
"item_descrition_id"
/>
</resultMap>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfStationItemEntity"
>
<select
id=
"queryObject"
resultType=
"com.platform.entity.TbCfStationItemEntity"
>
select `item_id`,
select
`item_code`,
`item_id`,
`item_name`,
`item_code`,
`item_brief`,
`item_name`,
`item_category`,
`item_brief`,
`item_url`,
`item_category`,
`item_img`,
`item_price`,
`platform_code`,
`item_url`,
`platform_name`,
`item_img`,
`enable_flag`,
`platform_code`,
`create_time`,
`platform_name`,
`item_categorytwo`,
`enable_flag`,
`item_descrition_id`
`create_time`,
FROM
`item_categorytwo`,
tb_cf_station_item s
`item_descrition_id`
from tb_cf_station_item
where item_id = #{id}
where item_id = #{id}
</select>
</select>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfStationItemEntity"
>
<select
id=
"queryList"
resultType=
"com.platform.entity.TbCfStationItemEntity"
>
select `item_id`,
select
`item_code`,
`item_id`,
`item_name`,
`item_code`,
`item_brief`,
`item_name`,
`item_category`,
`item_brief`,
`item_url`,
`item_category`,
`item_img`,
`item_price`,
`platform_code`,
`item_url`,
`platform_name`,
`item_img`,
`enable_flag`,
`platform_code`,
`create_time`,
`platform_name`,
`item_categorytwo`,
`enable_flag`,
`item_descrition_id`
`create_time`,
FROM
`item_categorytwo`,
tb_cf_station_item s
`item_descrition_id`
WHERE 1=1
from tb_cf_station_item
<if
test=
"name != null and name.trim() != ''"
>
WHERE 1=1
AND name LIKE concat('%',#{name},'%')
<if
test=
"name != null and name.trim() != ''"
>
</if>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
order by ${sidx} ${order}
</when>
</when>
<otherwise>
<otherwise>
order by item_id desc
order by item_id desc
</otherwise>
</otherwise>
</choose>
</choose>
<if
test=
"offset != null and limit != null"
>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
limit #{offset}, #{limit}
</if>
</if>
</select>
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_station_item
select count(*) from tb_cf_station_item
WHERE 1=1
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
AND name LIKE concat('%',#{name},'%')
</if>
</if>
</select>
</select>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
<insert
id=
"save"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
insert into tb_cf_station_item(
insert into tb_cf_station_item(
`item_id`,
`item_id`,
`item_code`,
`item_code`,
`item_name`,
`item_name`,
`item_brief`,
`item_brief`,
`item_category`,
`item_category`,
`item_price`,
`item_url`,
`item_url`,
`item_img`,
`item_img`,
`platform_code`,
`platform_code`,
...
@@ -100,6 +104,7 @@
...
@@ -100,6 +104,7 @@
#{itemName},
#{itemName},
#{itemBrief},
#{itemBrief},
#{itemCategory},
#{itemCategory},
#{itemPrice},
#{itemUrl},
#{itemUrl},
#{itemImg},
#{itemImg},
#{platformCode},
#{platformCode},
...
@@ -109,35 +114,38 @@
...
@@ -109,35 +114,38 @@
#{itemCategorytwo},
#{itemCategorytwo},
#{itemDescritionId})
#{itemDescritionId})
</insert>
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
update tb_cf_station_item
<set>
<if
test=
"itemCode != null"
>
`item_code` = #{itemCode},
</if>
<if
test=
"itemName != null"
>
`item_name` = #{itemName},
</if>
<if
test=
"itemBrief != null"
>
`item_brief` = #{itemBrief},
</if>
<if
test=
"itemCategory != null"
>
`item_category` = #{itemCategory},
</if>
<if
test=
"itemPrice != null"
>
`item_price` = #{itemPrice},
</if>
<if
test=
"itemUrl != null"
>
`item_url` = #{itemUrl},
</if>
<if
test=
"itemImg != null"
>
`item_img` = #{itemImg},
</if>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"itemCategorytwo != null"
>
`item_categorytwo` = #{itemCategorytwo},
</if>
<if
test=
"itemDescritionId != null"
>
`item_descrition_id` = #{itemDescritionId}
</if>
</set>
where item_id = #{itemId}
</update>
<delete
id=
"delete"
>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfStationItemEntity"
>
update tb_cf_station_item
<set>
<if
test=
"itemCode != null"
>
`item_code` = #{itemCode},
</if>
<if
test=
"itemName != null"
>
`item_name` = #{itemName},
</if>
<if
test=
"itemBrief != null"
>
`item_brief` = #{itemBrief},
</if>
<if
test=
"itemCategory != null"
>
`item_category` = #{itemCategory},
</if>
<if
test=
"itemUrl != null"
>
`item_url` = #{itemUrl},
</if>
<if
test=
"itemImg != null"
>
`item_img` = #{itemImg},
</if>
<if
test=
"platformCode != null"
>
`platform_code` = #{platformCode},
</if>
<if
test=
"platformName != null"
>
`platform_name` = #{platformName},
</if>
<if
test=
"enableFlag != null"
>
`enable_flag` = #{enableFlag},
</if>
<if
test=
"createTime != null"
>
`create_time` = #{createTime},
</if>
<if
test=
"itemCategorytwo != null"
>
`item_categorytwo` = #{itemCategorytwo},
</if>
<if
test=
"itemDescritionId != null"
>
`item_descrition_id` = #{itemDescritionId}
</if>
</set>
where item_id = #{itemId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_station_item where item_id = #{value}
delete from tb_cf_station_item where item_id = #{value}
</delete>
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_station_item where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_station_item where item_id in
<foreach
item=
"itemId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{itemId}
</foreach>
</delete>
</mapper>
</mapper>
\ No newline at end of file
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfstationitem.html
浏览文件 @
abf950cd
...
@@ -45,6 +45,9 @@
...
@@ -45,6 +45,9 @@
<Form-item
label=
"商品链接"
prop=
"itemUrl"
>
<Form-item
label=
"商品链接"
prop=
"itemUrl"
>
<i-input
v-model=
"tbCfStationItem.itemUrl"
placeholder=
"商品链接"
/>
<i-input
v-model=
"tbCfStationItem.itemUrl"
placeholder=
"商品链接"
/>
</Form-item>
</Form-item>
<Form-item
label=
"商品价格"
prop=
"itemUrl"
>
<i-input
v-model=
"tbCfStationItem.itemPrice"
placeholder=
"商品价格"
/>
</Form-item>
<Form-item
label=
"商品图片"
prop=
"itemImg"
>
<Form-item
label=
"商品图片"
prop=
"itemImg"
>
<i-input
v-model=
"tbCfStationItem.itemImg"
placeholder=
"商品图片"
/>
<i-input
v-model=
"tbCfStationItem.itemImg"
placeholder=
"商品图片"
/>
</Form-item>
</Form-item>
...
...
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
abf950cd
...
@@ -8,6 +8,7 @@ $(function () {
...
@@ -8,6 +8,7 @@ $(function () {
{
label
:
'商品标题简介'
,
name
:
'itemBrief'
,
index
:
'item_brief'
,
width
:
80
},
{
label
:
'商品标题简介'
,
name
:
'itemBrief'
,
index
:
'item_brief'
,
width
:
80
},
{
label
:
'商品链接'
,
name
:
'itemUrl'
,
index
:
'item_url'
,
width
:
80
},
{
label
:
'商品链接'
,
name
:
'itemUrl'
,
index
:
'item_url'
,
width
:
80
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
80
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
80
},
{
label
:
'商品价格'
,
name
:
'itemPrice'
,
index
:
'item_price'
,
width
:
80
},
{
label
:
'所属平台'
,
name
:
'platformCode'
,
index
:
'platform_code'
,
width
:
80
},
{
label
:
'所属平台'
,
name
:
'platformCode'
,
index
:
'platform_code'
,
width
:
80
},
{
label
:
'平台名'
,
name
:
'platformName'
,
index
:
'platform_name'
,
width
:
80
},
{
label
:
'平台名'
,
name
:
'platformName'
,
index
:
'platform_name'
,
width
:
80
},
{
label
:
'启用状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
{
label
:
'启用状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
80
},
...
...
platform-common/src/main/java/com/platform/utils/DateUtils.java
浏览文件 @
abf950cd
...
@@ -134,8 +134,7 @@ public class DateUtils {
...
@@ -134,8 +134,7 @@ public class DateUtils {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
Date
date
=
new
Date
();
Date
date
=
strToDate
(
"2019-09-18 14:42:44"
);
String
str
=
"20170818223629599"
;
System
.
out
.
println
(
date
.
getTime
()/
1000
);
System
.
out
.
println
(
DateUtils
.
getDateFormat
(
str
));
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论