QTbOrderInfo tbOrderInfo = QTbOrderInfo.tbOrderInfo; Calendar calendar = Calendar.getInstance(); calendar.add(Calendar.HOUR,-2); Predicate predicate = tbOrderInfo.suspendStatus.eq(SuspendStatusEnum.SUSPEND.getCode()) .and(tbOrderInfo.orderState.gt(2)) .and(tbOrderInfo.operatorId.eq("2222222")) .and(tbOrderInfo.userStopTime.after(new Timestamp(calendar.getTime().getTime()))); List<TbOrderInfo> tbOrderInfos = jpaQueryFactory.select(Projections.fields(TbOrderInfo.class,lxTbOrderInfo.orderId,TbOrderInfo.connectorId, TbOrderInfo.orderState, TbOrderInfo.suspendStatus)) .from(TbOrderInfo) .where(predicate) .fetch();
jpaQueryFactory 使用
最新推荐文章于 2024-03-11 21:40:58 发布