public String getQueryCondition() {

        StringBuilder sb = new StringBuilder();
        if (!StringUtils.isEmpty(taskId)) {
            sb.append("task_id = '").append(taskId).append("'").append(LINK);
        }
        if (!CollectionUtils.isEmpty(taskIds)) {
            String taskIdsInQuery = taskIds.stream().map(id -> String.format("'%s'", id)).collect(Collectors.joining(", "));

            sb.append("task_id in (").append(taskIdsInQuery).append(")").append(LINK);
        }
        if (subInstanceId != null) {
            sb.append("sub_instance_id = ").append(subInstanceId).append(LINK);
        }
        if (instanceId != null) {
            sb.append("instance_id = ").append(instanceId).append(LINK);
        }
        if (!StringUtils.isEmpty(address)) {
            sb.append("address = '").append(address).append("'").append(LINK);
        }
        if (!StringUtils.isEmpty(taskName)) {
            sb.append("task_name = '").append(taskName).append("'").append(LINK);
        }
        if (status != null) {
            sb.append("status = ").append(status).append(LINK);
        }

        // 自定义查询模式专用
        if (StringUtils.isNotEmpty(fullCustomQueryCondition)) {
            sb.append(fullCustomQueryCondition);
            return sb.toString();
        }

        if (!StringUtils.isEmpty(queryCondition)) {
            sb.append(queryCondition).append(LINK);
        }

        String substring = sb.substring(0, sb.length() - LINK.length());

        if (!StringUtils.isEmpty(otherCondition)) {
            substring += otherCondition;
        }

        if (limit != null) {
            substring = substring + " limit " + limit;
        }
        return substring;
    }
@Test
    void test() {
        SimpleTaskQuery simpleTaskQuery = new SimpleTaskQuery();
        simpleTaskQuery.setInstanceId(10086L);
        simpleTaskQuery.setTaskIds(Lists.newArrayList("taskId1", "taskId2", "taskId3"));

        String queryCondition = simpleTaskQuery.getQueryCondition();
        System.out.println(queryCondition);

        assertEquals("task_id in ('taskId1', 'taskId2', 'taskId3') and instance_id = 10086", queryCondition);
    }