package com.inkasso.factoring.system.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.inkasso.adapter.page.PageResult;
import com.inkasso.factoring.system.user.entity.UserDO;
import com.inkasso.factoring.system.user.model.dto.UserDTO;
import com.inkasso.factoring.system.user.model.request.*;
import com.inkasso.management.statistics.model.UserStatisticsVO;
import com.inkasso.management.statistics.model.request.QueryUserStatisticsRequest;

import java.util.List;

/**
* @author 张超
* @date  2023-08-15
*/
  public interface UserService extends IService<UserDO> {

  /**
  * 添加操作
  * @param addUserRequest
  */
  void addUser(AddUserRequest addUserRequest);


  /**
  * 编辑操作
  * @param editUserRequest
  */
  void editUser(EditUserRequest editUserRequest);

  /**
  * 通过id获取详细信息
  * @param id
  */
    UserDTO getUserDtoById(Long id);

  /**
  * 删除
  */
  void deleteUser(Long id);

  /**
   * 通过手机号获取用户
   * @param phone
   * @return
   */
  UserDO getByPhone(String phone);


  UserDTO getUserByUsername(String username );

  void sendCode(String contactType,String type);


  void sendEmailCode(String email);


  void bindPhone(BindPhoneRequest bindPhoneRequest,String token);


  void editPassword(EditPasswordRequest editPasswordRequest);


  void bindEmail(BindEmailRequest bindEmailRequest);


  void updateHeadImg(Long fileId);

  void reSetPassword(ReSetPasswordRequest reSetPasswordRequest);

  /**
   * 用户注册
   *
   * @param userDO
   * @return
   */
  Boolean register(UserDO userDO);

  /**
   * 修改用户名
   */
  UserDO updateUsername(String username,String token);
}

