TienChin 渠道管理-渠道搜索

2023-10-12 14:47:36 浏览数 (2)

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>

0 人点赞