package cn.iocoder.yudao.module.system.dal.mysql.face;

import cn.iocoder.yudao.module.system.dal.dataobject.face.UserFace;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface FaceMapper extends BaseMapper<UserFace>{

    @Insert("insert into user_face (user_id,feature_value,url,sys_user_id) values (#{userId},#{featureValue},#{url},#{sysUserId})")
    Boolean add(UserFace user);

    @Select("select * from user_face")
    List<UserFace> getAllUser();


    //根据id查询用户
    @Select("select * from user_face where sys_user_id = #{userId}")
    UserFace getUserById(Long userId);


    @Select("select nickname,mobile from member_user where id = #{userId}")
    Map<String,String> getMemberUserById(Long userId);
}
