package cn.superdesk.uniorder.service.sys;

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._superdeskapp.jwt.SupperdeskAppTokenUser;
import cn.superdesk.uniorder.dto.vo.sys.SysUserView;
import cn.superdesk.uniorder.service.base.BaseService;

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

/**
 * @Description: Java类作用描述
 * @Author: linjinyu
 * @CreateDate: 2021/6/15 下午7:01
 * @UpdateUser: linjinyu
 * @UpdateDate: 2021/6/15 下午7:01
 * @UpdateRemark: 修改内容
 * @Version: 1.0
 */
public interface SysUserService extends BaseService<SysUser> {

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

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

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

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

	int opPhysicsDelete(Long id, LoginSysUser loginSysUser);

	int opLogicalDelete(Long id, LoginSysUser loginSysUser);

	/****************************************** 商城 供应商 start ******************************************/

	SysUser getSysUser4SupperDeskUniMallSupplier(Long outSaleId, String outSaleName);

	SysUser createSysUser4SupperDeskUniMallSupplier(Long outSaleId, String outSaleName);

	/****************************************** 商城 供应商   end ******************************************/

	/****************************************** 服务之窗 运营商 渠道商 start ******************************************/

	SysUser getSysUser4SupperDeskUniService(SupperdeskAppTokenUser userToken);

	SysUser createSysUser4SupperDeskUniService(SupperdeskAppTokenUser userToken);

	/****************************************** 服务之窗 运营商 渠道商   end ******************************************/

	SysCompany getSysCompany(Long id);


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

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

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

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

    SysUser createSysUser4Qchjc(String createUserId, String createUserName);


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

}
