ChannelController
代码语言:javascript
复制@PreAuthorize("hasPermission('tienchin:channel:list')")
@GetMapping("/list")
TableDataInfo list(ChannelVO channelVO) {
startPage();
List<Channel> list = iChannelService.selectChannelList(channelVO);
return getDataTable(list);
}
IChannelService
代码语言:javascript
复制/**
* 分页查询渠道列表
*
* @param channelVO 渠道信息搜索条件
* @return {@code List<Channel> }
* @author BNTang
* @since 2023/09/03 11:16:03
*/
List<Channel> selectChannelList(ChannelVO channelVO);
ChannelServiceImpl
代码语言:javascript
复制@Override
public List<Channel> selectChannelList(ChannelVO channelVO) {
return channelMapper.selectChannelList(channelVO);
}
ChannelMapper
代码语言:javascript
复制/**
* 分页查询渠道列表
*
* @param channelVO 渠道信息搜索条件
* @return {@code List<Channel> }
* @author BNTang
* @since 2023/09/03 11:16:03
*/
List<Channel> selectChannelList(ChannelVO channelVO);
ChannelMapper.xml
代码语言:javascript
复制...
<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>