Skip to content

Commit

Permalink
update: 增加 where 参数接收;
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhongfa committed Aug 3, 2019
1 parent 04c5828 commit 1809910
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ public class DataxJsonDto implements Serializable {

private List<String> writerColumns;

private String whereParams;

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.wugui.dataxweb.service.impl;

import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.wugui.dataxweb.dto.DataxJsonDto;
import com.wugui.dataxweb.entity.JobJdbcDatasource;
Expand Down Expand Up @@ -33,6 +34,11 @@ public String buildJobJson(DataxJsonDto dataxJsonDto) {
// reader
JobJdbcDatasource readerDatasource = jobJdbcDatasourceService.getById(dataxJsonDto.getReaderDatasourceId());

//where
if (StrUtil.isNotBlank(dataxJsonDto.getWhereParams())) {
dataxJsonHelper.addWhereParams(dataxJsonDto.getWhereParams());
}

// reader plugin init
dataxJsonHelper.initReader(readerDatasource, dataxJsonDto.getReaderTables(), dataxJsonDto.getReaderColumns());
//
Expand Down

0 comments on commit 1809910

Please sign in to comment.