package com.hzs.member.account.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hzs.common.domain.member.account.CuMemberBusinessLicense;
import com.hzs.member.account.vo.CuMemberBusinessLicenseVO;

import java.util.List;

/**
 * 会员营业执照 服务类
 */
public interface ICuMemberBusinessLicenseService extends IService<CuMemberBusinessLicense> {

    /**
     * 根据会员ID查询营业执照
     *
     * @param pkMember  会员ID
     * @param pkCountry 国家ID
     * @return CuMemberBusinessLicenseExt
     */
    CuMemberBusinessLicenseVO selectBusinessLicenseById(Long pkMember, Integer pkCountry);

    /**
     * 查询会员是否上传营业执照
     *
     * @param pkMember  会员ID
     * @param pkCountry 国家ID
     * @return Integer
     */
    Integer isExistBusinessLicense(Long pkMember, Integer pkCountry);

    /**
     * 查询营业执照列表信息
     *
     * @param licenseVO 入参
     * @return List<CuMemberBusinessLicenseExt>
     */
    Object[] selectLicenseList(CuMemberBusinessLicenseVO licenseVO);

    /**
     * 根据业务单号修改审批信息
     *
     * @param licenseVO 入参
     * @return Integer
     */
    Integer updateLicenseByBusinessNo(CuMemberBusinessLicenseVO licenseVO);

    /**
     * 重置营业执照-审核通过
     **/
    Integer deleteLicense(CuMemberBusinessLicenseVO licenseVO);

    /**
     * 重置营业执照-审核驳回
     **/
    Integer rejectResetLicense(CuMemberBusinessLicenseVO licenseVO);


    /**
     * 营业执照审批驳回
     *
     * @param cmb      ID
     * @param pkMember 会员ID
     * @return Integer
     */
    Boolean rejectById(CuMemberBusinessLicenseVO cmb, Long pkMember);

    /**
     * 营业执照审批同意（后台列表操作）
     *
     * @param licenseVO 入参
     * @param license   根据ID查询详情信息
     * @return
     */
    Integer licenseAgree(CuMemberBusinessLicenseVO licenseVO, CuMemberBusinessLicenseVO license);

    /**
     * 重置营业执照
     **/
    Integer resettingLicense(CuMemberBusinessLicenseVO licenseVO, CuMemberBusinessLicenseVO license);


    /**
     * 根据业务编号查询
     *
     * @param businessNo 业务编号
     * @return CuMemberBusinessLicense
     */
    CuMemberBusinessLicense selectLicenseByBusinessNo(String businessNo);

    /**
     * 查询营业执照详情
     *
     * @param pkId ID
     * @return CuMemberBusinessLicenseVO
     */
    CuMemberBusinessLicenseVO selectLicenseDetail(Long pkId);


    /**
     * 批量删除营业执照信息
     *
     * @param pkMembers      会员IDS
     * @param updatePkMember 更新ID
     * @return Boolean
     */
    Boolean updateMemberLicenseByPkMembers(List<Long> pkMembers, Long updatePkMember);


}
