Browse Source

更新数据模型

shuzheng 9 years ago
parent
commit
4acbfd209a

+ 67 - 0
project-datamodel/update_20130318_1_to_20170328_1.sql

@@ -0,0 +1,67 @@
+/*==============================================================*/
+/* DBMS name:      MySQL 5.0                                    */
+/* Created on:     2017/3/28 21:32:32                           */
+/*==============================================================*/
+
+
+drop table if exists tmp_upms_organization;
+
+rename table upms_organization to tmp_upms_organization;
+
+drop table if exists tmp_upms_user_permission;
+
+rename table upms_user_permission to tmp_upms_user_permission;
+
+alter table upms_log
+   modify column parameter mediumtext;
+
+alter table upms_log
+   modify column result mediumtext;
+
+/*==============================================================*/
+/* Table: upms_organization                                     */
+/*==============================================================*/
+create table upms_organization
+(
+   organization_id      int(10) unsigned not null auto_increment comment '编号',
+   pid                  int(10) comment '所属上级',
+   name                 varchar(20) comment '组织名称',
+   description          varchar(1000) comment '组织描述',
+   ctime                bigint(20) comment '创建时间',
+   primary key (organization_id)
+);
+
+alter table upms_organization comment '组织';
+
+insert into upms_organization (organization_id, name, description, ctime)
+select organization_id, name, description, ctime
+from tmp_upms_organization;
+
+/*==============================================================*/
+/* Table: upms_user_permission                                  */
+/*==============================================================*/
+create table upms_user_permission
+(
+   user_permission_id   int(10) unsigned not null auto_increment comment '编号',
+   user_id              int(10) unsigned not null comment '用户编号',
+   permission_id        int(10) unsigned not null comment '权限编号',
+   type                 tinyint(4) not null comment '权限类型(-1:减权限,1:增权限)',
+   primary key (user_permission_id)
+);
+
+alter table upms_user_permission comment '用户权限关联表';
+
+#WARNING: The following insert order will fail because it cannot give value to mandatory columns
+insert into upms_user_permission (user_permission_id, user_id, permission_id, type)
+select user_permission_id, user_id, permission_id, ?
+from tmp_upms_user_permission;
+
+alter table upms_user_organization add constraint FK_Reference_19 foreign key (organization_id)
+      references upms_organization (organization_id) on delete restrict on update restrict;
+
+alter table upms_user_permission add constraint FK_Reference_24 foreign key (user_id)
+      references upms_user (user_id) on delete restrict on update restrict;
+
+alter table upms_user_permission add constraint FK_Reference_25 foreign key (permission_id)
+      references upms_permission (permission_id) on delete restrict on update restrict;
+

BIN
project-datamodel/zheng.png


+ 7 - 7
project-datamodel/zheng_20170318_1.pdb

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1489833834" Name="zheng" Objects="451" Symbols="71" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
+<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1490707319" Name="zheng" Objects="451" Symbols="71" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
 <!-- do not edit this file -->
 <!-- do not edit this file -->
 
 
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
 <Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@@ -9163,10 +9163,10 @@ LABL 0 新宋体,8,N</a:FontList>
 <a:Code>parameter</a:Code>
 <a:Code>parameter</a:Code>
 <a:CreationDate>1489482411</a:CreationDate>
 <a:CreationDate>1489482411</a:CreationDate>
 <a:Creator>admin</a:Creator>
 <a:Creator>admin</a:Creator>
-<a:ModificationDate>1489483455</a:ModificationDate>
-<a:Modifier>admin</a:Modifier>
+<a:ModificationDate>1490707319</a:ModificationDate>
+<a:Modifier>shuzheng</a:Modifier>
 <a:Comment>请求参数</a:Comment>
 <a:Comment>请求参数</a:Comment>
-<a:DataType>text</a:DataType>
+<a:DataType>mediumtext</a:DataType>
 </o:Column>
 </o:Column>
 <o:Column Id="o360">
 <o:Column Id="o360">
 <a:ObjectID>A7122514-B9F7-4772-9E88-13FBBAD2B7E2</a:ObjectID>
 <a:ObjectID>A7122514-B9F7-4772-9E88-13FBBAD2B7E2</a:ObjectID>
