Explorar o código

系统日志修改

git-svn-id: https://192.168.57.71/svn/jsgkj@1163 931142cf-59ea-a443-aa0e-51397b428577
ld_zhouk %!s(int64=8) %!d(string=hai) anos
pai
achega
a26fb871eb

+ 1 - 0
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/mappers/SysLogModelMapper.java

@@ -4,4 +4,5 @@ import com.xt.js.gkaq.common.BaseMapper;
 import com.xt.js.gkaq.frame.model.SysLogModel;
 
 public interface SysLogModelMapper extends BaseMapper<SysLogModel> {
+
 }

+ 36 - 16
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/model/SysLogModel.java

@@ -6,36 +6,56 @@ public class SysLogModel extends BaseUUIDModel {
     /**
      * serialVersionUID
      */
-    private static final long serialVersionUID = -5526155564008993724L;
+    private static final long serialVersionUID = -8442784917998116415L;
 
-    private String classPath;
+    private String logType;
 
-    private String type;
+    private String logPath;
 
-    private String message;
+    private String logParam;
 
-    public String getClassPath() {
-        return classPath;
+    private String logMsg;
+
+    private String clientIp;
+
+    public String getLogType() {
+        return logType;
+    }
+
+    public void setLogType(String logType) {
+        this.logType = logType == null ? null : logType.trim();
+    }
+
+    public String getLogPath() {
+        return logPath;
+    }
+
+    public void setLogPath(String logPath) {
+        this.logPath = logPath == null ? null : logPath.trim();
+    }
+
+    public String getLogParam() {
+        return logParam;
     }
 
-    public void setClassPath(String classPath) {
-        this.classPath = classPath == null ? null : classPath.trim();
+    public void setLogParam(String logParam) {
+        this.logParam = logParam == null ? null : logParam.trim();
     }
 
-    public String getType() {
-        return type;
+    public String getLogMsg() {
+        return logMsg;
     }
 
-    public void setType(String type) {
-        this.type = type == null ? null : type.trim();
+    public void setLogMsg(String logMsg) {
+        this.logMsg = logMsg == null ? null : logMsg.trim();
     }
 
-    public String getMessage() {
-        return message;
+    public String getClientIp() {
+        return clientIp;
     }
 
-    public void setMessage(String message) {
-        this.message = message == null ? null : message.trim();
+    public void setClientIp(String clientIp) {
+        this.clientIp = clientIp == null ? null : clientIp.trim();
     }
 
 }

+ 0 - 3
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/system/FrameParam.java

@@ -14,9 +14,6 @@ public class FrameParam {
 	/** session中存储授权信息的key值 */
 	public static String SESSION_KEY_AUTH = "__AUTH";
 
-    public static final String SESSION_KEY_MENUS = "GKAQ_USER_MENUS";
-    public static final String SESSION_KEY_BTNS = "GKAQ_USER_BTNS";
-
     /**
 	 * 重新加载系统参数
 	 */

+ 3 - 2
gkaqv2/trunk/modules/frame/src/main/java/com/xt/js/gkaq/frame/system/GkaqFormAuthenticationFilter.java

@@ -11,6 +11,7 @@ import org.apache.shiro.session.Session;
 import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import com.xt.js.gkaq.common.Constants;
 import com.xt.js.gkaq.frame.model.ButtonModel;
 import com.xt.js.gkaq.frame.model.GroupModelDto;
 import com.xt.js.gkaq.frame.model.MenuModel;
@@ -45,8 +46,8 @@ public class GkaqFormAuthenticationFilter extends FormAuthenticationFilter {
         List<MenuModel> menuList = menuService.selectAllByUser(userGroup);
         List<ButtonModel> btnList = buttonService.selectAllByUser(userGroup);
         Session session = SecurityUtils.getSubject().getSession();
-        session.setAttribute(FrameParam.SESSION_KEY_MENUS, menuList);
-        session.setAttribute(FrameParam.SESSION_KEY_BTNS, btnList);
+        session.setAttribute(Constants.SESSION_KEY_MENUS, menuList);
+        session.setAttribute(Constants.SESSION_KEY_BTNS, btnList);
         return super.onLoginSuccess(token, subject, request, response);
     }
 

+ 22 - 18
gkaqv2/trunk/modules/frame/src/main/resources/com/xt/js/gkaq/frame/mappers/SysLogModelMapper.xml

@@ -3,9 +3,11 @@
 <mapper namespace="com.xt.js.gkaq.frame.mappers.SysLogModelMapper" >
   <resultMap id="BaseResultMap" type="com.xt.js.gkaq.frame.model.SysLogModel" >
     <id column="ID" property="id" jdbcType="VARCHAR" />
-    <result column="CLASS_PATH" property="classPath" jdbcType="VARCHAR" />
-    <result column="TYPE" property="type" jdbcType="CHAR" />
-    <result column="MESSAGE" property="message" jdbcType="VARCHAR" />
+    <result column="LOG_TYPE" property="logType" jdbcType="CHAR" />
+    <result column="LOG_PATH" property="logPath" jdbcType="VARCHAR" />
+    <result column="LOG_PARAM" property="logParam" jdbcType="VARCHAR" />
+    <result column="LOG_MSG" property="logMsg" jdbcType="VARCHAR" />
+    <result column="CLIENT_IP" property="clientIp" jdbcType="VARCHAR" />
     <result column="STATE" property="state" jdbcType="CHAR" />
     <result column="CREATE_TIME" property="createTime" jdbcType="TIMESTAMP" />
     <result column="UPDATE_TIME" property="updateTime" jdbcType="TIMESTAMP" />
@@ -17,20 +19,22 @@
     where ID = #{id,jdbcType=VARCHAR}
   </delete>
   <insert id="insert" parameterType="com.xt.js.gkaq.frame.model.SysLogModel" >
-    insert into AQ_BASIC_FRAME_SYSLOG (ID, CLASS_PATH, TYPE, 
-      MESSAGE, STATE, CREATE_TIME, 
-      UPDATE_TIME, CREATE_USER, UPDATE_USER
-      )
-    values (#{id,jdbcType=VARCHAR}, #{classPath,jdbcType=VARCHAR}, #{type,jdbcType=CHAR}, 
-      #{message,jdbcType=VARCHAR}, #{state,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{createUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR}
-      )
+    insert into AQ_BASIC_FRAME_SYSLOG (ID, LOG_TYPE, LOG_PATH, 
+      LOG_PARAM, LOG_MSG, CLIENT_IP, 
+      STATE, CREATE_TIME, UPDATE_TIME, 
+      CREATE_USER, UPDATE_USER)
+    values (#{id,jdbcType=VARCHAR}, #{logType,jdbcType=CHAR}, #{logPath,jdbcType=VARCHAR}, 
+      #{logParam,jdbcType=VARCHAR}, #{logMsg,jdbcType=VARCHAR}, #{clientIp,jdbcType=VARCHAR}, 
+      #{state,jdbcType=CHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{createUser,jdbcType=VARCHAR}, #{updateUser,jdbcType=VARCHAR})
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.xt.js.gkaq.frame.model.SysLogModel" >
     update AQ_BASIC_FRAME_SYSLOG
-    set CLASS_PATH = #{classPath,jdbcType=VARCHAR},
-      TYPE = #{type,jdbcType=CHAR},
-      MESSAGE = #{message,jdbcType=VARCHAR},
+    set LOG_TYPE = #{logType,jdbcType=CHAR},
+      LOG_PATH = #{logPath,jdbcType=VARCHAR},
+      LOG_PARAM = #{logParam,jdbcType=VARCHAR},
+      LOG_MSG = #{logMsg,jdbcType=VARCHAR},
+      CLIENT_IP = #{clientIp,jdbcType=VARCHAR},
       STATE = #{state,jdbcType=CHAR},
       CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
       UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
@@ -39,14 +43,14 @@
     where ID = #{id,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
-    select ID, CLASS_PATH, TYPE, MESSAGE, STATE, CREATE_TIME, UPDATE_TIME, CREATE_USER, 
-    UPDATE_USER
+    select ID, LOG_TYPE, LOG_PATH, LOG_PARAM, LOG_MSG, CLIENT_IP, STATE, CREATE_TIME, 
+    UPDATE_TIME, CREATE_USER, UPDATE_USER
     from AQ_BASIC_FRAME_SYSLOG
     where ID = #{id,jdbcType=VARCHAR}
   </select>
   <select id="selectAll" resultMap="BaseResultMap" >
-    select ID, CLASS_PATH, TYPE, MESSAGE, STATE, CREATE_TIME, UPDATE_TIME, CREATE_USER, 
-    UPDATE_USER
+    select ID, LOG_TYPE, LOG_PATH, LOG_PARAM, LOG_MSG, CLIENT_IP, STATE, CREATE_TIME, 
+    UPDATE_TIME, CREATE_USER, UPDATE_USER
     from AQ_BASIC_FRAME_SYSLOG
   </select>
 </mapper>