package com.huimv.admin.session;

//import com.huimv.core.domain.MemberAccount;
//import com.huimv.core.domain.OrganizeInfo;
//import com.huimv.exception.PlatformException;
//import com.huimv.exception.constant.ExceptionConstant;

/**
 * @author yejijie
 * @created 2020年8月5日 上午8:29:26
*/
public class SessionBase {

//    protected OrganizeInfo getCurrentOrgInfo(){
//
//        OrganizeInfo organizeInfo = SessionHolder.getOrganizeInfo();
//        if(organizeInfo == null){
//            throw new PlatformException(ExceptionConstant.ORG_NOT_AUTHORIZE, "无法解析组织信息");
//        }
//        return organizeInfo;
//    }
//    protected Integer getCurrOrgId() {
//    	OrganizeInfo org = this.getCurrentOrgInfo();
//    	return org.getId();
//    }
//    protected MemberAccount getCurrentAccInfo(){
//        MemberAccount memberAccount = SessionHolder.getMemberAccount();
//        if(memberAccount == null){
//            throw new PlatformException(ExceptionConstant.ACCOUNT_NOT_AUTHORIZE, "无法解析账户信息");
//        }
//        return memberAccount;
//    }
//    protected Integer getCurrMemberId() {
//    	MemberAccount memberAccount = this.getCurrentAccInfo();
//    	return memberAccount.getId();
//    }
}
