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 3cdd5886
authored
Jan 31, 2021
by
18356073052
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
h5素材列表 新增素材类型字段
1 parent
d188590f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
7 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 @
3cdd588
...
@@ -43,9 +43,9 @@ public class WeChatItemController extends BaseController {
...
@@ -43,9 +43,9 @@ 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
)
{
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@RequestParam
(
value
=
"mediaType"
)
String
mediaType
)
{
startPage
();
startPage
();
List
<
WeChatSideVo
>
weChatSideVos
=
weChatItemService
.
chatItems
(
sideId
,
keyword
);
List
<
WeChatSideVo
>
weChatSideVos
=
weChatItemService
.
chatItems
(
sideId
,
keyword
,
mediaType
);
return
getDataTable
(
weChatSideVos
);
return
getDataTable
(
weChatSideVos
);
}
}
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatItemMapper.java
View file @
3cdd588
...
@@ -39,5 +39,5 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
...
@@ -39,5 +39,5 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
* @param keyword 关键词
* @param keyword 关键词
* @return
* @return
*/
*/
public
List
<
WeChatSideVo
>
findChatItems
(
@Param
(
"sideId"
)
Long
sideId
,
@Param
(
"keyword"
)
String
keyword
);
public
List
<
WeChatSideVo
>
findChatItems
(
@Param
(
"sideId"
)
Long
sideId
,
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"mediaType"
)
String
mediaType
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatItemService.java
View file @
3cdd588
...
@@ -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
,
String
keyword
);
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
,
String
mediaType
);
}
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatItemServiceImpl.java
View file @
3cdd588
...
@@ -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
,
String
keyword
)
{
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
,
String
mediaType
)
{
return
weChatItemMapper
.
findChatItems
(
sideId
,
keyword
);
return
weChatItemMapper
.
findChatItems
(
sideId
,
keyword
,
mediaType
);
}
}
/**
/**
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeChatItemMapper.xml
View file @
3cdd588
...
@@ -35,7 +35,24 @@
...
@@ -35,7 +35,24 @@
<where>
<where>
wci.side_id=#{sideId}
wci.side_id=#{sideId}
<if
test=
"keyword!=null and keyword!=''"
>
<if
test=
"keyword!=null and keyword!=''"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
<if
test=
"mediaType!=null and mediaType=='0'.toString()"
>
AND wm.content LIKE CONCAT('%',#{keyword},'%')
</if>
<if
test=
"mediaType!=null and mediaType=='1'.toString()"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
</if>
<if
test=
"mediaType!=null and mediaType=='2'.toString()"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
</if>
<if
test=
"mediaType!=null and mediaType=='3'.toString()"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
</if>
<if
test=
"mediaType!=null and mediaType=='4'.toString()"
>
AND wm.content LIKE CONCAT('%',#{keyword},'%')
</if>
<if
test=
"mediaType!=null and mediaType=='5'.toString()"
>
AND wm.material_name LIKE CONCAT('%',#{keyword},'%')
</if>
</if>
</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