package com.judong.chuanyiserver.service;

import com.judong.chuanyiserver.entity.Permission;
import com.judong.chuanyiserver.entity.Role;
import com.judong.chuanyiserver.entity.User;
import com.judong.chuanyiserver.util.Result;

import java.util.List;

public interface UserService {

    /**
     * 前端用户登录
     *
     * @param user
     * @return
     */
    Result frontUserLogin(User user);

    /**
     * 后台管理系统登录
     *
     * @param user
     * @return
     */
    Result backUserLogin(User user);

    /**
     * 添加用户
     *
     * @param user
     * @return
     */
    Result addUser(User user);

    Result updateUser(User user);

    Result assignRole(String userId, List<Role> roleList);

    Result userLoginOut();

    Result getUserPage(int page, int limit, String userName, Integer state, Integer userType);

    Result getUserById(String userId);

    Result updateUserStateById(String userId, Integer userState);

    Result getCodeImage(boolean hasPubKey);

    Result deleteUserById(String userId);
}
