首页>代码>SSH整合maven+jquery+easyUI+mysql5.5图书管理实现增删改查及模糊查询>/BooksManager/src/main/java/org/bookmanager/action/userAction.java
package org.bookmanager.action;

import java.io.PrintWriter;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;

import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.apache.struts2.ServletActionContext;
import org.bookmanager.model.Brydm;
import org.bookmanager.model.Btscg;
import org.bookmanager.model.User;
import org.bookmanager.service.BrydmService;
import org.bookmanager.service.BtscgService;
import org.bookmanager.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.alibaba.fastjson.JSONObject;
import com.opensymphony.xwork2.ActionSupport;
 
/**
 * 商品操作-控制层
 *
 */
@Controller
@Scope("prototype")
public class userAction extends ActionSupport {
 
    private static final long serialVersionUID = 1L;
     
    private UserService userService;
    
    public UserService getUserService() {
		return userService;
	}

	public void setUserService(UserService userService) {
		this.userService = userService;
	}

	Logger logger = Logger.getLogger(userAction.class);
     
    private String userId;
    private String password;

     
    public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String execute() {
		User user = new User();
		user.setUserid(userId);
		
		User userMsg = userService.queryByParam(user).get(0);
		if(userMsg!=null) {
			if(userMsg.getPassword().equals(password)){
				super.addActionMessage("注册成功!");
				return "success";
			}
			else{
				return "input";
			}
		} else {
			super.addActionError("登录失败");
			return "input";
		}
		
	}

     
}
最近下载更多
y_x_happy  LV4 2024年6月25日
muoutang  LV11 2023年7月8日
poipoiiop  LV8 2023年1月3日
陈俊翰  LV7 2022年12月28日
齐吊大神  LV6 2022年12月20日
3305787467  LV12 2022年5月22日
辛星咖啡馆  LV2 2022年5月16日
微信网友_5911441934356480  LV1 2022年4月11日
lt33333  LV7 2022年4月9日
cx1111  LV1 2021年6月23日
最近浏览更多
XD_futura 5月13日
暂无贡献等级
krispeng  LV15 2024年10月2日
y_x_happy  LV4 2024年6月25日
TY0165  LV20 2024年6月19日
zyx66666 2024年5月18日
暂无贡献等级
2017143155  LV12 2024年5月7日
quartz  LV8 2024年3月13日
WBelong  LV8 2024年3月8日
1437047954 2024年3月7日
暂无贡献等级
周青松  LV3 2023年12月10日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友