Przeglądaj źródła

医学部确认,代码还原

zhoutg 4 lat temu
rodzic
commit
a1d14043f5

+ 28 - 0
doc/001.00000000初始化脚本/cdss-core_init.sql

@@ -0,0 +1,28 @@
+DROP TABLE IF EXISTS `demo_testword_info`;
+CREATE TABLE `demo_testword_info` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `text` LONGTEXT COMMENT '文本',
+  `type` varchar(100) NOT NULL default '' COMMENT '文本类型',
+  `is_deal` smallint(4) NOT NULL default '0' COMMENT '是否处理,0:未使用,1:已处理',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='词提取用例';
+
+DROP TABLE IF EXISTS `demo_testword_res`;
+CREATE TABLE `demo_testword_res` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `word` varchar(200) NOT NULL default '' COMMENT '词名称',
+  `type` varchar(100) NOT NULL default '' COMMENT '词类型',
+  `convert_word` varchar(500) NOT NULL default '' COMMENT '词转换',
+  `is_deal` smallint(4) NOT NULL default '0' COMMENT '是否处理,0:未使用,1:已处理',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='词提取结果';

+ 71 - 0
src/main/java/com/diagbot/entity/TestwordInfo.java

@@ -0,0 +1,71 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 词提取用例
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+@TableName("demo_testword_info")
+@Data
+public class TestwordInfo 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 text;
+
+    /**
+     * 文本类型
+     */
+    private String type;
+
+    /**
+     * 是否处理,0:未使用,1:已处理
+     */
+    private Integer isDeal;
+
+}

+ 75 - 0
src/main/java/com/diagbot/entity/TestwordRes.java

@@ -0,0 +1,75 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 词提取结果
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+@TableName("demo_testword_res")
+@Data
+public class TestwordRes 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 word;
+
+    /**
+     * 词类型
+     */
+    private String type;
+
+    /**
+     * 词转换
+     */
+    private String convertWord;
+
+    /**
+     * 是否处理,0:未使用,1:已处理
+     */
+    private Integer isDeal;
+}

+ 191 - 0
src/main/java/com/diagbot/facade/TestwordInfoFacade.java

