package cn.com.countrygarden.bi.main.service.erp.impl;

import cn.com.countrygarden.bi.main.core.AbstractService;
import cn.com.countrygarden.bi.main.core.Response;
import cn.com.countrygarden.bi.main.core.Result;
import cn.com.countrygarden.bi.main.dao.twerp.hm.TbSysUserMapper;
import cn.com.countrygarden.bi.main.dto.tbsysuser.RtsUserQuery;
import cn.com.countrygarden.bi.main.dto.tbsysuser.SysUserDto;
import cn.com.countrygarden.bi.main.model.sys.SysUser;
import cn.com.countrygarden.bi.main.service.erp.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional(rollbackFor = RuntimeException.class)
public class SysUserServiceImpl extends AbstractService<SysUser> implements SysUserService {

    @Autowired
    private TbSysUserMapper tbSysUserMapper;
    @Override
    public Result queryRtsUserData(RtsUserQuery rtsUserQuery) {

        List<SysUserDto> list = tbSysUserMapper.findByNameAndCode(rtsUserQuery);
        return Response.response(list);
    }
}
