Package com.loc.dao

Source Code of com.loc.dao.UsersDao

package com.loc.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.loc.pojo.Users;
@Component
public class UsersDao{

  @Autowired
  private BaseDao baseDao;
 
  @SuppressWarnings("unchecked")
  public Users findByName(String account) throws Exception {
    String sql = "select * from loc_user where user_account='"+account+"'";
    Users user = baseDao.queryForObject(sql, Users.mapRow(Users.class));
    return user;
  }
 
}
TOP

Related Classes of com.loc.dao.UsersDao

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.