| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /**
- * Copyright (c) 2012-present 铭软科技(mingsoft.net)
- * 本软件及相关文档文件(以下简称“软件”)的版权归 铭软科技 所有
- * 遵循 铭软科技《服务协议》中的《保密条款》
- */
- package net.mingsoft.people.action;
- import jakarta.servlet.http.HttpServletRequest;
- import net.mingsoft.base.util.BundleUtil;
- import net.mingsoft.basic.util.BasicUtil;
- import net.mingsoft.people.constant.Const;
- import net.mingsoft.people.constant.e.SessionConstEnum;
- import net.mingsoft.people.entity.PeopleEntity;
- import net.mingsoft.people.util.PeopleUtil;
- import java.util.MissingResourceException;
- /**
- *
- * 基础类
- * @author 铭飞开发团队
- * @version
- * 版本号:0.0<br/>
- * 创建日期:2017-8-23 10:10:22<br/>
- * 历史修订:<br/>
- */
- public class BaseAction extends net.mingsoft.mdiy.action.BaseAction {
- @Override
- protected String getResString(String key) {
- // TODO Auto-generated method stub
- String str = "";
- try {
- str = super.getResString(key);
- } catch (MissingResourceException e) {
- // str = getLocaleString(key, Const.RESOURCES);
- str = BundleUtil.getString(Const.RESOURCES,key);
- }
- return str;
- }
-
- /**
- * 从shiro中获取会员信息.没有返回shiro未登录异常<br/>
- * 建议Action层使用,如果其他层如biz层建议直接调用PeopleUtil.getPeopleBean()
- */
- protected PeopleEntity getPeopleBySession() {
- // 由于SecurityUtils.getSubject()压入的是完整peopleBean数据,peopleBean又是peopleEntity子类
- // 所以这里直接采用peopleBean返回
- return PeopleUtil.getPeopleBean();
- }
- }
|