Skip to content

Commit

Permalink
feature: pipline model 增加创建信息 (#335)
Browse files Browse the repository at this point in the history
* feature: 单次构建支持rerun issue #195

* format: ktlint

* docs: 蓝鲸开源项目规范 issue #324

* bugfix: 定时触发插件禁用失效 issue #329

* feature: pipline model 增加创建信息 #issue 334

* feature: pipline model 增加创建信息 #issue 334

* format: pipline model 增加创建信息 #issue 334
  • Loading branch information
irwinsun committed Dec 18, 2019
1 parent d7b8f82 commit 5938621
Show file tree
Hide file tree
Showing 5 changed files with 187 additions and 89 deletions.
Expand Up @@ -34,13 +34,15 @@ import org.jooq.DSLContext
import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Repository
import java.time.LocalDateTime

@Repository
class PipelineResDao @Autowired constructor(private val objectMapper: ObjectMapper) {

fun create(
dslContext: DSLContext,
pipelineId: String,
creator: String,
version: Int,
model: Model
) {
Expand All @@ -51,11 +53,15 @@ class PipelineResDao @Autowired constructor(private val objectMapper: ObjectMapp
this,
PIPELINE_ID,
VERSION,
MODEL
MODEL,
CREATOR,
CREATE_TIME
)
.values(pipelineId, version, modelString)
.values(pipelineId, version, modelString, creator, LocalDateTime.now())
.onDuplicateKeyUpdate()
.set(MODEL, modelString)
.set(CREATOR, creator)
.set(CREATE_TIME, LocalDateTime.now())
.execute()
}
}
Expand Down

0 comments on commit 5938621

Please sign in to comment.