Package net.mingsoft.basic.action
Class BaseAction
java.lang.Object
net.mingsoft.base.action.BaseAction
net.mingsoft.basic.action.BaseAction
- Direct Known Subclasses:
AppAction,AppAction,BaseFileAction,CityAction,CityAction,LogAction,LoginAction,MainAction,ManagerAction,ModelAction,RoleAction,SystemAction,TemplateAction
public abstract class BaseAction
extends net.mingsoft.base.action.BaseAction
基础应用层的父类base
- Version:
- 版本号:100-000-000
创建日期:2015-7-19
历史修订: - Author:
- 铭飞开发团队
-
Field Summary
Fields inherited from class net.mingsoft.base.action.BaseAction
LOG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean验证验证码protected booleancheckRandCode(String param) 验证验证码protected StringdecryptByAES(jakarta.servlet.http.HttpServletRequest request, String str) AES解密字符串,key值为当前应用编号protected StringencryptByAES(jakarta.servlet.http.HttpServletRequest request, String str) AES加密字符串,key值为当前应用编号protected String获取验证码protected StringgetResString(String key) protected StringredirectBack(boolean flag) 返回重定向protected voidremoveUrlParams(jakarta.servlet.http.HttpServletRequest request, String[] fitlers) Deprecated.protected boolean适用于insert save数据时进行唯一性判断 判断指定字段在数据库是否已经存在protected boolean适用于update 更新 数据时进行唯一性判断 判断指定字段在数据库是否已经存在 主键id用来防止跟自身字段验证重复Methods inherited from class net.mingsoft.base.action.BaseAction
getDomain, getHost, getHostIp, getLocaleString, getMapByProperties, getMapByProperties, getResString, getResString, getResString, getUrl, isMobileDevice
-
Constructor Details
-
BaseAction
public BaseAction()
-
-
Method Details
-
getResString
- Overrides:
getResStringin classnet.mingsoft.base.action.BaseAction
-
checkRandCode
protected boolean checkRandCode()验证验证码- Returns:
- 如果相同,返回true,否则返回false
-
decryptByAES
AES解密字符串,key值为当前应用编号- Parameters:
request- HttpServletRequest对象str- 需要解密的字符串- Returns:
- 返回解密后的字符串
-
encryptByAES
AES加密字符串,key值为当前应用编号- Parameters:
request- HttpServletRequest对象str- 需要加密的字符串- Returns:
- 返回加密后的字符串
-
getRandCode
获取验证码- Returns:
- 返回验证码,获取不到返回null
-
redirectBack
返回重定向- Parameters:
flag- true:提供给springMVC返回,false:只是获取地址- Returns:
- 返回重定向后的地址
-
checkRandCode
验证验证码- Parameters:
param- 表单验证码参数名称- Returns:
- 如果相同,返回true,否则返回false
-
removeUrlParams
@Deprecated protected void removeUrlParams(jakarta.servlet.http.HttpServletRequest request, String[] fitlers) Deprecated.移除url参数- Parameters:
request-fitlers- 需要移除的字段名称
-
validated
适用于insert save数据时进行唯一性判断 判断指定字段在数据库是否已经存在- Parameters:
tableName- 表名fieldName- 字段名fieldValue- 字段值- Returns:
-
validated
protected boolean validated(String tableName, String fieldName, String fieldValue, String id, String idName) 适用于update 更新 数据时进行唯一性判断 判断指定字段在数据库是否已经存在 主键id用来防止跟自身字段验证重复- Parameters:
tableName- 表名fieldName- 字段名fieldValue- 字段值id- 要更新的主键ididName- 要更新的主键名称- Returns:
-