Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
C
chinafrica
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
chinafrica
Commits
96ffc33a
提交
96ffc33a
authored
7月 02, 2020
作者:
吴德鹏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
帖子管理
上级
98d3fd21
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
197 行增加
和
82 行删除
+197
-82
HashtagController.java
.../main/java/com/platform/controller/HashtagController.java
+14
-0
HashtagDao.java
...form-admin/src/main/java/com/platform/dao/HashtagDao.java
+3
-0
HashtagService.java
...in/src/main/java/com/platform/service/HashtagService.java
+10
-0
HashtagServiceImpl.java
...in/java/com/platform/service/impl/HashtagServiceImpl.java
+5
-0
HashtagDao.xml
...-admin/src/main/resources/com/platform/dao/HashtagDao.xml
+16
-0
post.html
platform-admin/src/main/webapp/WEB-INF/page/sys/post.html
+92
-64
post.js
platform-admin/src/main/webapp/js/sys/post.js
+56
-17
tbcfstationitem.js
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
+1
-1
没有找到文件。
platform-admin/src/main/java/com/platform/controller/HashtagController.java
浏览文件 @
96ffc33a
...
...
@@ -106,4 +106,18 @@ public class HashtagController {
return
R
.
ok
().
put
(
"list"
,
list
);
}
/**
* 根据名字查找标签
*/
@RequestMapping
(
"/getTagsByName"
)
@ResponseBody
public
R
getTagsByName
(
@RequestParam
String
name
)
{
List
<
HashtagEntity
>
list
=
hashtagService
.
getTagsByName
(
name
);
return
R
.
ok
().
put
(
"list"
,
list
);
}
}
platform-admin/src/main/java/com/platform/dao/HashtagDao.java
浏览文件 @
96ffc33a
...
...
@@ -2,6 +2,8 @@ package com.platform.dao;
import
com.platform.entity.HashtagEntity
;
import
java.util.List
;
/**
* Dao
*
...
...
@@ -10,4 +12,5 @@ import com.platform.entity.HashtagEntity;
*/
public
interface
HashtagDao
extends
BaseDao
<
HashtagEntity
>
{
List
<
HashtagEntity
>
getTagsByName
(
String
name
);
}
platform-admin/src/main/java/com/platform/service/HashtagService.java
浏览文件 @
96ffc33a
package
com
.
platform
.
service
;
import
com.platform.entity.HashtagEntity
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -68,4 +69,13 @@ public interface HashtagService {
* @return 删除条数
*/
int
deleteBatch
(
String
[]
ids
);
/**
* 根据名字查找标签
*
* @param name
* @return list
*/
List
<
HashtagEntity
>
getTagsByName
(
String
name
);
}
platform-admin/src/main/java/com/platform/service/impl/HashtagServiceImpl.java
浏览文件 @
96ffc33a
...
...
@@ -93,4 +93,9 @@ public class HashtagServiceImpl implements HashtagService {
public
int
deleteBatch
(
String
[]
ids
)
{
return
hashtagDao
.
deleteBatch
(
ids
);
}
@Override
public
List
<
HashtagEntity
>
getTagsByName
(
String
name
)
{
return
hashtagDao
.
getTagsByName
(
name
);
}
}
platform-admin/src/main/resources/com/platform/dao/HashtagDao.xml
浏览文件 @
96ffc33a
...
...
@@ -60,6 +60,22 @@
</if>
</select>
<select
id=
"getTagsByName"
resultType=
"com.platform.entity.HashtagEntity"
>
select
`id`,
`archived`,
`archived_by`,
`archived_date`,
`create_date`,
`created_by`,
`update_date`,
`updated_by`,
`version`,
`name`,
`user_id`
from hashtag
where name LIKE concat('%',#{name},'%')
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from hashtag
WHERE 1=1
...
...
platform-admin/src/main/webapp/WEB-INF/page/sys/post.html
浏览文件 @
96ffc33a
差异被折叠。
点击展开。
platform-admin/src/main/webapp/js/sys/post.js
浏览文件 @
96ffc33a
...
...
@@ -38,10 +38,9 @@ $(function () {
let
vm
=
new
Vue
({
el
:
'#rrapp'
,
components
:{
},
components
:
{},
data
:
{
tagList
:
[],
uploadList
:
[],
account
:
true
,
typeList
:
[
...
...
@@ -72,10 +71,10 @@ let vm = new Vue({
topic
:
''
},
isShownTagMadal
:
false
,
tagSearchValue
:
""
,
isShownProductMadal
:
false
,
productSearch
:
''
,
isShownTagMadal
:
false
,
tagSearchValue
:
""
,
isShownProductMadal
:
false
,
productSearch
:
''
,
commodityCategoryLists1
:
[
{
value
:
'商品一级'
,
...
...
@@ -101,18 +100,41 @@ let vm = new Vue({
commoditycategoryListsActive3
:
null
,
},
methods
:
{
handleSearchProduct
(
e
){
1
==
1
?
(()
=>
{
chooseTags
(
tag
,
index
)
{
this
.
tagList
[
index
].
isSelected
=
!
this
.
tagList
[
index
].
isSelected
;
console
.
log
(
tag
.
isSelected
+
':'
+
index
)
if
(
this
.
tagList
[
index
].
isSelected
)
{
tag
.
isSelected
=
true
;
}
},
searchTags
()
{
$
.
get
(
'../hashtag/getTagsByName?name='
+
this
.
tagSearchValue
,
res
=>
{
this
.
tagList
=
[];
let
_res
=
JSON
.
parse
(
res
);
_res
.
code
===
0
?
(()
=>
{
_res
.
list
.
forEach
((
item
)
=>
{
this
.
tagList
.
push
({
label
:
item
.
name
,
value
:
item
.
id
})
})
})()
:
null
})
},
handleSearchProduct
(
e
)
{
1
==
1
?
(()
=>
{
$
(
'#showItems'
).
children
().
remove
();
$
(
'#showItems'
).
append
(
`<table id="searchjqGrid"></table>`
);
function
beforeSelectRow
(){
function
beforeSelectRow
()
{
$
(
"#searchjqGrid"
).
jqGrid
(
'resetSelection'
);
return
(
true
);
return
(
true
);
}
let
_this
=
this
;
$
(
function
()
{
$
(
"#searchjqGrid"
).
Grid
({
url
:
`../tbcfstationitem/list?itemCategory=
${
_this
.
commoditycategoryListsActive1
||
''
}
&typeTwo=
${
_this
.
commoditycategoryListsActive2
||
''
}
&typeThree=
${
_this
.
commoditycategoryListsActive3
||
''
}
&name=
${
vm
.
productSearch
||
e
||
''
}
`
,
url
:
`../tbcfstationitem/list?itemCategory=
${
_this
.
commoditycategoryListsActive1
||
''
}
&typeTwo=
${
_this
.
commoditycategoryListsActive2
||
''
}
&typeThree=
${
_this
.
commoditycategoryListsActive3
||
''
}
&name=
${
vm
.
productSearch
||
e
||
''
}
`
,
colModel
:
[
{
label
:
'itemId'
,
name
:
'itemId'
,
index
:
'item_id'
,
key
:
true
,
hidden
:
true
},
{
label
:
'商品图片'
,
name
:
'itemImg'
,
index
:
'item_img'
,
width
:
50
,
formatter
:
imageFormat
},
...
...
@@ -130,11 +152,17 @@ let vm = new Vue({
{
label
:
'商品一级分类'
,
name
:
'goodtype'
,
index
:
'goodtype'
,
width
:
80
},
{
label
:
'商品二级分类'
,
name
:
'title'
,
index
:
'title'
,
width
:
80
},
{
label
:
'商品品名'
,
name
:
'dname'
,
index
:
'itemDescritionId'
,
width
:
120
},
{
label
:
'状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
120
,
formatter
:
itemStatusFormat
},
{
label
:
'状态'
,
name
:
'enableFlag'
,
index
:
'enable_flag'
,
width
:
120
,
formatter
:
itemStatusFormat
},
{
label
:
'创建日期'
,
name
:
'createTime'
,
index
:
'create_time'
,
width
:
160
}
],
multiselect
:
true
,
multiboxonly
:
true
,
multiboxonly
:
true
,
beforeSelectRow
:
beforeSelectRow
,
});
});
...
...
@@ -142,7 +170,7 @@ let vm = new Vue({
})()
:
alert
(
'未输入搜索内容~'
);
},
//查询二级分类
changeSubCateType
(){
changeSubCateType
()
{
this
.
commodityCategoryLists2
=
[];
$
.
get
(
'../tbcfstationitem/queryByItemType?typeId='
+
this
.
commoditycategoryListsActive1
,
res
=>
{
let
_res
=
JSON
.
parse
(
res
);
...
...
@@ -157,7 +185,7 @@ let vm = new Vue({
})
},
//查询三级分类
queryMiniCatagory
(){
queryMiniCatagory
()
{
$
.
get
(
'../tbcfstationitem/queryByItemTypeTwo?typeTwoId='
+
this
.
commoditycategoryListsActive2
,
res
=>
{
this
.
commodityCategoryLists3
=
[];
let
_res
=
JSON
.
parse
(
res
);
...
...
@@ -423,7 +451,7 @@ let vm = new Vue({
handleResetForm
(
this
,
name
);
}
},
created
(){
created
()
{
//获取分类子页面一级分类数据
$
.
get
(
'../tbcfgoodstype/queryAll'
,
res
=>
{
res
.
code
===
0
?
(()
=>
{
...
...
@@ -436,5 +464,16 @@ let vm = new Vue({
})
})()
:
null
})
//获取所有的标签
$
.
get
(
'../hashtag/queryAll'
,
res
=>
{
let
OBJ_res
=
JSON
.
parse
(
res
);
OBJ_res
.
list
.
forEach
((
item
)
=>
{
console
.
log
(
'labelName'
,
item
.
name
)
this
.
tagList
.
push
({
label
:
item
.
name
,
value
:
item
.
id
});
})
})
}
});
platform-admin/src/main/webapp/js/sys/tbcfstationitem.js
浏览文件 @
96ffc33a
...
...
@@ -812,7 +812,7 @@ let vm = new Vue({
},
// 选中子标签
selectSubTag
(
element
,
index
,
parentIndex
)
{
this
.
tagLists
[
parentIndex
].
isSelected
=
false
;
this
.
tagLists
[
parentIndex
].
selectSubTag
=
false
;
this
.
subtaglist
[
parentIndex
][
index
].
isSelected
=
!
this
.
subtaglist
[
parentIndex
][
index
].
isSelected
;
let
allSelected
=
this
.
subtaglist
[
parentIndex
].
every
(
item
=>
item
.
isSelected
===
true
);
allSelected
?
this
.
tagLists
[
parentIndex
].
isSelected
=
true
:
null
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论