Commit 3cdd5886 by 18356073052

h5素材列表 新增素材类型字段

1 parent d188590f
......@@ -43,9 +43,9 @@ public class WeChatItemController extends BaseController {
//@PreAuthorize("@ss.hasPermi('chat:item:list')")
@GetMapping("/list")
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();
List<WeChatSideVo> weChatSideVos = weChatItemService.chatItems(sideId,keyword);
List<WeChatSideVo> weChatSideVos = weChatItemService.chatItems(sideId,keyword,mediaType);
return getDataTable(weChatSideVos);
}
......
......@@ -39,5 +39,5 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
* @param keyword 关键词
* @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);
}
......@@ -27,6 +27,6 @@ public interface IWeChatItemService extends IService<WeChatItem> {
* @param sideId 侧边栏id
* @return
*/
public List<WeChatSideVo> chatItems(Long sideId,String keyword);
public List<WeChatSideVo> chatItems(Long sideId,String keyword,String mediaType);
}
......@@ -96,8 +96,8 @@ public class WeChatItemServiceImpl extends ServiceImpl<WeChatItemMapper, WeChatI
}
@Override
public List<WeChatSideVo> chatItems(Long sideId,String keyword) {
return weChatItemMapper.findChatItems(sideId,keyword);
public List<WeChatSideVo> chatItems(Long sideId,String keyword,String mediaType) {
return weChatItemMapper.findChatItems(sideId,keyword,mediaType);
}
/**
......
......@@ -35,7 +35,24 @@
<where>
wci.side_id=#{sideId}
<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>
</where>
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!