ChannelController
@PreAuthorize("hasPermission('tienchin:channel:list')")
@GetMapping("/list")
TableDataInfo list(ChannelVO channelVO) {
startPage();
List<Channel> list = iChannelService.selectChannelList(channelVO);
return getDataTable(list);
}
IChannelService
/**
* 分页查询渠道列表
*
* @param channelVO 渠道信息搜索条件
* @return {@code List<Channel> }
* @author BNTang
* @since 2023/09/03 11:16:03
*/
List<Channel> selectChannelList(ChannelVO channelVO);
ChannelServiceImpl
@Override
public List<Channel> selectChannelList(ChannelVO channelVO) {
return channelMapper.selectChannelList(channelVO);
}
ChannelMapper
/**
* 分页查询渠道列表
*
* @param channelVO 渠道信息搜索条件
* @return {@code List<Channel> }
* @author BNTang
* @since 2023/09/03 11:16:03
*/
List<Channel> selectChannelList(ChannelVO channelVO);
ChannelMapper.xml
...
<if test="channelName != null">
AND channel_name LIKE CONCAT('%', #{channelName}, '%')
</if>
<if test="status != null">
AND status = #{status}
</if>
<if test="type != null">
AND type = #{type}
</if>
<if test="params.beginTime != null and params.endTime != null">
AND create_time BETWEEN #{params.beginTime} AND #{params.endTime}
</if>
标签:ChannelVO,channelVO,selectChannelList,List,list,渠道,搜索,TienChin
From: https://www.cnblogs.com/BNTang/p/17710257.html