package com.quinn.controller;

import com.quinn.common.QuinnConstant;
import com.quinn.pojo.User;

import javax.servlet.http.HttpServletRequest;

public class BaseModelController {

    protected String getLoginUserId(HttpServletRequest request){
        User user = (User) request.getSession().getAttribute("loginUser");
        if (user != null){
            return user.getUid();
        }
        return "";
    }

    protected String getSessionId(HttpServletRequest request){
        return QuinnConstant.SESSION_ID + request.getSession().getId();
    }

}
