nfdw_stand/src/com/fgkj/actions/LoginAction.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
nfdw_stand/src/com/fgkj/dao/impl/User_infImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
nfdw_stand/src/com/fgkj/services/User_infService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
nfdw_stand/src/com/fgkj/actions/LoginAction.java
@@ -21,6 +21,7 @@ import com.fgkj.services.User_logService; import com.fgkj.services.Vip_userService; import com.opensymphony.xwork2.ActionSupport; import com.softkey.jsyunew3; import org.apache.struts2.json.annotations.JSON; @@ -302,6 +303,17 @@ return SUCCESS; } /** * 检查用户是否存在 * @return */ public String faceExist(){ User_inf userInf = ActionUtil.getGson().fromJson(json, User_inf.class); ServiceModel model = service.faceExist(userInf.getUName()); result = ActionUtil.tojson(model); return SUCCESS; } public String getResult() { return result; } nfdw_stand/src/com/fgkj/dao/impl/User_infImpl.java
@@ -816,4 +816,31 @@ }); return (User_inf) list.get(0); } public Integer faceExist(String uName) { String sql = "select face_id as uId from db_user.tb_user_inf where uName=? limit 1"; List<User_inf> list = DAOHelper .executeQuery(sql, DBUtil.getConn(), new Object[]{uName}, new CallBack() { public List<User_inf> getResults(ResultSet rs) { List<User_inf> list=new ArrayList(); try { while(rs.next()){ User_inf uinf=new User_inf(); uinf.setUId(rs.getInt("uId")); list.add(uinf); } } catch (SQLException e) { e.printStackTrace(); } return list; } }); if(list.get(0).getUId()==0||list.get(0).getUId()==null){ return 0; }else{ return 1; } } } nfdw_stand/src/com/fgkj/services/User_infService.java
@@ -525,4 +525,14 @@ } return model; } public ServiceModel faceExist(String uName) { Integer count = new User_infImpl().faceExist(uName); if(count==0){ model.setCode(0); }else{ model.setCode(1); } return model; } }