exists的使用

//对组任务类型进行转义处理
        if(StringUtils.notBlank(groupTaskType)){
            groupTaskType=qhyfService.strEscape(groupTaskType);
            String groupTaskTypes="%"+groupTaskType+"%";
            String groupSql=""+
                    "AND EXISTS (" +
                    "    SELECT" +
                    "        1" +
                    "    FROM" +
                    "        biz_document_user_task_info x" +
                    "    LEFT JOIN biz_group_task_info o ON x.group_task_id = o.uuid " +
                    "    LEFT JOIN biz_group_task_detail y  ON x.group_task_id = y.group_task_id " +
                    "    LEFT JOIN biz_document_task_info z ON y.task_id = z.uuid" +
                    "    where o.group_id = e.uuid AND z.task_name like ? " +
                    ")";
            where.append(groupSql);
            paras.add(groupTaskTypes);
        }

 

posted on 2018-09-10 17:33  小白菜好吃  阅读(242)  评论(0编辑  收藏  举报

导航