Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e46a8d64
authored
Jan 19, 2021
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
侧边栏我的收藏添加关键词查询
1 parent
196d168c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
6 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatCollectionMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatCollectionService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatCollectionServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeChatCollectionMapper.xml
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
View file @
e46a8d6
...
@@ -53,9 +53,9 @@ public class WeChatCollectionController extends BaseController {
...
@@ -53,9 +53,9 @@ public class WeChatCollectionController extends BaseController {
*/
*/
// @PreAuthorize("@ss.hasPermi('chat:collection:list')")
// @PreAuthorize("@ss.hasPermi('chat:collection:list')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestParam
(
value
=
"userId"
)
Long
userId
)
{
public
TableDataInfo
list
(
@RequestParam
(
value
=
"userId"
)
Long
userId
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
)
{
startPage
();
startPage
();
List
<
WeChatSideVo
>
collections
=
weChatCollectionService
.
collections
(
userId
);
List
<
WeChatSideVo
>
collections
=
weChatCollectionService
.
collections
(
userId
,
keyword
);
return
getDataTable
(
collections
);
return
getDataTable
(
collections
);
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatCollectionMapper.java
View file @
e46a8d6
...
@@ -46,6 +46,6 @@ public interface WeChatCollectionMapper extends BaseMapper<WeChatCollection> {
...
@@ -46,6 +46,6 @@ public interface WeChatCollectionMapper extends BaseMapper<WeChatCollection> {
* @param userId 用户id
* @param userId 用户id
* @return {@link WeChatSideVo}s
* @return {@link WeChatSideVo}s
*/
*/
public
List
<
WeChatSideVo
>
findCollections
(
Long
userI
d
);
public
List
<
WeChatSideVo
>
findCollections
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"keyword"
)
String
keywor
d
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatCollectionService.java
View file @
e46a8d6
...
@@ -37,6 +37,6 @@ public interface IWeChatCollectionService extends IService<WeChatCollection> {
...
@@ -37,6 +37,6 @@ public interface IWeChatCollectionService extends IService<WeChatCollection> {
* @param userId 用户id
* @param userId 用户id
* @return {@link WeChatSideVo}s
* @return {@link WeChatSideVo}s
*/
*/
public
List
<
WeChatSideVo
>
collections
(
Long
userId
);
public
List
<
WeChatSideVo
>
collections
(
Long
userId
,
String
keyword
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatCollectionServiceImpl.java
View file @
e46a8d6
...
@@ -38,8 +38,8 @@ public class WeChatCollectionServiceImpl extends ServiceImpl<WeChatCollectionMap
...
@@ -38,8 +38,8 @@ public class WeChatCollectionServiceImpl extends ServiceImpl<WeChatCollectionMap
}
}
@Override
@Override
public
List
<
WeChatSideVo
>
collections
(
Long
userId
)
{
public
List
<
WeChatSideVo
>
collections
(
Long
userId
,
String
keyword
)
{
return
weChatCollectionMapper
.
findCollections
(
userId
);
return
weChatCollectionMapper
.
findCollections
(
userId
,
keyword
);
}
}
}
}
linkwe-wecom/src/main/resources/mapper/wecom/WeChatCollectionMapper.xml
View file @
e46a8d6
...
@@ -36,6 +36,9 @@
...
@@ -36,6 +36,9 @@
LEFT JOIN we_category wc ON wm.category_id = wc.id
LEFT JOIN we_category wc ON wm.category_id = wc.id
<where>
<where>
wcc.user_id=#{userId}
wcc.user_id=#{userId}
<if
test=
"keyword!=null and keyword!=''"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
</if>
</where>
</where>
</select>
</select>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment