package com.backendsys.mapper.System;

import com.backendsys.entity.System.SysUserDTO;
import com.backendsys.entity.System.SysUserPointsDTO;
import org.apache.ibatis.annotations.Mapper;

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

@Mapper
public interface SysUserMapper {
    List<Map<String, Object>> queryUserList(SysUserDTO sysUserDTO);
    List<Map<String, Object>> queryUserWithLogined(Set last_login_uuids);
    Map<String, Object> queryUserDetail(Long user_id);
    List<Map<String, Object>> queryUserUUIDSByIds(List<Long> ids);
    Map<String, Object> queryUserByIdOrName(Long id, String username, String phone, Integer phone_area_code);

    long insertUser(SysUserDTO sysUserDTO);
    long updateUserInfo(SysUserDTO sysUserDTO);

    // 查询 用户密码
    Map<String, Object> queryUserPassword(Long id);
    // 编辑用户密码
    long updateUserPassword(SysUserDTO sysUserDTO);

    // 编辑用户信息中的积分
    long updateUserPoint(SysUserPointsDTO sysUserPointsDTO);
    // 查询用户信息中的积分
    Map<String, Object> queryUserPoint(SysUserPointsDTO sysUserPointsDTO);

    long auditUser(SysUserDTO sysUserDTO);
    long deleteUser(Long id);
    long deleteUserBatch(List<Long> ids);
    long deactivateUser(Long id);
}
