shuzheng 9 лет назад
Родитель
Сommit
235d8ff02c

+ 24 - 7
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/mapper/UpmsLogMapper.xml

@@ -13,6 +13,7 @@
     <result column="method" jdbcType="VARCHAR" property="method" />
     <result column="user_agent" jdbcType="VARCHAR" property="userAgent" />
     <result column="ip" jdbcType="VARCHAR" property="ip" />
+    <result column="permissions" jdbcType="VARCHAR" property="permissions" />
   </resultMap>
   <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.zheng.upms.dao.model.UpmsLog">
     <result column="parameter" jdbcType="LONGVARCHAR" property="parameter" />
@@ -78,7 +79,7 @@
   </sql>
   <sql id="Base_Column_List">
     log_id, description, username, start_time, spend_time, base_path, uri, url, method, 
-    user_agent, ip
+    user_agent, ip, permissions
   </sql>
   <sql id="Blob_Column_List">
     parameter, result
@@ -143,13 +144,13 @@
     insert into upms_log (log_id, description, username, 
       start_time, spend_time, base_path, 
       uri, url, method, user_agent, 
-      ip, parameter, result
-      )
+      ip, permissions, parameter, 
+      result)
     values (#{logId,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR}, 
       #{startTime,jdbcType=BIGINT}, #{spendTime,jdbcType=INTEGER}, #{basePath,jdbcType=VARCHAR}, 
       #{uri,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{userAgent,jdbcType=VARCHAR}, 
-      #{ip,jdbcType=VARCHAR}, #{parameter,jdbcType=LONGVARCHAR}, #{result,jdbcType=LONGVARCHAR}
-      )
+      #{ip,jdbcType=VARCHAR}, #{permissions,jdbcType=VARCHAR}, #{parameter,jdbcType=LONGVARCHAR}, 
+      #{result,jdbcType=LONGVARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsLog">
     insert into upms_log
@@ -187,6 +188,9 @@
       <if test="ip != null">
         ip,
       </if>
+      <if test="permissions != null">
+        permissions,
+      </if>
       <if test="parameter != null">
         parameter,
       </if>
@@ -228,6 +232,9 @@
       <if test="ip != null">
         #{ip,jdbcType=VARCHAR},
       </if>
+      <if test="permissions != null">
+        #{permissions,jdbcType=VARCHAR},
+      </if>
       <if test="parameter != null">
         #{parameter,jdbcType=LONGVARCHAR},
       </if>
@@ -278,6 +285,9 @@
       <if test="record.ip != null">
         ip = #{record.ip,jdbcType=VARCHAR},
       </if>
+      <if test="record.permissions != null">
+        permissions = #{record.permissions,jdbcType=VARCHAR},
+      </if>
       <if test="record.parameter != null">
         parameter = #{record.parameter,jdbcType=LONGVARCHAR},
       </if>
@@ -302,6 +312,7 @@
       method = #{record.method,jdbcType=VARCHAR},
       user_agent = #{record.userAgent,jdbcType=VARCHAR},
       ip = #{record.ip,jdbcType=VARCHAR},
+      permissions = #{record.permissions,jdbcType=VARCHAR},
       parameter = #{record.parameter,jdbcType=LONGVARCHAR},
       result = #{record.result,jdbcType=LONGVARCHAR}
     <if test="_parameter != null">
@@ -320,7 +331,8 @@
       url = #{record.url,jdbcType=VARCHAR},
       method = #{record.method,jdbcType=VARCHAR},
       user_agent = #{record.userAgent,jdbcType=VARCHAR},
-      ip = #{record.ip,jdbcType=VARCHAR}
+      ip = #{record.ip,jdbcType=VARCHAR},
+      permissions = #{record.permissions,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -358,6 +370,9 @@
       <if test="ip != null">
         ip = #{ip,jdbcType=VARCHAR},
       </if>
+      <if test="permissions != null">
+        permissions = #{permissions,jdbcType=VARCHAR},
+      </if>
       <if test="parameter != null">
         parameter = #{parameter,jdbcType=LONGVARCHAR},
       </if>
@@ -379,6 +394,7 @@
       method = #{method,jdbcType=VARCHAR},
       user_agent = #{userAgent,jdbcType=VARCHAR},
       ip = #{ip,jdbcType=VARCHAR},
