package com.xkrs.service;

import com.aliyuncs.exceptions.ClientException;
import com.xkrs.model.qo.BankCardQo;
import com.xkrs.model.qo.BusinessQo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @Author: XinYi Song
 * @Date: 2021/12/14 9:51
 * 商家模块
 */
public interface MerchantSettlementService {

    /**
     * 商家入驻
     * @param businessQo
     * @param
     * @param
     * @param bankCardQos
     * @param
     * @return
     * @throws IOException
     */
    String merchantSettlement(BusinessQo businessQo, List<Object> bankCardQos) throws IOException;

    /**
     * 通过状态查询商家入驻信息
     * @param type
     * @return
     */
    String findAllByBusinessType(String type);

    /**
     * 根据省市区查询审核通过的商家的信息
     * @param countyName
     * @param keepType
     * @return
     */
    String findAllByCountyName(String countyName, String keepType);

    /**
     * 根据商家用户id查询商家入驻信息
     * @param businessId
     * @return
     */
    String findBusinessById(Integer businessId);

    /**
     * 市区查询商家的信息
     * @param businessCity
     * @param businessCountry
     * @param businessName
     * @return
     */
    String selectAllBusiness(String businessCity, String businessCountry, String businessName);

    /**
     * 对商家入驻进行审核（1审核通过  2审核不通过）
     * @param id        商家入驻的id
     * @param username
     * @param province
     * @param city
     * @param county
     * @return
     * @throws ClientException
     */
    String updatePassBusiness(Integer id,String username,String province,String city,String county) throws ClientException;

    /**
     * 拒绝商家入驻的请求（审核不通过）
     * @param id
     * @param phone
     * @return
     * @throws ClientException
     */
    String updateNotPassBusiness(Integer id,String phone) throws ClientException;

    /**
     * 总部查看要审核的商家的信息
     * @param businessCity
     * @param businessCountry
     * @param businessName
     * @return
     */
    String selectDefaultBusiness(String businessCity, String businessCountry, String businessName);
}
