Skip to content

QueryWrapper 不能使用超过一次 #49

Description

@wenrong443

你好,

在第一次使用queryWrapper 之后, 第二次返回的数据会异常

例子:
QueryWrapper query = QueryWrapper.create()
.where(paymentTerm.ptMerchant.eq(userBean.getMerchant()))
.and(paymentTerm.ptDesc.like(FilterUtil.search(subFilter.getDescription())))
.and(paymentTerm.ptStatus.eq(FilterUtil.search(subFilter.getStatus())))
.and(paymentTerm.ptStatus.ne(PaymentTermBean.STATUS_REMOVED))
.orderBy(filter.getSort().sortBy());

return count(query) == 0 ? new ArrayList<>() : list(query);

在以上的例子中 count(query) 返回的数量是对的, 但是 list(query) 里返回 list size = 1 但是里面是 null

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions