package com.zfire.mall.manager.commonmapper;

import com.baomidou.mybatisplus.annotation.SqlParser;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zfire.mall.manager.bean.admin.respDto.AdminCompanyWechatRespPageBean;
import com.zfire.mall.manager.bean.admin.respDto.AdminUserDto;
import com.zfire.mall.manager.plus.entity.AdminCompany;
import com.zfire.mall.manager.plus.entity.AdminUser;
import com.zfire.mall.manager.plus.entity.AdminUserWebsitRela;
import com.zfire.mall.manager.plus.entity.StockCorrespond;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminMapper {


    /**
     * 商户列表
     */
    @SqlParser(filter = true)
    public IPage<AdminUserDto> mchList(IPage page,
                                       @Param("adminCompanyIds") List<String> adminCompanyIds,
                                       @Param("adminWebsitIds") List<String> adminWebsitIds,
                                       @Param("userName") String userName,
                                       @Param("nickName") String nickName,
                                       @Param("linkPhone") String linkPhone,
                                       @Param("email") String email,
                                       @Param("status") Boolean status,
                                       @Param("roleId") String roleId,
                                       @Param("isMaster") Boolean isMaster,
                                       @Param("customerId") String customerId,
                                       @Param("isCustomer") Boolean isCustomer,
                                       @Param("roleName")  List<String>  roleName,
                                       @Param("websitNumber") String websitNumber,
                                       @Param("customerNumbers") List<String>  customerNumbers,
                                       @Param("isJiaXian") Integer isJiaXian,
                                       @Param("isGongcheng") Integer isGongcheng
                                       );



    @SqlParser(filter = true)
    public List<AdminCompany> queryAdminCompanyWechat(@Param("adminUserId") String adminUserId);


    List<StockCorrespond> StockCorrespondList(@Param("adminUserId") String adminUserId);


    /**
     * 查询所有子级的业务员
     */
    public List<String> queryChildServiceId(@Param("adminWebsitIds") List<String> adminWebsitIds,
                                            @Param("roleName") String roleName,
                                            @Param("notWebsitId") String notWebsitId);

    AdminUser selectByUserName(String userName);

    void delByUserName(String userName);
}
