查询逻辑更改
This commit is contained in:
parent
13fc2e5f69
commit
70742b3362
@ -39,16 +39,9 @@ public class FreightBalanceRunningWaterServiceImpl extends
|
|||||||
@Override
|
@Override
|
||||||
public List<FreightBalanceRunningWater> flowByUserId(Long userId, Long acceptUserId, Integer type, Long lastId) {
|
public List<FreightBalanceRunningWater> flowByUserId(Long userId, Long acceptUserId, Integer type, Long lastId) {
|
||||||
return query()
|
return query()
|
||||||
.and(Objects.isNull(acceptUserId), wrapper -> wrapper
|
.eq(FreightBalanceRunningWater::getUserId, userId)
|
||||||
.eq(FreightBalanceRunningWater::getUserId, userId)
|
.eq(Objects.nonNull(acceptUserId), FreightBalanceRunningWater::getAcceptUserId, acceptUserId)
|
||||||
.or()
|
.eq(Objects.nonNull(type), FreightBalanceRunningWater::getType, type)
|
||||||
.eq(FreightBalanceRunningWater::getAcceptUserId, userId)
|
|
||||||
)
|
|
||||||
.and(Objects.nonNull(acceptUserId), e -> e
|
|
||||||
.eq(FreightBalanceRunningWater::getUserId, userId)
|
|
||||||
.or()
|
|
||||||
.eq(FreightBalanceRunningWater::getAcceptUserId, acceptUserId))
|
|
||||||
.and(Objects.nonNull(type), e -> e.eq(FreightBalanceRunningWater::getType, type))
|
|
||||||
.lt(Objects.nonNull(lastId), FreightBalanceRunningWater::getId, lastId)
|
.lt(Objects.nonNull(lastId), FreightBalanceRunningWater::getId, lastId)
|
||||||
.orderByDesc(FreightBalanceRunningWater::getId)
|
.orderByDesc(FreightBalanceRunningWater::getId)
|
||||||
.last(PageConstant.DEFAULT_LIMIT)
|
.last(PageConstant.DEFAULT_LIMIT)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user