@@ -9198,10 +9198,10 @@ LABL 0 新宋体,8,N</a:FontList>
 <a:Code>result</a:Code>
 <a:Code>result</a:Code>
 <a:CreationDate>1489482411</a:CreationDate>
 <a:CreationDate>1489482411</a:CreationDate>
 <a:Creator>admin</a:Creator>
 <a:Creator>admin</a:Creator>
-<a:ModificationDate>1489483455</a:ModificationDate>
-<a:Modifier>admin</a:Modifier>
+<a:ModificationDate>1490707319</a:ModificationDate>
+<a:Modifier>shuzheng</a:Modifier>
 <a:Comment>响应结果</a:Comment>
 <a:Comment>响应结果</a:Comment>
-<a:DataType>text</a:DataType>
+<a:DataType>mediumtext</a:DataType>
 </o:Column>
 </o:Column>
 <o:Column Id="o363">
 <o:Column Id="o363">
 <a:ObjectID>792CB8BD-D4C8-495F-B2BD-7F825C2618D0</a:ObjectID>
 <a:ObjectID>792CB8BD-D4C8-495F-B2BD-7F825C2618D0</a:ObjectID>

File diff suppressed because it is too large
+ 142 - 117
project-datamodel/zheng_20170318_1.pdm


File diff suppressed because it is too large
+ 3781 - 0
project-datamodel/zheng_20170328_1.apm


File diff suppressed because it is too large
+ 3781 - 0
project-datamodel/zheng_20170328_1.pdm


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

