package com.zcloud.basic.info.persistence.repository;

import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.Response;
import com.baomidou.mybatisplus.core.injector.methods.UpdateById;
import com.jjb.saas.framework.repository.repo.BaseRepository;
import com.jjb.saas.system.client.role.response.RoleCO;
import com.zcloud.basic.info.domain.model.CorpInfoE;
import com.zcloud.basic.info.domain.model.UserE;
import com.zcloud.basic.info.persistence.dataobject.UserCorpInfoDO;
import com.zcloud.basic.info.persistence.dataobject.UserDO;
import com.zcloud.basic.info.persistence.dataobject.UserImgDO;
import org.apache.catalina.User;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Map;

/**
* web-infrastructure
* @Author zhangyue
* @Date 2025-11-04 14:07:36
*/
public interface UserRepository extends BaseRepository<UserDO> {
    PageResponse<UserDO> listPage(Map<String,Object> params);


    List<UserDO> listAll(Map<String,Object> params);

    Long getCountByCorpInfoId(Long id);

    Boolean checkUserDepartment(Long id);
    Boolean checkUserDepartment(Long[] ids);

    UserDO getInfoById(Long id);

    UserDO getInfoByUserName(String userName);
    Response countUser(Map<String,Object> params);

    List<UserDO> listByPostId(Long postId);
    List<UserDO> listByPostIds(Long[] postIds);

    List<UserDO> listByCorpInfoId(Long corpInfoId);

    void addCorpUser(UserE userE);

    void saveUser(UserDO userDO);
    void saveUserYanshi(UserDO userDO);

    void saveRegisterUser(UserDO userDO);

    void saveOnboardingUser(UserE userE);

    void updateInfoById(UserDO userDO);

    void deleteUserById(Long id);

    void changePassword(Long id, String password);

    void updateUserName(UserDO userDO);

    Map<Long, String> getDepartmentLeaderByDepartmentId(List<Long> departmentIds);

    Long getDefaultRoleId();

    Map<String, Long> getRoleMap();



    Response updatePassword(UserDO userDO);

    Boolean updateFaceUrl(UserDO userDO);

    List<UserDO> listByPhone(String phone);

    UserDO getEncryInfo(UserE userE);

    Boolean checkUserPassWordEncryInfo(String password);

    void saveUserXgf(UserDO d);

    PageResponse<UserDO> listXgf(Map<String, Object> params);

    UserDO getByPhoneAndIdCard(String phone, String idCardNumber);

    void checkUserIdCard( Long id, String userIdCard);

    List<UserDO> getListByPhone(String phone,List<Integer> employmentFlagList);

    List<UserCorpInfoDO> getListByUserIds(List<Long> userIds);

    List<UserDO> getByIdCard(String userIdCard, List<Integer> employmentFlagList);

    void updateXgf(UserE userE);

    void deletedUserByPhone(String phone);

    UserDO getUserIdByPhone(@NotEmpty(message = "手机号不能为空") String phone);

    PageResponse<UserDO> pageByNopermission(Map<String, Object> params);

    void updateFaceByPhone(@NotEmpty(message = "人脸头像url不能为空") String userAvatarUrl, String phone);


    void deleteByCorpInfoId(Long corpInfoId);




    List<UserImgDO> listBase64ByUrl(Map<String,Object> params);

    List<UserDO> getUserListByUserId(String foreignKey);
}

