package com.gic.haoban.manage.api.service;

import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.enums.OpenStaffOfflineEnum;
import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;

import java.util.List;

public interface OpenStaffApiService {

    /**
     * 授权绑定
     * @param qdto
     * @return
     */
    public ServiceResponse<OpenStaffDTO> init(OpenStaffInitQDTO qdto) ;

    /**
     * id查询
     * @param openStaffId
     * @return
     */
    public ServiceResponse<OpenStaffDTO> getById(Long openStaffId) ;

    public ServiceResponse<OpenStaffDTO> getByStaffId(String staffId) ;

    public ServiceResponse<OpenStaffDTO> getByUUID(String uuid) ;

    public ServiceResponse<OpenStaffDTO> getByQwUserId(Long qwUserId) ;


    /**
     * 删除
     * @param id
     * @return
     */
    public ServiceResponse<Void> delete(Long id) ;


    /**
     * 设置需要输入验证码
     * @param uuid
     * @return
     */
    public ServiceResponse<Void> updateValiFlag(String uuid) ;

    /**
     * 设置需要二次验证扫码
     * @param uuid
     * @return
     */
    public ServiceResponse<Void> update2QrcodeFlag(String uuid) ;

    /**
     * 获取二次验证码
     * @param id
     * @return
     */
    public ServiceResponse<OpenStaffDTO> get2Qrcode(long id) ;

    /**
     * 登录成功
     */
    public ServiceResponse<Void> login(String uuid , Long qwCorpid ,String corpNam , Long qwUserId) ;

    /**
     * 退出登录
     */
    public ServiceResponse<Void> logout(String uuid , OpenStaffOfflineEnum offlineEnum) ;

    public ServiceResponse<Void> logout(Long openStaffId) ;

    /**
     * 校验验证码
     * @param openStaffId
     * @param validCode
     * @return
     */
    public ServiceResponse<Void> checkCode(Long openStaffId, String validCode) ;

    /**
     *
     * @param uuid
     * @param step
     * @return
     */
    public ServiceResponse<Void> updateLoginStep(String uuid , int step) ;

    ServiceResponse<OpenStaffLicenseDTO> getLicenseInfo(String wxEnterpriseId, String enterpriseId);

    ServiceResponse<Page<OpenStaffListDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo);

    /**
     * 查询托管的导购
     * @param wxEnterpriseId
     * @param enterpriseIdList
     * @param clerkIdList
     * @return
     */
    List<StaffClerkRelationDTO> listOpenStaffByClerk(String wxEnterpriseId , String enterpriseIdList , List<String> clerkIdList) ;

    List<StaffClerkRelationDTO> listOpenStaffByStore(String wxEnterpriseId , String enterpriseIdList , List<String> storeIdList) ;

    List<String> listAllOnlineStaff() ;

    List<String> listAllOnlineStaff(String wxEnterpriseId , String enterpriseId) ;

    /**
     * 查询所有托管的门店
     * @param wxEnterpriseId
     * @param enterpriseId
     * @return
     */
    List<String> listOpenStoreId(String wxEnterpriseId , String enterpriseId) ;

    /**
     * 更新下一次间隔时间
     * @param openStaffId
     * @param type
     * @param time
     */
    public void  updateStopTime(Long openStaffId , int type , int time) ;
}
