Forráskód Böngészése

关系维护修改

rgb 6 éve
szülő
commit
86949a7dd6

+ 134 - 126
knowledgeman-service/src/main/java/com/diagbot/entity/LexiconRelationship.java

@@ -1,126 +1,134 @@
-package com.diagbot.entity;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableId;
-
-/**
- * <p>
- * 
- * </p>
- *
- * @author gaodm
- * @since 2019-03-26
- */
-public class LexiconRelationship implements Serializable {
-
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 主键
-     */
-    @TableId(value = "id", type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 是否删除,N:未删除,Y:删除
-     */
-    private String isDeleted;
-
-    /**
-     * 记录创建时间
-     */
-    private Date gmtCreated;
-
-    /**
-     * 记录修改时间,如果时间是1970年则表示纪录未修改
-     */
-    private Date gmtModified;
-
-    /**
-     * 创建人,0表示无创建人值
-     */
-    private String creator;
-
-    /**
-     * 修改人,如果为0则表示纪录未修改
-     */
-    private String modifier;
-
-    private String name;
-
-    private String code;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-    public String getIsDeleted() {
-        return isDeleted;
-    }
-
-    public void setIsDeleted(String isDeleted) {
-        this.isDeleted = isDeleted;
-    }
-    public Date getGmtCreated() {
-        return gmtCreated;
-    }
-
-    public void setGmtCreated(Date gmtCreated) {
-        this.gmtCreated = gmtCreated;
-    }
-    public Date getGmtModified() {
-        return gmtModified;
-    }
-
-    public void setGmtModified(Date gmtModified) {
-        this.gmtModified = gmtModified;
-    }
-    public String getCreator() {
-        return creator;
-    }
-
-    public void setCreator(String creator) {
-        this.creator = creator;
-    }
-    public String getModifier() {
-        return modifier;
-    }
-
-    public void setModifier(String modifier) {
-        this.modifier = modifier;
-    }
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    @Override
-    public String toString() {
-        return "LexiconRelationship{" +
-        "id=" + id +
-        ", isDeleted=" + isDeleted +
-        ", gmtCreated=" + gmtCreated +
-        ", gmtModified=" + gmtModified +
-        ", creator=" + creator +
-        ", modifier=" + modifier +
-        ", name=" + name +
-        ", code=" + code +
-        "}";
-    }
-}
+package com.diagbot.entity;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+/**
+ * <p>
+ * 术语关系分类表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2019-05-16
+ */
+@TableName("kl_lexicon_relationship")
+public class LexiconRelationship implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 关系名称
+     */
+    private String name;
+
+    /**
+     * 关系代码
+     */
+    private String code;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+
+    @Override
+    public String toString() {
+        return "LexiconRelationship{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", name=" + name +
+        ", code=" + code +
+        "}";
+    }
+}

+ 1 - 1
knowledgeman-service/src/main/java/com/diagbot/facade/RelationFacade.java

@@ -220,7 +220,7 @@ public class RelationFacade extends RelationServiceImpl {
 		libraryInfoQe2.eq("is_deleted", "N");
 		libraryInfoQe2.eq("is_concept", 1);
 		libraryInfoQe2.eq("name", addRelationInfoVO.getEndName());
-		libraryInfoQe2.eq("type", LexiconTypeEnum.getKey(addRelationInfoVO.getEndType()));
+		libraryInfoQe2.eq("type_id", LexiconTypeEnum.getKey(addRelationInfoVO.getEndType()));
 		LibraryInfo endLibraryInfo = libraryInfoFacade.getOne(libraryInfoQe2);
 		if(endLibraryInfo==null){
 			retMap.put("message", "数据库中无该终点术语");

+ 1 - 1
knowledgeman-service/src/main/resources/mapper/LexiconRelationshipMapper.xml

@@ -6,7 +6,7 @@
     <resultMap id="BaseResultMap" type="com.diagbot.entity.LexiconRelationship">
         <id column="id" property="id" />
         <result column="is_deleted" property="isDeleted" />
-        <result column="gmt_created" property="gmtCreated" />
+        <result column="gmt_create" property="gmtCreate" />
         <result column="gmt_modified" property="gmtModified" />
         <result column="creator" property="creator" />
         <result column="modifier" property="modifier" />