package com.tax.token.service.impl;


import com.tax.token.mapper.TkUserMapper;
import com.tax.token.model.TkUser;
import com.tax.token.model.TkUserExample;
import com.tax.token.service.api.TkUserService;
import com.yxcheng.token.common.service.AbstractService;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;


@Transactional
@Component
@ComponentScan(basePackages = {"com.tax.token.dao", "com.tax.token.integration"})
public class TkUserServiceImpl extends AbstractService<TkUserMapper,TkUserExample,TkUser> implements TkUserService {

    public TkUser getUserByUserCode(String userCode, String functionNo) {
        TkUserExample userExample = new TkUserExample();
        userExample.createCriteria().andUserNameEqualTo(userCode).andFunctionNoEqualTo(functionNo);
        TkUser tkUser = getOne(userExample);
        return tkUser;
    }
}
