Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
b79693bd
提交
b79693bd
authored
3月 05, 2020
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
一、二级分类新增图片
上级
d1b10389
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
189 行增加
和
92 行删除
+189
-92
TbCfGoodstwotypeEntity.java
...main/java/com/platform/entity/TbCfGoodstwotypeEntity.java
+19
-2
GoodsTypeToGoodsTwo.java
...n/java/com/platform/entity/merge/GoodsTypeToGoodsTwo.java
+10
-0
TbCfGoodstwotypeDao.xml
...c/main/resources/com/platform/dao/TbCfGoodstwotypeDao.xml
+14
-5
TbCfGoodstypeDao.xml
.../src/main/resources/com/platform/dao/TbCfGoodstypeDao.xml
+1
-2
tbcfgoodstwotype.html
...in/src/main/webapp/WEB-INF/page/sys/tbcfgoodstwotype.html
+6
-1
tbcfgoodstype.html
...admin/src/main/webapp/WEB-INF/page/sys/tbcfgoodstype.html
+7
-1
tbcfgoodstwotype.js
platform-admin/src/main/webapp/js/sys/tbcfgoodstwotype.js
+105
-77
tbcfgoodstype.js
platform-admin/src/main/webapp/js/sys/tbcfgoodstype.js
+27
-4
没有找到文件。
platform-admin/src/main/java/com/platform/entity/TbCfGoodstwotypeEntity.java
浏览文件 @
b79693bd
...
@@ -4,11 +4,11 @@ import java.io.Serializable;
...
@@ -4,11 +4,11 @@ import java.io.Serializable;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
* 实体
*
商品二级分类表
实体
* 表名 tb_cf_goodstwotype
* 表名 tb_cf_goodstwotype
*
*
* @author lipengjun
* @author lipengjun
* @date 20
19-10-15 15:06:31
* @date 20
20-03-05 13:29:28
*/
*/
public
class
TbCfGoodstwotypeEntity
implements
Serializable
{
public
class
TbCfGoodstwotypeEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -25,6 +25,10 @@ public class TbCfGoodstwotypeEntity implements Serializable {
...
@@ -25,6 +25,10 @@ public class TbCfGoodstwotypeEntity implements Serializable {
* 商品一级分类id
* 商品一级分类id
*/
*/
private
String
goodstypeId
;
private
String
goodstypeId
;
/**
* 二级分类图片
*/
private
String
goodstwotypeUrl
;
/**
/**
* 设置:商品二级分类Id
* 设置:商品二级分类Id
...
@@ -65,4 +69,17 @@ public class TbCfGoodstwotypeEntity implements Serializable {
...
@@ -65,4 +69,17 @@ public class TbCfGoodstwotypeEntity implements Serializable {
public
String
getGoodstypeId
()
{
public
String
getGoodstypeId
()
{
return
goodstypeId
;
return
goodstypeId
;
}
}
/**
* 设置:二级分类图片
*/
public
void
setGoodstwotypeUrl
(
String
goodstwotypeUrl
)
{
this
.
goodstwotypeUrl
=
goodstwotypeUrl
;
}
/**
* 获取:二级分类图片
*/
public
String
getGoodstwotypeUrl
()
{
return
goodstwotypeUrl
;
}
}
}
platform-admin/src/main/java/com/platform/entity/merge/GoodsTypeToGoodsTwo.java
浏览文件 @
b79693bd
...
@@ -23,6 +23,16 @@ public class GoodsTypeToGoodsTwo implements Serializable {
...
@@ -23,6 +23,16 @@ public class GoodsTypeToGoodsTwo implements Serializable {
private
String
goodstypeTitle
;
private
String
goodstypeTitle
;
private
String
goodstwotypeUrl
;
public
String
getGoodstwotypeUrl
()
{
return
goodstwotypeUrl
;
}
public
void
setGoodstwotypeUrl
(
String
goodstwotypeUrl
)
{
this
.
goodstwotypeUrl
=
goodstwotypeUrl
;
}
/**
/**
* 设置:商品二级分类Id
* 设置:商品二级分类Id
*/
*/
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfGoodstwotypeDao.xml
浏览文件 @
b79693bd
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<result
property=
"goodstwotypeId"
column=
"goodstwotype_id"
/>
<result
property=
"goodstwotypeId"
column=
"goodstwotype_id"
/>
<result
property=
"goodstwotypeTitle"
column=
"goodstwotype_title"
/>
<result
property=
"goodstwotypeTitle"
column=
"goodstwotype_title"
/>
<result
property=
"goodstypeId"
column=
"goodstype_id"
/>
<result
property=
"goodstypeId"
column=
"goodstype_id"
/>
<result
property=
"goodstwotypeUrl"
column=
"goodstwotype_url"
/>
</resultMap>
</resultMap>
<resultMap
type=
"com.platform.entity.merge.GoodsTypeToGoodsTwo"
id=
"GoodsToTwo"
>
<resultMap
type=
"com.platform.entity.merge.GoodsTypeToGoodsTwo"
id=
"GoodsToTwo"
>
...
@@ -14,12 +15,14 @@
...
@@ -14,12 +15,14 @@
<result
property=
"goodstwotypeTitle"
column=
"goodstwotype_title"
/>
<result
property=
"goodstwotypeTitle"
column=
"goodstwotype_title"
/>
<result
property=
"goodstypeId"
column=
"goodstype_id"
/>
<result
property=
"goodstypeId"
column=
"goodstype_id"
/>
<result
property=
"goodstypeTitle"
column=
"goodstype_title"
/>
<result
property=
"goodstypeTitle"
column=
"goodstype_title"
/>
<result
property=
"goodstwotypeUrl"
column=
"goodstwotype_url"
/>
</resultMap>
</resultMap>
<select
id=
"queryGoodsTypeId"
resultMap=
"GoodsToTwo"
>
<select
id=
"queryGoodsTypeId"
resultMap=
"GoodsToTwo"
>
SELECT
SELECT
tw.`goodstwotype_id`,
tw.`goodstwotype_id`,
tw.`goodstwotype_title`,
tw.`goodstwotype_title`,
tw.`goodstwotype_url`,
ds.`goodstype_id`,
ds.`goodstype_id`,
ds.`goodstype_title`
ds.`goodstype_title`
FROM tb_cf_goodstwotype tw
FROM tb_cf_goodstwotype tw
...
@@ -30,6 +33,7 @@
...
@@ -30,6 +33,7 @@
select
select
`goodstwotype_id`,
`goodstwotype_id`,
`goodstwotype_title`,
`goodstwotype_title`,
`goodstwotype_url`,
`goodstype_id`
`goodstype_id`
from tb_cf_goodstwotype
from tb_cf_goodstwotype
WHERE goodstype_id= #{id}
WHERE goodstype_id= #{id}
...
@@ -38,7 +42,8 @@
...
@@ -38,7 +42,8 @@
select
select
`goodstwotype_id`,
`goodstwotype_id`,
`goodstwotype_title`,
`goodstwotype_title`,
`goodstype_id`
`goodstype_id`,
`goodstwotype_url`
from tb_cf_goodstwotype
from tb_cf_goodstwotype
where goodstwotype_id = #{id}
where goodstwotype_id = #{id}
</select>
</select>
...
@@ -47,6 +52,7 @@
...
@@ -47,6 +52,7 @@
SELECT
SELECT
tw.`goodstwotype_id`,
tw.`goodstwotype_id`,
tw.`goodstwotype_title`,
tw.`goodstwotype_title`,
tw.`goodstwotype_url`,
ds.`goodstype_id`,
ds.`goodstype_id`,
ds.`goodstype_title`
ds.`goodstype_title`
FROM tb_cf_goodstwotype tw
FROM tb_cf_goodstwotype tw
...
@@ -80,18 +86,21 @@
...
@@ -80,18 +86,21 @@
insert into tb_cf_goodstwotype(
insert into tb_cf_goodstwotype(
`goodstwotype_id`,
`goodstwotype_id`,
`goodstwotype_title`,
`goodstwotype_title`,
`goodstype_id`)
`goodstype_id`,
`goodstwotype_url`)
values(
values(
#{goodstwotypeId},
#{goodstwotypeId},
#{goodstwotypeTitle},
#{goodstwotypeTitle},
#{goodstypeId})
#{goodstypeId},
#{goodstwotypeUrl})
</insert>
</insert>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
<update
id=
"update"
parameterType=
"com.platform.entity.TbCfGoodstwotypeEntity"
>
update tb_cf_goodstwotype
update tb_cf_goodstwotype
<set>
<set>
<if
test=
"goodstwotypeTitle != null"
>
`goodstwotype_title` = #{goodstwotypeTitle},
</if>
<if
test=
"goodstwotypeTitle != null"
>
`goodstwotype_title` = #{goodstwotypeTitle},
</if>
<if
test=
"goodstypeId != null"
>
`goodstype_id` = #{goodstypeId}
</if>
<if
test=
"goodstypeId != null"
>
`goodstype_id` = #{goodstypeId},
</if>
<if
test=
"goodstwotypeUrl != null"
>
`goodstwotype_url` = #{goodstwotypeUrl}
</if>
</set>
</set>
where goodstwotype_id = #{goodstwotypeId}
where goodstwotype_id = #{goodstwotypeId}
</update>
</update>
...
...
platform-admin/src/main/resources/com/platform/dao/TbCfGoodstypeDao.xml
浏览文件 @
b79693bd
...
@@ -69,8 +69,7 @@
...
@@ -69,8 +69,7 @@
update tb_cf_goodstype
update tb_cf_goodstype
<set>
<set>
<if
test=
"goodstypeTitle != null"
>
`goodstype_title` = #{goodstypeTitle},
</if>
<if
test=
"goodstypeTitle != null"
>
`goodstype_title` = #{goodstypeTitle},
</if>
<if
test=
"goodstypeSort != null"
>
`goodstype_sort` = #{goodstypeSort}
</if>
<if
test=
"goodstypeSort != null"
>
`goodstype_sort` = #{goodstypeSort},
</if>
<if
test=
"goodstypeSort != null"
>
`goodstype_sort` = #{goodstypeSort}
</if>
<if
test=
"goodstypeUrl != null"
>
`goodstype_url` = #{goodstypeUrl}
</if>
<if
test=
"goodstypeUrl != null"
>
`goodstype_url` = #{goodstypeUrl}
</if>
</set>
</set>
where goodstype_id = #{goodstypeId}
where goodstype_id = #{goodstypeId}
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfgoodstwotype.html
浏览文件 @
b79693bd
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html
xmlns:v-bind=
"http://www.w3.org/1999/xhtml"
>
<head>
<head>
<title></title>
<title></title>
#parse("sys/header.html")
#parse("sys/header.html")
...
@@ -52,6 +52,11 @@
...
@@ -52,6 +52,11 @@
:value=
"el.goodstypeId"
>
{{el.goodstypeTitle}}
</i-option>
:value=
"el.goodstypeId"
>
{{el.goodstypeTitle}}
</i-option>
</i-select>
</i-select>
</Form-item>
</Form-item>
<Form-item
label=
"二级分类图片"
prop=
"goodstwotypeUrl"
>
<img
v-bind:src=
"tbCfGoodstwotype.goodstwotypeUrl"
v-show=
"!!tbCfGoodstwotype.goodstwotypeUrl"
/>
<input
type=
"file"
placeholder=
"二级分类图片"
@
change=
"tirggerFile($event)"
/>
</Form-item>
<Form-item
label=
"商品二级分类标题"
prop=
"goodstwotypeTitle"
>
<Form-item
label=
"商品二级分类标题"
prop=
"goodstwotypeTitle"
>
<i-input
v-model=
"tbCfGoodstwotype.goodstwotypeTitle"
placeholder=
"商品二级分类标题"
/>
<i-input
v-model=
"tbCfGoodstwotype.goodstwotypeTitle"
placeholder=
"商品二级分类标题"
/>
</Form-item>
</Form-item>
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/tbcfgoodstype.html
浏览文件 @
b79693bd
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html
xmlns:v-bind=
"http://www.w3.org/1999/xhtml"
>
<head>
<head>
<title></title>
<title></title>
#parse("sys/header.html")
#parse("sys/header.html")
...
@@ -48,6 +48,12 @@
...
@@ -48,6 +48,12 @@
<Form-item
label=
"商品分类标题"
prop=
"goodstypeTitle"
>
<Form-item
label=
"商品分类标题"
prop=
"goodstypeTitle"
>
<i-input
v-model=
"tbCfGoodstype.goodstypeTitle"
placeholder=
"商品分类标题"
/>
<i-input
v-model=
"tbCfGoodstype.goodstypeTitle"
placeholder=
"商品分类标题"
/>
</Form-item>
</Form-item>
<Form-item
label=
"一级分类图片"
prop=
"goodstypeUrl"
>
<img
v-bind:src=
"tbCfGoodstype.goodstypeUrl"
v-show=
"!!tbCfGoodstype.goodstypeUrl"
/>
<input
type=
"file"
placeholder=
"一级分类图片"
@
change=
"tirggerFile($event)"
/>
</Form-item>
<Form-item
label=
"排序编号"
prop=
"goodstypeSort"
>
<Form-item
label=
"排序编号"
prop=
"goodstypeSort"
>
<i-input
v-model=
"tbCfGoodstype.goodstypeSort"
placeholder=
"排序编号"
/>
<i-input
v-model=
"tbCfGoodstype.goodstypeSort"
placeholder=
"排序编号"
/>
</Form-item>
</Form-item>
...
...
platform-admin/src/main/webapp/js/sys/tbcfgoodstwotype.js
浏览文件 @
b79693bd
...
@@ -4,11 +4,12 @@ $(function () {
...
@@ -4,11 +4,12 @@ $(function () {
colModel
:
[
colModel
:
[
{
label
:
'ID'
,
name
:
'goodstwotypeId'
,
index
:
'goodstwotype_id'
,
key
:
true
},
{
label
:
'ID'
,
name
:
'goodstwotypeId'
,
index
:
'goodstwotype_id'
,
key
:
true
},
{
label
:
'商品一级分类'
,
name
:
'goodstypeTitle'
,
index
:
'goodstype_title'
,
width
:
80
},
{
label
:
'商品一级分类'
,
name
:
'goodstypeTitle'
,
index
:
'goodstype_title'
,
width
:
80
},
{
label
:
'商品二级分类'
,
name
:
'goodstwotypeTitle'
,
index
:
'goodstwotype_title'
,
width
:
80
}],
{
label
:
'商品二级分类'
,
name
:
'goodstwotypeTitle'
,
index
:
'goodstwotype_title'
,
width
:
80
},
{
label
:
'二级分类图片'
,
name
:
'goodstwotypeUrl'
,
index
:
'goodstwotype_url'
,
width
:
80
,
formatter
:
imageFormat
}],
shrinkToFit
:
true
,
shrinkToFit
:
true
,
datatype
:
"json"
,
datatype
:
"json"
,
rowNum
:
15
,
rowNum
:
15
,
rowList
:[
15
,
30
,
45
],
rowList
:
[
15
,
30
,
45
],
mtype
:
"POST"
,
mtype
:
"POST"
,
rownumbers
:
true
,
rownumbers
:
true
,
rownumWidth
:
40
,
rownumWidth
:
40
,
...
@@ -26,7 +27,7 @@ let vm = new Vue({
...
@@ -26,7 +27,7 @@ let vm = new Vue({
showList
:
true
,
showList
:
true
,
title
:
null
,
title
:
null
,
tbCfGoodstwotype
:
{},
tbCfGoodstwotype
:
{},
Goodstype
:
null
,
Goodstype
:
null
,
ruleValidate
:
{
ruleValidate
:
{
name
:
[
name
:
[
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}
...
@@ -71,7 +72,7 @@ let vm = new Vue({
...
@@ -71,7 +72,7 @@ let vm = new Vue({
},
},
del
:
function
(
event
)
{
del
:
function
(
event
)
{
let
goodstwotypeIds
=
getSelectedRows
(
"#jqGrid"
);
let
goodstwotypeIds
=
getSelectedRows
(
"#jqGrid"
);
if
(
goodstwotypeIds
==
null
)
{
if
(
goodstwotypeIds
==
null
)
{
return
;
return
;
}
}
...
@@ -89,9 +90,9 @@ let vm = new Vue({
...
@@ -89,9 +90,9 @@ let vm = new Vue({
});
});
});
});
},
},
getInfo
:
function
(
goodstwotypeId
)
{
getInfo
:
function
(
goodstwotypeId
)
{
Ajax
.
request
({
Ajax
.
request
({
url
:
"../tbcfgoodstwotype/info/"
+
goodstwotypeId
,
url
:
"../tbcfgoodstwotype/info/"
+
goodstwotypeId
,
async
:
true
,
async
:
true
,
successCallback
:
function
(
r
)
{
successCallback
:
function
(
r
)
{
vm
.
tbCfGoodstwotype
=
r
.
tbCfGoodstwotype
;
vm
.
tbCfGoodstwotype
=
r
.
tbCfGoodstwotype
;
...
@@ -106,8 +107,35 @@ let vm = new Vue({
...
@@ -106,8 +107,35 @@ let vm = new Vue({
page
:
page
page
:
page
}).
trigger
(
"reloadGrid"
);
}).
trigger
(
"reloadGrid"
);
vm
.
handleReset
(
'formValidate'
);
vm
.
handleReset
(
'formValidate'
);
}
,
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
},
},
reloadSearch
:
function
()
{
tirggerFile
:
function
(
event
)
{
var
file
=
event
.
target
.
files
[
0
];
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
$
.
ajax
({
url
:
"../api/upload/image/"
,
type
:
"POST"
,
data
:
formData
,
cache
:
false
,
//不设置缓存
processData
:
false
,
// 不处理数据
contentType
:
false
,
// 不设置内容类型
success
:
function
(
result
)
{
result
=
JSON
.
parse
(
result
);
//console.log(result)
if
(
result
.
errno
==
0
)
{
//成功
vm
.
tbCfGoodstwotype
.
goodstwotypeUrl
=
result
.
data
;
vm
.
$forceUpdate
();
}
else
{
iview
.
Message
.
error
(
result
.
errmsg
);
}
}
});
},
reloadSearch
:
function
()
{
vm
.
q
=
{
vm
.
q
=
{
name
:
''
name
:
''
};
};
...
@@ -122,13 +150,13 @@ let vm = new Vue({
...
@@ -122,13 +150,13 @@ let vm = new Vue({
handleResetForm
(
this
,
name
);
handleResetForm
(
this
,
name
);
}
}
},
},
created
()
{
created
()
{
var
that
=
this
var
that
=
this
$
.
get
(
'../tbcfgoodstype/queryAll'
,
function
(
res
)
{
$
.
get
(
'../tbcfgoodstype/queryAll'
,
function
(
res
)
{
debugger
debugger
// console.log(that,"this");
// console.log(that,"this");
that
.
Goodstype
=
res
.
list
;
that
.
Goodstype
=
res
.
list
;
// console.log(that.Goodstype);
// console.log(that.Goodstype);
})
})
}
}
});
});
\ No newline at end of file
platform-admin/src/main/webapp/js/sys/tbcfgoodstype.js
浏览文件 @
b79693bd
...
@@ -2,10 +2,10 @@ $(function () {
...
@@ -2,10 +2,10 @@ $(function () {
$
(
"#jqGrid"
).
Grid
({
$
(
"#jqGrid"
).
Grid
({
url
:
'../tbcfgoodstype/list'
,
url
:
'../tbcfgoodstype/list'
,
colModel
:
[
colModel
:
[
{
label
:
'ID'
,
name
:
'goodstypeId'
,
index
:
'goodstype_id'
,
key
:
true
},
{
label
:
'ID'
,
name
:
'goodstypeId'
,
index
:
'goodstype_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品一级分类'
,
name
:
'goodstypeTitle'
,
index
:
'goodstype_title'
,
width
:
80
},
{
label
:
'商品一级分类'
,
name
:
'goodstypeTitle'
,
index
:
'goodstype_title'
,
width
:
80
},
{
label
:
'排序编号'
,
name
:
'goodstypeSort'
,
index
:
'goodstype_sort'
,
width
:
80
}
{
label
:
'排序编号'
,
name
:
'goodstypeSort'
,
index
:
'goodstype_sort'
,
width
:
80
}
,
/*{label: '商品分类跳转链接', name: 'goodstypeUrl', index: 'goodstype_url', width: 80}*/
],
{
label
:
'一级分类图片'
,
name
:
'goodstwotypeUrl'
,
index
:
'goodstype_url'
,
width
:
80
,
formatter
:
imageFormat
}
],
shrinkToFit
:
true
,
shrinkToFit
:
true
,
datatype
:
"json"
,
datatype
:
"json"
,
rowNum
:
15
,
rowNum
:
15
,
...
@@ -120,6 +120,29 @@ let vm = new Vue({
...
@@ -120,6 +120,29 @@ let vm = new Vue({
},
},
handleReset
:
function
(
name
)
{
handleReset
:
function
(
name
)
{
handleResetForm
(
this
,
name
);
handleResetForm
(
this
,
name
);
},
tirggerFile
:
function
(
event
)
{
var
file
=
event
.
target
.
files
[
0
];
var
formData
=
new
FormData
();
formData
.
append
(
"file"
,
file
);
$
.
ajax
({
url
:
"../api/upload/image/"
,
type
:
"POST"
,
data
:
formData
,
cache
:
false
,
//不设置缓存
processData
:
false
,
// 不处理数据
contentType
:
false
,
// 不设置内容类型
success
:
function
(
result
)
{
result
=
JSON
.
parse
(
result
);
//console.log(result)
if
(
result
.
errno
==
0
)
{
//成功
vm
.
tbCfGoodstype
.
goodstypeUrl
=
result
.
data
;
vm
.
$forceUpdate
();
}
else
{
iview
.
Message
.
error
(
result
.
errmsg
);
}
}
});
}
}
}
}
});
});
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论