package com.ruoyi.ss.mchApply.mapper;

import com.ruoyi.ss.mchApply.domain.MchApply;
import com.ruoyi.ss.mchApply.domain.MchApplyQuery;
import com.ruoyi.ss.mchApply.domain.MchApplyVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商家合作申请Mapper接口
 *
 * @author ruoyi
 * @date 2024-04-28
 */
public interface MchApplyMapper
{
    /**
     * 查询商家合作申请
     *
     * @param applyId 商家合作申请主键
     * @return 商家合作申请
     */
    public MchApplyVO selectMchApplyByApplyId(Long applyId);

    /**
     * 查询商家合作申请列表
     *
     * @param mchApply 商家合作申请
     * @return 商家合作申请集合
     */
    public List<MchApplyVO> selectMchApplyList(@Param("query") MchApplyQuery mchApply);

    /**
     * 新增商家合作申请
     *
     * @param mchApply 商家合作申请
     * @return 结果
     */
    public int insertMchApply(MchApply mchApply);

    /**
     * 修改商家合作申请
     *
     * @param mchApply 商家合作申请
     * @return 结果
     */
    public int updateMchApply(@Param("data") MchApply mchApply);

    /**
     * 删除商家合作申请
     *
     * @param applyId 商家合作申请主键
     * @return 结果
     */
    public int deleteMchApplyByApplyId(Long applyId);

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

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

    /**
     * 查询数量
     * @param query 条件
     * @return 数量
     */
    int selectCount(@Param("query") MchApplyQuery query);
}