+      permissions = #{permissions,jdbcType=VARCHAR},
       parameter = #{parameter,jdbcType=LONGVARCHAR},
       result = #{result,jdbcType=LONGVARCHAR}
     where log_id = #{logId,jdbcType=INTEGER}
@@ -394,7 +410,8 @@
       url = #{url,jdbcType=VARCHAR},
       method = #{method,jdbcType=VARCHAR},
       user_agent = #{userAgent,jdbcType=VARCHAR},
-      ip = #{ip,jdbcType=VARCHAR}
+      ip = #{ip,jdbcType=VARCHAR},
+      permissions = #{permissions,jdbcType=VARCHAR}
     where log_id = #{logId,jdbcType=INTEGER}
   </update>
   <cache type="org.mybatis.caches.ehcache.LoggingEhcache" />

+ 18 - 0
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsLog.java

@@ -80,6 +80,13 @@ public class UpmsLog implements Serializable {
      */
     private String ip;
 
+    /**
+     * 权限值
+     *
+     * @mbg.generated
+     */
+    private String permissions;
+
     /**
      * 请求参数
      *
@@ -184,6 +191,14 @@ public class UpmsLog implements Serializable {
         this.ip = ip;
     }
 
+    public String getPermissions() {
+        return permissions;
+    }
+
+    public void setPermissions(String permissions) {
+        this.permissions = permissions;
+    }
+
     public String getParameter() {
         return parameter;
     }
@@ -217,6 +232,7 @@ public class UpmsLog implements Serializable {
         sb.append(", method=").append(method);
         sb.append(", userAgent=").append(userAgent);
         sb.append(", ip=").append(ip);
+        sb.append(", permissions=").append(permissions);
         sb.append(", parameter=").append(parameter);
         sb.append(", result=").append(result);
         sb.append("]");
@@ -246,6 +262,7 @@ public class UpmsLog implements Serializable {
             && (this.getMethod() == null ? other.getMethod() == null : this.getMethod().equals(other.getMethod()))
             && (this.getUserAgent() == null ? other.getUserAgent() == null : this.getUserAgent().equals(other.getUserAgent()))
             && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
+            && (this.getPermissions() == null ? other.getPermissions() == null : this.getPermissions().equals(other.getPermissions()))
             && (this.getParameter() == null ? other.getParameter() == null : this.getParameter().equals(other.getParameter()))
             && (this.getResult() == null ? other.getResult() == null : this.getResult().equals(other.getResult()));
     }
@@ -265,6 +282,7 @@ public class UpmsLog implements Serializable {
         result = prime * result + ((getMethod() == null) ? 0 : getMethod().hashCode());
         result = prime * result + ((getUserAgent() == null) ? 0 : getUserAgent().hashCode());
         result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
+        result = prime * result + ((getPermissions() == null) ? 0 : getPermissions().hashCode());
         result = prime * result + ((getParameter() == null) ? 0 : getParameter().hashCode());
         result = prime * result + ((getResult() == null) ? 0 : getResult().hashCode());
         return result;

+ 70 - 0
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsLogExample.java

@@ -866,6 +866,76 @@ public class UpmsLogExample implements Serializable {
             addCriterion("ip not between", value1, value2, "ip");
             return (Criteria) this;
         }
+
+        public Criteria andPermissionsIsNull() {
+            addCriterion("permissions is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsIsNotNull() {
+            addCriterion("permissions is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsEqualTo(String value) {
+            addCriterion("permissions =", value, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsNotEqualTo(String value) {
+            addCriterion("permissions <>", value, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsGreaterThan(String value) {
+            addCriterion("permissions >", value, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsGreaterThanOrEqualTo(String value) {
+            addCriterion("permissions >=", value, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsLessThan(String value) {
+            addCriterion("permissions <", value, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsLessThanOrEqualTo(String value) {
+            addCriterion("permissions <=", value, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsLike(String value) {
+            addCriterion("permissions like", value, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsNotLike(String value) {
+            addCriterion("permissions not like", value, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsIn(List<String> values) {
+            addCriterion("permissions in", values, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsNotIn(List<String> values) {
+            addCriterion("permissions not in", values, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsBetween(String value1, String value2) {
+            addCriterion("permissions between", value1, value2, "permissions");
+            return (Criteria) this;
+        }
+
+        public Criteria andPermissionsNotBetween(String value1, String value2) {
+            addCriterion("permissions not between", value1, value2, "permissions");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria implements Serializable {