package com.czg.account.service;

import com.czg.account.dto.user.SysUserAddDTO;
import com.czg.account.dto.user.SysUserEditDTO;
import com.czg.account.dto.user.SysUserEditPwdDTO;
import com.czg.account.entity.SysUser;
import com.czg.account.vo.SysUserDetailVO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

/**
 * 系统用户 服务层。
 *
 * @author Administrator
 * @since 2025-02-08
 */
public interface SysUserService extends IService<SysUser> {

    SysUser addUser(String nickname, String accountName, String accountPwd, String phone, Long roleId);

    Boolean updateSysUserPwd(long sysUserId, String accountPwd);

    Boolean removeUserAndRole(Long id);

    Page<SysUserDetailVO> getPage(String key, String startTime, String endTime, Integer status);

    Boolean edit(SysUserEditDTO sysUserEditDTO);

    Boolean delete(Integer id);

    Boolean add(SysUserAddDTO sysUserAddDTO);

    void download(String key, String startTime, String endTime, Integer status, HttpServletResponse response) throws IOException;

    SysUserDetailVO detail(Integer id);

    Boolean editPwd(SysUserEditPwdDTO sysUserEditPwdDTO);

}
