package com.ningdatech.carapi.user.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.StrUtil;
import cn.hutool.http.HttpStatus;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.basic.exception.BaseUncheckedException;
import com.ningdatech.cache.repository.CachePlusOps;
import com.ningdatech.carapi.datascope.aop.LambdaDataScope;
import com.ningdatech.carapi.sys.entity.UserRole;
import com.ningdatech.carapi.sys.entity.dto.UserSaveDTO;
import com.ningdatech.carapi.sys.entity.dto.UserUpdateDTO;
import com.ningdatech.carapi.sys.service.UserRoleService;
import com.ningdatech.carapi.sys.utils.AuthCacheKeyUtils;
import com.ningdatech.carapi.user.entity.NdUserAuth;
import com.ningdatech.carapi.user.entity.NdUserInfo;
import com.ningdatech.carapi.user.entity.NdUserInfoJoin;
import com.ningdatech.carapi.user.mapper.NdUserInfoJoinMapper;
import com.ningdatech.carapi.user.mapper.NdUserInfoMapper;
import com.ningdatech.carapi.user.security.auth.constant.AuthTypeEnum;
import com.ningdatech.carapi.user.service.INdUserAuthService;
import com.ningdatech.carapi.user.service.INdUserInfoJoinService;
import com.ningdatech.carapi.user.service.INdUserInfoService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Objects;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author LiuXinXin
 * @since 2022-09-30
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class NdUserInfoJoinServiceImpl extends ServiceImpl<NdUserInfoJoinMapper, NdUserInfoJoin>
        implements INdUserInfoJoinService {

    private final NdUserInfoJoinMapper userInfoJoinMapper;

    @Override
    @LambdaDataScope(wrapperIndex = 1)
    public Page<NdUserInfoJoin> pageJoin(Page<NdUserInfoJoin> page, LambdaQueryWrapper<NdUserInfoJoin> wrapper) {
        return userInfoJoinMapper.pageJoin(page,wrapper);
    }
}
