package com.hys.app.mapper.erp;

import com.hys.app.framework.database.WebPage;
import com.hys.app.framework.database.mybatisplus.base.BaseMapperX;
import com.hys.app.model.erp.dos.SaleChannelDO;
import com.hys.app.model.erp.dto.SaleChannelQueryParams;
import org.apache.ibatis.annotations.Mapper;

/**
 * 会员 Mapper
 *
 * @author 张崧
 * 2024-01-23 09:28:16
 */
@Mapper
public interface SaleChannelMapper extends BaseMapperX<SaleChannelDO> {

    default WebPage<SaleChannelDO> selectPage(SaleChannelQueryParams params) {
        return lambdaQuery()
                .likeIfPresent(SaleChannelDO::getName, params.getName())
                .eqIfPresent(SaleChannelDO::getStatus, params.getStatus())
                .orderByDesc(SaleChannelDO::getId)
                .page(params);
    }

}

