use of org.apache.inlong.manager.dao.entity.WorkflowApproverEntity in project incubator-inlong by apache.
the class WorkflowApproverServiceImpl method update.
@Override
public void update(WorkflowApprover config, String operator) {
Preconditions.checkNotNull(config, "config cannot be null");
Preconditions.checkNotNull(config.getId(), "id cannot be null");
WorkflowApproverEntity entity = workflowApproverMapper.selectByPrimaryKey(config.getId());
Preconditions.checkNotNull(entity, "not exist with id:" + config.getId());
WorkflowApproverEntity update = new WorkflowApproverEntity();
update.setId(config.getId());
update.setModifyTime(new Date());
update.setModifier(operator);
update.setApprovers(config.getApprovers());
update.setFilterKey(config.getFilterKey().name());
update.setFilterValue(config.getFilterValue());
int success = this.workflowApproverMapper.updateByPrimaryKeySelective(update);
Preconditions.checkTrue(success == 1, "update failed");
}
Aggregations