@@ -87,18 +87,8 @@ public class UpmsLog implements Serializable {
      */
      */
     private String permissions;
     private String permissions;
 
 
-    /**
-     * 请求参数
-     *
-     * @mbg.generated
-     */
     private String parameter;
     private String parameter;
 
 
-    /**
-     * 响应结果
-     *
-     * @mbg.generated
-     */
     private String result;
     private String result;
 
 
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;

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

@@ -10,6 +10,13 @@ public class UpmsOrganization implements Serializable {
      */
      */
     private Integer organizationId;
     private Integer organizationId;
 
 
+    /**
+     * 所属上级
+     *
+     * @mbg.generated
+     */
+    private Integer pid;
+
     /**
     /**
      * 组织名称
      * 组织名称
      *
      *
@@ -41,6 +48,14 @@ public class UpmsOrganization implements Serializable {
         this.organizationId = organizationId;
         this.organizationId = organizationId;
     }
     }
 
 
+    public Integer getPid() {
+        return pid;
+    }
+
+    public void setPid(Integer pid) {
+        this.pid = pid;
+    }
+
     public String getName() {
     public String getName() {
         return name;
         return name;
     }
     }
@@ -72,6 +87,7 @@ public class UpmsOrganization implements Serializable {
         sb.append(" [");
         sb.append(" [");
         sb.append("Hash = ").append(hashCode());
         sb.append("Hash = ").append(hashCode());
         sb.append(", organizationId=").append(organizationId);
         sb.append(", organizationId=").append(organizationId);
+        sb.append(", pid=").append(pid);
         sb.append(", name=").append(name);
         sb.append(", name=").append(name);
         sb.append(", description=").append(description);
         sb.append(", description=").append(description);
         sb.append(", ctime=").append(ctime);
         sb.append(", ctime=").append(ctime);
@@ -92,6 +108,7 @@ public class UpmsOrganization implements Serializable {
         }
         }
         UpmsOrganization other = (UpmsOrganization) that;
         UpmsOrganization other = (UpmsOrganization) that;
         return (this.getOrganizationId() == null ? other.getOrganizationId() == null : this.getOrganizationId().equals(other.getOrganizationId()))
         return (this.getOrganizationId() == null ? other.getOrganizationId() == null : this.getOrganizationId().equals(other.getOrganizationId()))
+            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
             && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
             && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
             && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
             && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
             && (this.getCtime() == null ? other.getCtime() == null : this.getCtime().equals(other.getCtime()));
             && (this.getCtime() == null ? other.getCtime() == null : this.getCtime().equals(other.getCtime()));
@@ -102,6 +119,7 @@ public class UpmsOrganization implements Serializable {
         final int prime = 31;
         final int prime = 31;
         int result = 1;
         int result = 1;
         result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode());
         result = prime * result + ((getOrganizationId() == null) ? 0 : getOrganizationId().hashCode());
+        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
         result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
         result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
         result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
         result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
         result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());
         result = prime * result + ((getCtime() == null) ? 0 : getCtime().hashCode());

+ 60 - 0
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsOrganizationExample.java

@@ -187,6 +187,66 @@ public class UpmsOrganizationExample implements Serializable {
             return (Criteria) this;
             return (Criteria) this;
         }
         }
 
 
+        public Criteria andPidIsNull() {
+            addCriterion("pid is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidIsNotNull() {
+            addCriterion("pid is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidEqualTo(Integer value) {
+            addCriterion("pid =", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidNotEqualTo(Integer value) {
+            addCriterion("pid <>", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidGreaterThan(Integer value) {
+            addCriterion("pid >", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidGreaterThanOrEqualTo(Integer value) {
+            addCriterion("pid >=", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidLessThan(Integer value) {
+            addCriterion("pid <", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidLessThanOrEqualTo(Integer value) {
+            addCriterion("pid <=", value, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidIn(List<Integer> values) {
+            addCriterion("pid in", values, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidNotIn(List<Integer> values) {
+            addCriterion("pid not in", values, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidBetween(Integer value1, Integer value2) {
+            addCriterion("pid between", value1, value2, "pid");
+            return (Criteria) this;
+        }
+
+        public Criteria andPidNotBetween(Integer value1, Integer value2) {
+            addCriterion("pid not between", value1, value2, "pid");
+            return (Criteria) this;
+        }
+
         public Criteria andNameIsNull() {
         public Criteria andNameIsNull() {
             addCriterion("name is null");
             addCriterion("name is null");
             return (Criteria) this;
             return (Criteria) this;

+ 19 - 1
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsUserPermission.java

@@ -24,6 +24,13 @@ public class UpmsUserPermission implements Serializable {
      */
      */
     private Integer permissionId;
     private Integer permissionId;
 
 
+    /**
+     * 权限类型(-1:减权限,1:增权限)
+     *
+     * @mbg.generated
+     */
+    private Byte type;
+
     private static final long serialVersionUID = 1L;
     private static final long serialVersionUID = 1L;
 
 
     public Integer getUserPermissionId() {
     public Integer getUserPermissionId() {
@@ -50,6 +57,14 @@ public class UpmsUserPermission implements Serializable {
         this.permissionId = permissionId;
         this.permissionId = permissionId;
     }
     }
 
 
+    public Byte getType() {
+        return type;
+    }
+
+    public void setType(Byte type) {
+        this.type = type;
+    }
+
     @Override
     @Override
     public String toString() {
     public String toString() {
         StringBuilder sb = new StringBuilder();
         StringBuilder sb = new StringBuilder();
@@ -59,6 +74,7 @@ public class UpmsUserPermission implements Serializable {
         sb.append(", userPermissionId=").append(userPermissionId);
         sb.append(", userPermissionId=").append(userPermissionId);
         sb.append(", userId=").append(userId);
         sb.append(", userId=").append(userId);
         sb.append(", permissionId=").append(permissionId);
         sb.append(", permissionId=").append(permissionId);
+        sb.append(", type=").append(type);
         sb.append("]");
         sb.append("]");
         return sb.toString();
         return sb.toString();
     }
     }
@@ -77,7 +93,8 @@ public class UpmsUserPermission implements Serializable {
         UpmsUserPermission other = (UpmsUserPermission) that;
         UpmsUserPermission other = (UpmsUserPermission) that;
         return (this.getUserPermissionId() == null ? other.getUserPermissionId() == null : this.getUserPermissionId().equals(other.getUserPermissionId()))
         return (this.getUserPermissionId() == null ? other.getUserPermissionId() == null : this.getUserPermissionId().equals(other.getUserPermissionId()))
             && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
             && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
-            && (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId()));
+            && (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId()))
+            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()));
     }
     }
 
 
     @Override
     @Override
