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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    验证验证码
    protected boolean
    验证验证码
    protected String
    decryptByAES(jakarta.servlet.http.HttpServletRequest request, String str)
    AES解密字符串,key值为当前应用编号
    protected String
    encryptByAES(jakarta.servlet.http.HttpServletRequest request, String str)
    AES加密字符串,key值为当前应用编号
    protected String
    获取验证码
    protected String
     
    protected String
    redirectBack(boolean flag)
    返回重定向
    protected void
    removeUrlParams(jakarta.servlet.http.HttpServletRequest request, String[] fitlers)
    Deprecated.
    protected boolean
    validated(String tableName, String fieldName, String fieldValue)
    适用于insert save数据时进行唯一性判断 判断指定字段在数据库是否已经存在
    protected boolean
    validated(String tableName, String fieldName, String fieldValue, String id, String idName)
    适用于update 更新 数据时进行唯一性判断 判断指定字段在数据库是否已经存在 主键id用来防止跟自身字段验证重复

    Methods inherited from class net.mingsoft.base.action.BaseAction

    getDomain, getHost, getHostIp, getLocaleString, getMapByProperties, getMapByProperties, getResString, getResString, getResString, getUrl, isMobileDevice

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BaseAction

      public BaseAction()
  • Method Details

    • getResString

      protected String getResString(String key)
      Overrides:
      getResString in class net.mingsoft.base.action.BaseAction
    • checkRandCode

      protected boolean checkRandCode()
      验证验证码
      Returns:
      如果相同,返回true,否则返回false
    • decryptByAES

      protected String decryptByAES(jakarta.servlet.http.HttpServletRequest request, String str)
      AES解密字符串,key值为当前应用编号
      Parameters:
      request - HttpServletRequest对象
      str - 需要解密的字符串
      Returns:
      返回解密后的字符串
    • encryptByAES

      protected String encryptByAES(jakarta.servlet.http.HttpServletRequest request, String str)
      AES加密字符串,key值为当前应用编号
      Parameters:
      request - HttpServletRequest对象
      str - 需要加密的字符串
      Returns:
      返回加密后的字符串
    • getRandCode

      protected String getRandCode()
      获取验证码
      Returns:
      返回验证码,获取不到返回null
    • redirectBack

      protected String redirectBack(boolean flag)
      返回重定向
      Parameters:
      flag - true:提供给springMVC返回,false:只是获取地址
      Returns:
      返回重定向后的地址
    • checkRandCode

      protected boolean checkRandCode(String param)
      验证验证码
      Parameters:
      param - 表单验证码参数名称
      Returns:
      如果相同,返回true,否则返回false
    • removeUrlParams

      @Deprecated protected void removeUrlParams(jakarta.servlet.http.HttpServletRequest request, String[] fitlers)
      Deprecated.
      移除url参数
      Parameters:
      request -
      fitlers - 需要移除的字段名称
    • validated

      protected boolean validated(String tableName, String fieldName, String fieldValue)
      适用于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 - 要更新的主键id
      idName - 要更新的主键名称
      Returns: