song 5 months ago
parent
commit
043b15bb58

+ 3 - 2
src/main/java/com/dashitech/migration/task/solution/SolutionTask.java

@@ -34,8 +34,9 @@ public class SolutionTask extends BaseTask {
34 34
     public void start() {
35 35
         log.info("知识库数据SolutionTask转换开始");
36 36
 
37
-        StringBuffer sql = new StringBuffer("SELECT id,version,case when categoryId is null then 20342 else 20340 end as type,title,keywords,content,status,");
38
-        sql.append("create_user_id,createtime as create_time,renew_user_id,renewtime as renew_time,solutionnumber as solution_number,");
37
+
38
+        StringBuffer sql = new StringBuffer("SELECT id,version,case when categoryId is null then "+getDicId(jdbcTemplateHsms,"solution_type","3")+" else "+getDicId(jdbcTemplateHsms,"solution_type","1")+" end as type,");
39
+        sql.append("title,keywords,content,status,create_user_id,createtime as create_time,renew_user_id,renewtime as renew_time,solutionnumber as solution_number,");
39 40
         sql.append("version_number,star,categoryId as category_id,introduce_count,file_abstract,duty_dept as hos_id,IF( `status` = 74, 1, 0 ) AS delete_flag FROM itsm_solution");
40 41
         List<Map<String, Object>> solutionList = jdbcTemplateMdv2.queryForList(sql.toString());
41 42
         FieldMapper mapper = new FieldMapper();