@@ -87,6 +104,7 @@ public class UpmsUserPermission implements Serializable {
         result = prime * result + ((getUserPermissionId() == null) ? 0 : getUserPermissionId().hashCode());
         result = prime * result + ((getUserPermissionId() == null) ? 0 : getUserPermissionId().hashCode());
         result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
         result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
         result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode());
         result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode());
+        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
         return result;
         return result;
     }
     }
 }
 }

+ 60 - 0
zheng-upms/zheng-upms-dao/src/main/java/com/zheng/upms/dao/model/UpmsUserPermissionExample.java

@@ -306,6 +306,66 @@ public class UpmsUserPermissionExample implements Serializable {
             addCriterion("permission_id not between", value1, value2, "permissionId");
             addCriterion("permission_id not between", value1, value2, "permissionId");
             return (Criteria) this;
             return (Criteria) this;
         }
         }
+
+        public Criteria andTypeIsNull() {
+            addCriterion("type is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIsNotNull() {
+            addCriterion("type is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeEqualTo(Byte value) {
+            addCriterion("type =", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotEqualTo(Byte value) {
+            addCriterion("type <>", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThan(Byte value) {
+            addCriterion("type >", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeGreaterThanOrEqualTo(Byte value) {
+            addCriterion("type >=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThan(Byte value) {
+            addCriterion("type <", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeLessThanOrEqualTo(Byte value) {
+            addCriterion("type <=", value, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeIn(List<Byte> values) {
+            addCriterion("type in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotIn(List<Byte> values) {
+            addCriterion("type not in", values, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeBetween(Byte value1, Byte value2) {
+            addCriterion("type between", value1, value2, "type");
+            return (Criteria) this;
+        }
+
+        public Criteria andTypeNotBetween(Byte value1, Byte value2) {
+            addCriterion("type not between", value1, value2, "type");
+            return (Criteria) this;
+        }
     }
     }
 
 
     public static class Criteria extends GeneratedCriteria implements Serializable {
     public static class Criteria extends GeneratedCriteria implements Serializable {

+ 21 - 6
zheng-upms/zheng-upms-rpc-service/src/main/java/com/zheng/upms/dao/mapper/UpmsOrganizationMapper.xml

@@ -3,6 +3,7 @@
 <mapper namespace="com.zheng.upms.dao.mapper.UpmsOrganizationMapper">
 <mapper namespace="com.zheng.upms.dao.mapper.UpmsOrganizationMapper">
   <resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsOrganization">
   <resultMap id="BaseResultMap" type="com.zheng.upms.dao.model.UpmsOrganization">
     <id column="organization_id" jdbcType="INTEGER" property="organizationId" />
     <id column="organization_id" jdbcType="INTEGER" property="organizationId" />
+    <result column="pid" jdbcType="INTEGER" property="pid" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="name" jdbcType="VARCHAR" property="name" />
     <result column="description" jdbcType="VARCHAR" property="description" />
     <result column="description" jdbcType="VARCHAR" property="description" />
     <result column="ctime" jdbcType="BIGINT" property="ctime" />
     <result column="ctime" jdbcType="BIGINT" property="ctime" />
@@ -66,7 +67,7 @@
     </where>
     </where>
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
-    organization_id, name, description, ctime
+    organization_id, pid, name, description, ctime
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsOrganizationExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsOrganizationExample" resultMap="BaseResultMap">
     select
     select
@@ -107,10 +108,10 @@
     </if>
     </if>
   </delete>
   </delete>
   <insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
   <insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
-    insert into upms_organization (organization_id, name, description, 
-      ctime)
-    values (#{organizationId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, 
-      #{ctime,jdbcType=BIGINT})
+    insert into upms_organization (organization_id, pid, name, 
+      description, ctime)
+    values (#{organizationId,jdbcType=INTEGER}, #{pid,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, 
+      #{description,jdbcType=VARCHAR}, #{ctime,jdbcType=BIGINT})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
   <insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
     insert into upms_organization
     insert into upms_organization
@@ -118,6 +119,9 @@
       <if test="organizationId != null">
       <if test="organizationId != null">
         organization_id,
         organization_id,
       </if>
       </if>
+      <if test="pid != null">
+        pid,
+      </if>
       <if test="name != null">
       <if test="name != null">
         name,
         name,
       </if>
       </if>
@@ -132,6 +136,9 @@
       <if test="organizationId != null">
       <if test="organizationId != null">
         #{organizationId,jdbcType=INTEGER},
         #{organizationId,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="pid != null">
+        #{pid,jdbcType=INTEGER},
+      </if>
       <if test="name != null">
       <if test="name != null">
         #{name,jdbcType=VARCHAR},
         #{name,jdbcType=VARCHAR},
       </if>
       </if>
@@ -155,6 +162,9 @@
       <if test="record.organizationId != null">
       <if test="record.organizationId != null">
         organization_id = #{record.organizationId,jdbcType=INTEGER},
         organization_id = #{record.organizationId,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="record.pid != null">
+        pid = #{record.pid,jdbcType=INTEGER},
+      </if>
       <if test="record.name != null">
       <if test="record.name != null">
         name = #{record.name,jdbcType=VARCHAR},
         name = #{record.name,jdbcType=VARCHAR},
       </if>
       </if>
@@ -172,6 +182,7 @@
   <update id="updateByExample" parameterType="map">
   <update id="updateByExample" parameterType="map">
     update upms_organization
     update upms_organization
     set organization_id = #{record.organizationId,jdbcType=INTEGER},
     set organization_id = #{record.organizationId,jdbcType=INTEGER},
+      pid = #{record.pid,jdbcType=INTEGER},
       name = #{record.name,jdbcType=VARCHAR},
       name = #{record.name,jdbcType=VARCHAR},
       description = #{record.description,jdbcType=VARCHAR},
       description = #{record.description,jdbcType=VARCHAR},
       ctime = #{record.ctime,jdbcType=BIGINT}
       ctime = #{record.ctime,jdbcType=BIGINT}
@@ -182,6 +193,9 @@
   <update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
   <update id="updateByPrimaryKeySelective" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
     update upms_organization
     update upms_organization
     <set>
     <set>
+      <if test="pid != null">
+        pid = #{pid,jdbcType=INTEGER},
+      </if>
       <if test="name != null">
       <if test="name != null">
         name = #{name,jdbcType=VARCHAR},
         name = #{name,jdbcType=VARCHAR},
       </if>
       </if>
@@ -196,7 +210,8 @@
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
   <update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsOrganization">
     update upms_organization
     update upms_organization
-    set name = #{name,jdbcType=VARCHAR},
+    set pid = #{pid,jdbcType=INTEGER},
+      name = #{name,jdbcType=VARCHAR},
       description = #{description,jdbcType=VARCHAR},
       description = #{description,jdbcType=VARCHAR},
       ctime = #{ctime,jdbcType=BIGINT}
       ctime = #{ctime,jdbcType=BIGINT}
     where organization_id = #{organizationId,jdbcType=INTEGER}
     where organization_id = #{organizationId,jdbcType=INTEGER}

+ 22 - 7
zheng-upms/zheng-upms-rpc-service/src/main/java/com/zheng/upms/dao/mapper/UpmsUserPermissionMapper.xml

@@ -5,6 +5,7 @@
     <id column="user_permission_id" jdbcType="INTEGER" property="userPermissionId" />
     <id column="user_permission_id" jdbcType="INTEGER" property="userPermissionId" />
     <result column="user_id" jdbcType="INTEGER" property="userId" />
     <result column="user_id" jdbcType="INTEGER" property="userId" />
     <result column="permission_id" jdbcType="INTEGER" property="permissionId" />
     <result column="permission_id" jdbcType="INTEGER" property="permissionId" />
+    <result column="type" jdbcType="TINYINT" property="type" />
   </resultMap>
   </resultMap>
   <sql id="Example_Where_Clause">
   <sql id="Example_Where_Clause">
     <where>
     <where>
@@ -65,7 +66,7 @@
     </where>
     </where>
   </sql>
   </sql>
   <sql id="Base_Column_List">
   <sql id="Base_Column_List">
-    user_permission_id, user_id, permission_id
+    user_permission_id, user_id, permission_id, type
   </sql>
   </sql>
   <select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" resultMap="BaseResultMap">
   <select id="selectByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" resultMap="BaseResultMap">
     select
     select
@@ -106,10 +107,10 @@
     </if>
     </if>
   </delete>
   </delete>
   <insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
   <insert id="insert" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
-    insert into upms_user_permission (user_permission_id, user_id, permission_id
-      )
-    values (#{userPermissionId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER}
-      )
+    insert into upms_user_permission (user_permission_id, user_id, permission_id, 
+      type)
+    values (#{userPermissionId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{permissionId,jdbcType=INTEGER}, 
+      #{type,jdbcType=TINYINT})
   </insert>
   </insert>
   <insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
   <insert id="insertSelective" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
     insert into upms_user_permission
     insert into upms_user_permission
@@ -123,6 +124,9 @@
       <if test="permissionId != null">
       <if test="permissionId != null">
         permission_id,
         permission_id,
       </if>
       </if>
+      <if test="type != null">
+        type,
+      </if>
     </trim>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="userPermissionId != null">
       <if test="userPermissionId != null">
@@ -134,6 +138,9 @@
       <if test="permissionId != null">
       <if test="permissionId != null">
         #{permissionId,jdbcType=INTEGER},
         #{permissionId,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="type != null">
+        #{type,jdbcType=TINYINT},
+      </if>
     </trim>
     </trim>
   </insert>
   </insert>
   <select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" resultType="java.lang.Long">
   <select id="countByExample" parameterType="com.zheng.upms.dao.model.UpmsUserPermissionExample" resultType="java.lang.Long">
@@ -154,6 +161,9 @@
       <if test="record.permissionId != null">
       <if test="record.permissionId != null">
         permission_id = #{record.permissionId,jdbcType=INTEGER},
         permission_id = #{record.permissionId,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="record.type != null">
+        type = #{record.type,jdbcType=TINYINT},
+      </if>
     </set>
     </set>
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
@@ -163,7 +173,8 @@
     update upms_user_permission
     update upms_user_permission
     set user_permission_id = #{record.userPermissionId,jdbcType=INTEGER},
     set user_permission_id = #{record.userPermissionId,jdbcType=INTEGER},
       user_id = #{record.userId,jdbcType=INTEGER},
       user_id = #{record.userId,jdbcType=INTEGER},
-      permission_id = #{record.permissionId,jdbcType=INTEGER}
+      permission_id = #{record.permissionId,jdbcType=INTEGER},
+      type = #{record.type,jdbcType=TINYINT}
     <if test="_parameter != null">
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
       <include refid="Update_By_Example_Where_Clause" />
     </if>
     </if>
@@ -177,13 +188,17 @@
       <if test="permissionId != null">
       <if test="permissionId != null">
         permission_id = #{permissionId,jdbcType=INTEGER},
         permission_id = #{permissionId,jdbcType=INTEGER},
       </if>
       </if>
+      <if test="type != null">
+        type = #{type,jdbcType=TINYINT},
+      </if>
     </set>
     </set>
     where user_permission_id = #{userPermissionId,jdbcType=INTEGER}
     where user_permission_id = #{userPermissionId,jdbcType=INTEGER}
   </update>
   </update>
   <update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
   <update id="updateByPrimaryKey" parameterType="com.zheng.upms.dao.model.UpmsUserPermission">
     update upms_user_permission
     update upms_user_permission
     set user_id = #{userId,jdbcType=INTEGER},
     set user_id = #{userId,jdbcType=INTEGER},
-      permission_id = #{permissionId,jdbcType=INTEGER}
+      permission_id = #{permissionId,jdbcType=INTEGER},
+      type = #{type,jdbcType=TINYINT}
     where user_permission_id = #{userPermissionId,jdbcType=INTEGER}
     where user_permission_id = #{userPermissionId,jdbcType=INTEGER}
   </update>
   </update>
   <cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
   <cache type="org.mybatis.caches.ehcache.LoggingEhcache" />

Some files were not shown because too many files changed in this diff