@@ -0,0 +1,191 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.CRFServiceClient;
+import com.diagbot.dto.StandConvertCrfBatchDTO;
+import com.diagbot.dto.StandConvertCrfDTO;
+import com.diagbot.dto.WordCrfDTO;
+import com.diagbot.entity.TestwordInfo;
+import com.diagbot.entity.TestwordRes;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.model.ai.AIAnalyze;
+import com.diagbot.service.TestwordInfoService;
+import com.diagbot.service.TestwordResService;
+import com.diagbot.service.impl.TestwordInfoServiceImpl;
+import com.diagbot.util.CoreUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.SearchData;
+import com.diagbot.vo.StandConvertCrfVO;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhoutg
+ * @time: 2020/7/29 15:03
+ */
+@Component
+public class TestwordInfoFacade extends TestwordInfoServiceImpl {
+
+    @Autowired
+    CRFServiceClient crfServiceClient;
+    @Autowired
+    TestwordResFacade testwordResFacade;
+    @Autowired
+    @Qualifier("testwordResServiceImpl")
+    TestwordResService testwordResService;
+    @Autowired
+    @Qualifier("testwordInfoServiceImpl")
+    TestwordInfoService testwordInfoService;
+    @Autowired
+    TestFacade testFacade;
+
+    public Map getWord() {
+        Map<String, String> res = new LinkedHashMap<>();
+        Long start = System.currentTimeMillis();
+
+        AIAnalyze aiAnalyze = new AIAnalyze(crfServiceClient);
+        List<String> symptomStand = new ArrayList<>();
+
+        //模型处理数据
+        WordCrfDTO wordCrfDTO = new WordCrfDTO();
+        List<TestwordInfo> testwordInfoList = this.page(new Page<>(1, 100), new QueryWrapper<TestwordInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("is_deal", 0)
+                .orderByAsc("id")).getRecords();
+
+        while (ListUtil.isNotEmpty(testwordInfoList)) {
+            Set<String> symptomList = new LinkedHashSet<>();
+            Set<String> diseaseList = new LinkedHashSet<>();
+            Set<String> drugList = new LinkedHashSet<>();
+            Set<String> operateList = new LinkedHashSet<>();
+            Set<String> lisList = new LinkedHashSet<>();
+            Set<String> pacsList = new LinkedHashSet<>();
+            for (TestwordInfo bean : testwordInfoList) {
+                String text = bean.getText();
+                String type = bean.getType();
+                if ("主诉".equals(type) || "现病史".equals(type)) {
+                    SearchData searchData = new SearchData();
+                    searchData.setChief(text);
+                    aiAnalyze.aiProcess(searchData, wordCrfDTO);
+                    CoreUtil.addSet(symptomList, CoreUtil.getName(wordCrfDTO.getChiefLabel().getClinicals()));
+                }
+            }
+
+            if (symptomList != null && symptomList.size() > 0) {
+                List<TestwordRes> testwordResList = testwordResFacade.list(new QueryWrapper<TestwordRes>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .in("word", symptomList)
+                        .eq("type", "症状")
+                );
+                // 剔除已存在
+                removeWord(symptomList, testwordResList);
+                // 剔除标准
+                symptomList.removeAll(symptomStand);
+                List<TestwordRes> insertSypmotom = stringConvertRes(symptomList, "症状");
+                // 保存
+                if (ListUtil.isNotEmpty(insertSypmotom)) {
+                    testwordResService.saveBatch(insertSypmotom);
+                }
+
+                for (TestwordInfo testwordInfo : testwordInfoList) {
+                    testwordInfo.setIsDeal(1);
+                }
+            }
+            testwordInfoService.saveOrUpdateBatch(testwordInfoList);
+
+            testwordInfoList = this.page(new Page<>(1, 100), new QueryWrapper<TestwordInfo>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("is_deal", 0)
+                    .orderByAsc("id")).getRecords();
+        }
+
+        long end = System.currentTimeMillis();
+        res.put("执行时间", (end - start) / 1000.0 + "秒");
+        return res;
+    }
+
+    public List<TestwordRes> stringConvertRes(Set<String> stringList, String type) {
+        List<TestwordRes> res = new ArrayList<>();
+        for (String s : stringList) {
+            TestwordRes testwordRes = new TestwordRes();
+            testwordRes.setWord(s);
+            testwordRes.setType(type);
+            res.add(testwordRes);
+        }
+        return res;
+    }
+
+    public void removeWord(Set<String> stringList, List<TestwordRes> testwordResList) {
+        if (ListUtil.isEmpty(testwordResList)) {
+            return ;
+        }
+        Set<String> setList = testwordResList.stream().map(r -> r.getWord()).collect(Collectors.toSet());
+        stringList.removeAll(setList);
+    }
+
+    public void wordConvert() {
+        List<TestwordRes> testwordInfoList = testwordResService.page(new Page<>(1, 20), new QueryWrapper<TestwordRes>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("is_deal", 0)
+                .orderByAsc("id")).getRecords();
+
+        while(ListUtil.isNotEmpty(testwordInfoList)) {
+            List<StandConvertCrfVO> convertCrfVOList = new ArrayList<>();
+            for (TestwordRes testwordRes : testwordInfoList) {
+                StandConvertCrfVO standConvertCrfVO = new StandConvertCrfVO();
+                standConvertCrfVO.setWord(testwordRes.getWord());
+                switch (testwordRes.getType()) {
+                    case "症状":
+                        standConvertCrfVO.setWord_type("symptom");
+                        standConvertCrfVO.setNumber(3);
+                        convertCrfVOList.add(standConvertCrfVO);
+                        break;
+                    default:
+                        break;
+                }
+            }
+            StandConvertCrfBatchDTO standConvertCrfBatchDTO = testFacade.testStandConvertBatch(convertCrfVOList);
+            for (TestwordRes testwordRes : testwordInfoList) {
+                Set<String> symptomType = new LinkedHashSet<>();
+                switch (testwordRes.getType()) {
+                    case "症状":
+                        Map<String, StandConvertCrfDTO> convertCrfDTOMap = standConvertCrfBatchDTO.getData().get("symptom");
+                        if (convertCrfDTOMap != null && convertCrfDTOMap.get(testwordRes.getWord()) != null) {
+                            List<Map<String,String>> listMap = convertCrfDTOMap.get(testwordRes.getWord()).getStandard_words();
+                            int size = 0;
+                            for (Map<String,String> map : listMap) {
+                                if (size < 3 && StringUtil.isNotBlank(map.get("standard_word"))) {
+                                    symptomType.add(map.get("standard_word"));
+                                }
+                                size++;
+                            }
+                            testwordRes.setConvertWord(StringUtils.join(symptomType, ";"));
+                        }
+                        break;
+                    default:
+                        break;
+                }
+                testwordRes.setIsDeal(1);
+            }
+            testwordResService.saveOrUpdateBatch(testwordInfoList);
+
+            testwordInfoList = testwordResService.page(new Page<>(1, 20), new QueryWrapper<TestwordRes>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("is_deal", 0)
+                    .orderByAsc("id")).getRecords();
+        }
+    }
+}

+ 15 - 0
src/main/java/com/diagbot/facade/TestwordResFacade.java

