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 5700a5ff
authored
Jan 17, 2021
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
侧边栏增加关键词查询
1 parent
d33aa070
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
6 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatItemController.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatItemMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatItemService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatItemServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeChatItemMapper.xml
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatItemController.java
View file @
5700a5f
...
@@ -16,6 +16,7 @@ import java.util.List;
...
@@ -16,6 +16,7 @@ import java.util.List;
/**
/**
* 聊天工具侧边栏
* 聊天工具侧边栏
*
* @author kewen
* @author kewen
*/
*/
@RequestMapping
(
value
=
"/wecom/chat/item"
)
@RequestMapping
(
value
=
"/wecom/chat/item"
)
...
@@ -41,9 +42,10 @@ public class WeChatItemController extends BaseController {
...
@@ -41,9 +42,10 @@ public class WeChatItemController extends BaseController {
*/
*/
//@PreAuthorize("@ss.hasPermi('chat:item:list')")
//@PreAuthorize("@ss.hasPermi('chat:item:list')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestParam
(
value
=
"sideId"
)
Long
sideId
)
{
public
TableDataInfo
list
(
@RequestParam
(
value
=
"sideId"
)
Long
sideId
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
)
{
startPage
();
startPage
();
List
<
WeChatSideVo
>
weChatSideVos
=
weChatItemService
.
chatItems
(
sideId
);
List
<
WeChatSideVo
>
weChatSideVos
=
weChatItemService
.
chatItems
(
sideId
,
keyword
);
return
getDataTable
(
weChatSideVos
);
return
getDataTable
(
weChatSideVos
);
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatItemMapper.java
View file @
5700a5f
...
@@ -10,12 +10,14 @@ import java.util.List;
...
@@ -10,12 +10,14 @@ import java.util.List;
/**
/**
* 聊天工具侧边栏
* 聊天工具侧边栏
*
* @author kewen
* @author kewen
*/
*/
public
interface
WeChatItemMapper
extends
BaseMapper
<
WeChatItem
>
{
public
interface
WeChatItemMapper
extends
BaseMapper
<
WeChatItem
>
{
/**
/**
* 批量添加侧边栏素材
* 批量添加侧边栏素材
*
* @param items 侧边栏素材列表
* @param items 侧边栏素材列表
* @return 结果
* @return 结果
*/
*/
...
@@ -23,6 +25,7 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
...
@@ -23,6 +25,7 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
/**
/**
* 删除侧边栏素材
* 删除侧边栏素材
*
* @param sideId 侧边栏id
* @param sideId 侧边栏id
* @return 结果
* @return 结果
*/
*/
...
@@ -33,7 +36,8 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
...
@@ -33,7 +36,8 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
* h5素材列表
* h5素材列表
*
*
* @param sideId 侧边栏id
* @param sideId 侧边栏id
* @param keyword 关键词
* @return
* @return
*/
*/
public
List
<
WeChatSideVo
>
findChatItems
(
@Param
(
"sideId"
)
Long
sideId
);
public
List
<
WeChatSideVo
>
findChatItems
(
@Param
(
"sideId"
)
Long
sideId
,
@Param
(
"keyword"
)
String
keyword
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatItemService.java
View file @
5700a5f
...
@@ -27,6 +27,6 @@ public interface IWeChatItemService extends IService<WeChatItem> {
...
@@ -27,6 +27,6 @@ public interface IWeChatItemService extends IService<WeChatItem> {
* @param sideId 侧边栏id
* @param sideId 侧边栏id
* @return
* @return
*/
*/
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
);
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatItemServiceImpl.java
View file @
5700a5f
...
@@ -96,8 +96,8 @@ public class WeChatItemServiceImpl extends ServiceImpl<WeChatItemMapper, WeChatI
...
@@ -96,8 +96,8 @@ public class WeChatItemServiceImpl extends ServiceImpl<WeChatItemMapper, WeChatI
}
}
@Override
@Override
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
)
{
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
)
{
return
weChatItemMapper
.
findChatItems
(
sideId
);
return
weChatItemMapper
.
findChatItems
(
sideId
,
keyword
);
}
}
/**
/**
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeChatItemMapper.xml
View file @
5700a5f
...
@@ -34,6 +34,9 @@
...
@@ -34,6 +34,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>
wci.side_id=#{sideId}
wci.side_id=#{sideId}
<if
test=
"keyword!=null and keyword!=''"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
</if>
</where>
</where>
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
\ No newline at end of file
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