package com.ruoyi.bst.mchApply.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ruoyi.bst.mchApply.domain.MchApply;
import com.ruoyi.bst.mchApply.domain.MchApplyQuery;
import com.ruoyi.bst.mchApply.domain.MchApplyVO;

/**
 * 招商加盟Mapper接口
 *
 * @author ruoyi
 * @date 2025-04-08
 */
public interface MchApplyMapper
{
    /**
     * 查询招商加盟
     *
     * @param applyId 招商加盟主键
     * @return 招商加盟
     */
    MchApplyVO selectMchApplyByApplyId(Long applyId);

    /**
     * 查询招商加盟列表
     *
     * @param query 招商加盟
     * @return 招商加盟集合
     */
    List<MchApplyVO> selectMchApplyList(@Param("query")MchApplyQuery query);

    /**
     * 新增招商加盟
     *
     * @param mchApply 招商加盟
     * @return 结果
     */
    int insertMchApply(MchApply mchApply);

    /**
     * 批量新增招商加盟
     */
    int batchInsert(@Param("list") List<? extends MchApply> list);

    /**
     * 批量修改招商加盟
     */
    int batchUpdate(@Param("list") List<? extends MchApply> list);

    /**
     * 修改招商加盟
     *
     * @param mchApply 招商加盟
     * @return 结果
     */
    public int updateMchApply(@Param("data") MchApply mchApply);

    /**
     * 删除招商加盟
     *
     * @param applyId 招商加盟主键
     * @return 结果
     */
    int deleteMchApplyByApplyId(Long applyId);

    /**
     * 根据条件更新
     * @param data
     * @param query
     * @return
     */
    int updateWithCondition(@Param("data") MchApply data, @Param("query") MchApplyQuery query);

    /**
     * 批量删除招商加盟
     *
     * @param applyIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMchApplyByApplyIds(Long[] applyIds);

    /**
     * 根据条件查询招商加盟数量
     * @param query
     * @return
     */
    int selectCount(@Param("query") MchApplyQuery query);
}
