package cn.superdesk.uniorder.dubbo.facade.sys;

import cn.superdesk.uniorder.common.enums.login.SysLoginMethodEnum;
import cn.superdesk.uniorder.common.enums.login.SysLoginTypeEnum;
import cn.superdesk.uniorder.common.exception.UnifiedOrderRuntimeException;
import cn.superdesk.uniorder.common.rest.response.R;
import cn.superdesk.uniorder.common.security.dto.LoginSysUser;
import cn.superdesk.uniorder.dao.entity.organisation.SysCompany;
import cn.superdesk.uniorder.dao.entity.sys.SysUser;
import cn.superdesk.uniorder.dao.entity.sys.SysUserOrderSourcetypeKey;
import cn.superdesk.uniorder.dto.param.system.SysUserQueryCriteria;
import cn.superdesk.uniorder.dto.vo._function.select.SelectOptionSysUser;
import cn.superdesk.uniorder.dto.vo._superdeskapp.jwt.SupperdeskAppTokenUser;
import cn.superdesk.uniorder.dto.vo.sys.SysUserView;
import cn.superdesk.uniorder.dto.vo.sys.SysUserVo;

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

/**
 * @Description: Java类作用描述
 * @Author: linjinyu
 * @CreateDate: 2020/11/10 上午11:08
 * @UpdateUser: linjinyu
 * @UpdateDate: 2020/11/10 上午11:08
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public interface DubboSysUserService {

	/****************************************** 登陆方式 门面 start ******************************************/
	SysUserVo userLoginBySupperDeskUniOrderBackEndFacade(String username, String password) throws UnifiedOrderRuntimeException;

	SysUserVo userLoginBySupperDeskUniServiceTokenFacade(SupperdeskAppTokenUser userToken);

	SysUserVo userLoginBySupperDeskUniMallSupplierFacade(Map<String, Object> conditions);

	/****************************************** 登陆方式 门面   end ******************************************/

	SysUserVo userLoginBySupperDeskUniServiceToken(String username, String password,SupperdeskAppTokenUser userToken);

	SysUserVo userLoginBySupperDeskUniMallSupplier(Long saleId, String saleName, SysUser sysUser) throws UnifiedOrderRuntimeException;

	SysUserVo userLoginCommon(String username, String password, SysLoginMethodEnum mode, SysLoginTypeEnum sysLoginTypeEnum);


	R<List<SysUserView>> findAllPage(SysUserQueryCriteria queryCriteria);

	List<SelectOptionSysUser> findAll(Map<String, Object> params);


	List<SysUser> findBySysUserIds(List<Long> sysUserIds);


	SysCompany getSysCompany(Long id);

	SysUser add(SysUser user, List<SysUserOrderSourcetypeKey> ls);

	void edit(SysUser user, List<SysUserOrderSourcetypeKey> ls);

	void delete(Long id);

	int opPhysicsDelete(Long id, LoginSysUser loginSysUser);

	int opLogicalDelete(Long id, LoginSysUser loginSysUser);


	/****************************************** 工具方法 sysUserIds 推导 start ******************************************/

	List<String> convertSysUserIds2FullName(List<Long> sysUserIds);

	Map<Long, String> convertSysUserIds2MapSysUserId2FullName(List<Long> sysUserIds);

	Map<Long, SysUser> convertSysUserIds2MapSysUserId2Entity(List<Long> sysUserIds);


	/****************************************** 工具方法 sysUserIds 推导   end ******************************************/


//	SysUserVO refreshToken(String userId);
//
//	int addModel(SysUser model);
//
//	int addSave(SysUserModify modify);
//
//
//	SysUser findById(String userId);
//
//	int updateObj(SysUserModify modify);
//
//	SysUserVO loginByToken(String token)throws MyException;
//
//	ResponseResult<List<SysUserQueryVO>> listSysUser(SysUserParamsVO vo) throws MyException;
//
//	ResponseResult<SysUserEditVO> getSysUser(SysUserParamsVO vo) throws MyException;
//
//	SysUser findbyContact(String contactNumber);

}
