package com.hs.api.service.Impl;

import com.hs.api.mapper.DicUserMapper;
import com.hs.api.mapper.SysUserMapper;
import com.hs.api.model.SysUser;
import com.hs.api.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements UserService {

    @Resource
    private SysUserMapper sysUserMapper;
    @Resource
    private DicUserMapper dicUserMapper;

    @Override
    public SysUser findByLoginName(String loginName) {
        return sysUserMapper.selectByCode(loginName);
    }

    @Override
    public Long findUserIdFromDicUser(String yyUserId) {
        return dicUserMapper.selectUserId(yyUserId);
    }

    @Override
    public SysUser findById(Long id) {
        return sysUserMapper.selectByPrimaryKey(id);
    }
}
