package com.zhongshu.card.server.core.dao.org;

import com.github.microservice.components.data.mongo.mongo.dao.MongoDao;
import com.zhongshu.card.client.type.Sex;
import com.zhongshu.card.server.core.dao.org.extend.UserCountDaoExtend;
import com.zhongshu.card.server.core.domain.org.UserAccount;

import java.util.List;

/**
 * @author TRX
 * @date 2024/3/21
 */
public interface UserCountDao extends MongoDao<UserAccount>, UserCountDaoExtend {

    UserAccount findTopById(String id);

    UserAccount findTopByUserId(String userId);

    List<UserAccount> findByUserIdIn(List<String> userIds);

    UserAccount findTopByPhone(String phone);

    UserAccount findTopByLoginName(String loginName);

    long countByIsDelete(Boolean isDeleted);

    long countByIsDeleteAndSex(Boolean isDeleted, Sex sex);

}
