美文网首页
Tkmybatis使用

Tkmybatis使用

作者: knock | 来源:发表于2020-12-30 10:26 被阅读0次
    /**
         *
         *
         *  where (条件1 and 条件2) or (条件3 and 条件4)
         *
         *         条件1 and 条件2
         *         example.createCriteria()
         *                 .andEqualTo("isDeleted", IsDeleted.NOT_DELETED)
         *                 .andEqualTo("name", projectCatalogEntity.getName());
         *         or (条件3 and 条件4)
         *         example.or(example.createCriteria()
         *                 .andEqualTo("isDeleted", IsDeleted.NOT_DELETED)
         *                 .andEqualTo("code", projectCatalogEntity.getCode()));
         *
         *
         */
    
        /**
         * where (条件1 and 条件2) and (条件3 or 条件4)
         * <p>
         * //条件1 and 条件2
         * example.createCriteria()
         * .andEqualTo("isDeleted",IsDeleted.NOT_DELETED))
         * .andEqualTo("parentId", projectCatalogEntity.getParentId());
         * //and (条件3 or 条件4)
         * example.and(example.createCriteria()
         * .andEqualTo("name", projectCatalogEntity.getName())
         * .orEqualTo("code", projectCatalogEntity.getCode()));
         */
    

    相关文章

      网友评论

          本文标题:Tkmybatis使用

          本文链接:https://www.haomeiwen.com/subject/zxncoktx.html