Преглед изворни кода

feat(adm-diagram): 增加state字段、转换

liyang пре 3 година
родитељ
комит
ca7c5990a1

+ 4 - 0
adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/entity/DiagramEntity.java

@@ -51,6 +51,10 @@ public class DiagramEntity extends AuditableEntity<DiagramEntity> {
     private String systemId;
 
     /**
+     * 系统图状态
+     */
+    private String state;
+    /**
      * 集团编码
      */
     private String groupCode;

+ 2 - 0
adm-business/adm-diagram/src/main/java/com/persagy/adm/diagram/entity/ModelAdapter.java

@@ -70,6 +70,7 @@ public class ModelAdapter {
 		diagram.setProjectId(diagramEntity.getProjectId());
 		diagram.setSystemId(diagramEntity.getSystemId());
 		diagram.setGroupCode(diagramEntity.getGroupCode());
+		diagram.setState(diagramEntity.getState());
 		return diagram;
 	}
 
@@ -84,6 +85,7 @@ public class ModelAdapter {
 		entity.setProjectId(diagram.getProjectId());
 		entity.setSystemId(diagram.getSystemId());
 		entity.setGroupCode(diagram.getGroupCode());
+		entity.setState(diagram.getState());
 		entity.setDiagramContent(parser.toJson(diagram));
 		return entity;
 	}

+ 5 - 1
adm-business/adm-diagram/src/main/resources/mapper/Diagram.xml

@@ -12,6 +12,7 @@
         <result column="project_id" property="projectId" jdbcType="VARCHAR"/>
         <result column="system_id" property="systemId" jdbcType="VARCHAR"/>
         <result column="group_code" property="groupCode" jdbcType="VARCHAR"/>
+        <result column="state" property="state" jdbcType="TINYINT"/>
         <result column="diagram_content" property="diagramContent" jdbcType="VARCHAR"/>
         <result column="creator" property="creator" jdbcType="VARCHAR"/>
         <result column="creation_time" property="creationTime" jdbcType="CHAR"/>
@@ -23,7 +24,7 @@
 
     <sql id="baseSql">
         id,name,remark,type,bt_system,template_id,project_id,system_id,group_code,diagram_content,
-        creator,creation_time,modifier,modified_time,valid,ts
+        creator,creation_time,modifier,modified_time,valid,ts,state
     </sql>
 
     <insert id="saveDiagram">
@@ -66,6 +67,9 @@
         <if test="null != groupCode and groupCode.length > 0">
             AND group_code=#{groupCode}
         </if>
+        <if test="null != name and name.length > 0">
+            AND name LIKE CONCAT('%',#{name},'%')
+        </if>
     </select>
 
 </mapper>