@@ -0,0 +1,15 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.TestwordResServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhoutg
+ * @time: 2020/7/29 15:03
+ */
+@Component
+public class TestwordResFacade extends TestwordResServiceImpl {
+
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/TestwordInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.TestwordInfo;
+
+/**
+ * <p>
+ * 词提取用例 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+public interface TestwordInfoMapper extends BaseMapper<TestwordInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/TestwordResMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.TestwordRes;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 词提取结果 Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+public interface TestwordResMapper extends BaseMapper<TestwordRes> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/TestwordInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.TestwordInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 词提取用例 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+public interface TestwordInfoService extends IService<TestwordInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/TestwordResService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.TestwordRes;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 词提取结果 服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+public interface TestwordResService extends IService<TestwordRes> {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/TestwordInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.TestwordInfo;
+import com.diagbot.mapper.TestwordInfoMapper;
+import com.diagbot.service.TestwordInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 词提取用例 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+@Service
+public class TestwordInfoServiceImpl extends ServiceImpl<TestwordInfoMapper, TestwordInfo> implements TestwordInfoService {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/TestwordResServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.TestwordRes;
+import com.diagbot.mapper.TestwordResMapper;
+import com.diagbot.service.TestwordResService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 词提取结果 服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+@Service
+public class TestwordResServiceImpl extends ServiceImpl<TestwordResMapper, TestwordRes> implements TestwordResService {
+
+}

+ 35 - 0
src/main/java/com/diagbot/util/CoreUtil.java

@@ -19,6 +19,7 @@ import java.util.ArrayList;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.stream.Collectors;
 
 /**
@@ -852,6 +853,22 @@ public class CoreUtil {
         }
     }
 
+    /**
+     * 添加列表
+     *
+     * @param source
+     * @param addList
+     * @param <T>
+     */
+    public static <T> void addSet(Set<T> source, List<? extends T> addList) {
+        if (source == null) {
+            return ;
+        }
+        if (ListUtil.isNotEmpty(addList)) {
+            source.addAll(addList);
+        }
+    }
+
     /**
      * 筛选对象列表中“uniqueName”字段为空的数据,返回targetProperty字段列表
      *
@@ -869,6 +886,24 @@ public class CoreUtil {
                 .collect(Collectors.toList());
     }
 
+    /**
+     * 筛选对象列表中“uniqueName”字段为空的数据,返回targetProperty字段列表
+     *
+     * @param list
+     * @param <T>
+     * @return
+     */
+    public static <T> List<String> getName(List<T> list) {
+        if (ListUtil.isEmpty(list)) {
+            return new ArrayList<>();
+        }
+        return list.stream()
+                .filter(r -> StringUtil.isNotBlank((String)getFieldValue(r, "name")))
+                .map(r -> (String)getFieldValue(r, "name"))
+                .collect(Collectors.toList());
+    }
+
+
     /**
      * 筛选对象列表中“uniqueName”字段为空的数据,返回“name”字段列表
      *

+ 28 - 0
src/main/java/com/diagbot/vo/TestwordInfoPageVO.java

@@ -0,0 +1,28 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Data;
+
+@Data
+public class TestwordInfoPageVO extends Page {
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 文本类型
+     */
+    private String type;
+
+    /**
+     * 是否处理,0:未使用,1:已处理
+     */
+    private Integer isDeal;
+
+}

+ 45 - 0
src/main/java/com/diagbot/web/TestwordInfoController.java

@@ -0,0 +1,45 @@
+package com.diagbot.web;
+
+
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.TestwordInfoFacade;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * <p>
+ * 词提取用例 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+@RestController
+@RequestMapping("/testwordInfo")
+@Api(value = "提词API", tags = { "提词API" })
+public class TestwordInfoController {
+
+    @Autowired
+    TestwordInfoFacade testwordInfoFacade;
+
+    @ApiOperation(value = "提词API[zhoutg]",
+            notes = "提词API")
+    @PostMapping("/getword")
+    public RespDTO<Map<String, String>> getword() {
+        return RespDTO.onSuc(testwordInfoFacade.getWord());
+    }
+
+    @ApiOperation(value = "提词转换API[zhoutg]",
+            notes = "提词转换API")
+    @PostMapping("/wordConvert")
+    public RespDTO<String> wordConvert() {
+        testwordInfoFacade.wordConvert();
+        return RespDTO.onSuc("执行完毕");
+    }
+}

+ 20 - 0
src/main/java/com/diagbot/web/TestwordResController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 词提取结果 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-10-29
+ */
+@Controller
+@RequestMapping("/testwordRes")
+public class TestwordResController {
+
+}

+ 18 - 0
src/main/resources/mapper/TestwordInfoMapper.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.TestwordInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.TestwordInfo">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="text" property="text" />
+        <result column="type" property="type" />
+        <result column="is_deal" property="isDeal" />
+    </resultMap>
+
+</mapper>

+ 19 - 0
src/main/resources/mapper/TestwordResMapper.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.TestwordResMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.TestwordRes">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="word" property="word" />
+        <result column="type" property="type" />
+        <result column="convert_word" property="convertWord" />
+        <result column="is_deal" property="isDeal" />
+    </resultMap>
+
+</mapper>

+ 2 - 2
src/test/java/com/diagbot/CodeGeneration.java

@@ -54,9 +54,9 @@ public class CodeGeneration {
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
-//        strategy.setTablePrefix(new String[] { "med_" });// 此处可以修改为您的表前缀
+        strategy.setTablePrefix(new String[] { "demo_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "sys_user"}); // 需要生成的表
+        strategy.setInclude(new String[] { "demo_testword_info", "demo_testword_res"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);