package com.jzdsh.auto.biz;

import com.jzdsh.auto.model.Authentication;
import lombok.extern.log4j.Log4j2;

/**
 * @ProjectName: auto
 * @Package: com.jzdsh.auto.biz
 * @ClassName: AuthenticationService
 * @Author: Jzdsh
 * @Description: 平台认证
 * @Date: 2020/3/21 12:56
 * @Version: 1.0
 */
@Log4j2
public class AuthenticationService {


    /**
     * 根据用户id查找平台认证信息
     * @param userId
     * @return
     */
    public Authentication getByUserId(Integer userId) {
        try {
            return Authentication.dao.findFirst("select * from authentication where userId = ?", userId);
        } catch (Exception e) {
            log.info("com.jzdsh.auto.biz.AuthenticationService.getByUserId" + e);
        }
        return null;
    }

}
