package com.greenorange.promotion.service.user;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.greenorange.promotion.model.dto.CommonBatchRequest;
import com.greenorange.promotion.model.dto.CommonRequest;
import com.greenorange.promotion.model.dto.user.UserAddRequest;
import com.greenorange.promotion.model.dto.user.UserQueryRequest;
import com.greenorange.promotion.model.dto.user.UserUpdateRequest;
import com.greenorange.promotion.model.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.greenorange.promotion.model.vo.user.UserVO;
import jakarta.servlet.http.HttpServletRequest;

import java.util.List;

/**
* @author 35880
* @description 针对表【user(用户表)】的数据库操作Service
* @createDate 2025-03-30 23:03:14
*/
public interface UserService extends IService<User> {


    /**
     * 获取查询条件
     */
    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);


    /**
     * 分页查询用户
     */
    Page<UserVO> listUserByPage(UserQueryRequest userQueryRequest);


    /**
     * 根据id查询用户
     */
    UserVO queryUserById(CommonRequest commonRequest);


    /**
     * 添加用户
     */
    Long addUser(UserAddRequest userAddRequest);


    /**
     * 更新用户
     */
    boolean updateUser(UserUpdateRequest userUpdateRequest);


    /**
     * 删除用户
     */
    boolean deleteUser(CommonRequest commonRequest);


    /**
     * 批量删除用户
     */
    boolean delBatchUser(CommonBatchRequest commonBatchRequest);


    /**
     * 校验用户是否登录
     */
    User getLoginUser(HttpServletRequest request);
}
