package com.hotel.action;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.hotel.model.Item_cat;
import com.hotel.model.Room_cat;
import com.hotel.service.ItemCatService;
import com.hotel.service.RoomCatService;
import com.hotel.utils.Pager;
import com.opensymphony.xwork2.ActionContext;

@Controller("loginAction")
@Scope("prototype")
public class LoginAction {
    
    @Autowired
    private RoomCatService roomCatService;
    
    @Autowired
    private ItemCatService itemCatService;
	//首页
	public String index() {
	    Pager<Room_cat> pagers = roomCatService.listAll();
	    Pager<Item_cat> pager = itemCatService.listAll();
	    ActionContext.getContext().put("pager", pager);
	    ActionContext.getContext().put("pagers", pagers);
        return "success";
	}
	//登陆页面
	public String login() {
		return "success";
	}
   //注册页面
	public String register() {
		return "success";
	}
	   //退出
		public String tuichu() {
			ActionContext ac = ActionContext.getContext();
			Map session = ac.getSession();
			session.remove("userName");
			session.remove("userId");
			return "login";
		}
}
最近下载更多
微信网友_6177587776049152  LV1 2023年4月23日
打野只抓上  LV2 2023年4月12日
 LV6 2023年3月12日
sweetlove  LV17 2022年11月2日
jimodeai  LV14 2022年10月31日
微信网友_5952527027507200  LV1 2022年6月20日
12koko  LV3 2022年6月5日
1690356080  LV37 2022年5月28日
zhuxxiaoh  LV8 2022年5月19日
xiex909  LV27 2022年5月11日
最近浏览更多
荣》Cowboy  LV12 4月11日
qq1357574774  LV2 3月28日
Gin19960217  LV4 3月18日
皇甫科昊 3月7日
暂无贡献等级
akkye_7  LV1 1月11日
WBelong  LV7 2023年12月25日
pokerf  LV5 2023年12月19日
wdw2444156008 2023年11月13日
暂无贡献等级
kisooo 2023年11月8日
暂无贡献等级
jiemomo  LV12 2023年11月5日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友