Commit 54411bf8 by 刘鹏飞

订单列表查询es

parent 8158e367
......@@ -3788,7 +3788,7 @@ public class OrderAdapter {
return activityUpdateStockRequest;
}
public OrderConditionsReq convent2QueryOrdersDtoES(OrderConditionsReq query, String memberId, String channelType, Integer queryOrderStatus) {
public OrderConditionsReq convent2QueryOrdersDtoES(OrderConditionsReq query, String memberId, String channelType, Integer queryOrderStatus,Integer queryOrderType) {
OrderConditionsReq queryOrdersDto = new OrderConditionsReq();
queryOrdersDto.setUserId(memberId);
queryOrdersDto.setPartnerId(query.getPartnerId());
......@@ -3800,16 +3800,16 @@ public class OrderAdapter {
List<Integer> orderClients = new ArrayList<>();
if(OrderChannelType.IWC.getCode().equals(channelType)) {
orderClients.add(com.freemud.sdk.api.assortment.order.enums.OrderSourceType.MEAL.getClientType());
//queryOrdersDto.setOrderClients(new String[]{"meals"});
//queryOrdersDto.setSource(new String[]{"meals"});
} else if(OrderChannelType.SAASMALL.getCode().equals(channelType)) {
orderClients.add(com.freemud.sdk.api.assortment.order.enums.OrderSourceType.SAASMALL.getClientType());
//queryOrdersDto.setOrderClients(new String[]{"saasmall"});
//queryOrdersDto.setSource(new String[]{"saasmall"});
} else if(OrderChannelType.APP.getCode().equals(channelType)){
orderClients.add(com.freemud.sdk.api.assortment.order.enums.OrderSourceType.APP.getClientType());
//queryOrdersDto.setOrderClients(new String[]{"app"});
//queryOrdersDto.setSource(new String[]{"app"});
} else {
orderClients.add(com.freemud.sdk.api.assortment.order.enums.OrderSourceType.SAAS.getClientType());
//queryOrdersDto.setOrderClients(new String[]{"saas"});
//queryOrdersDto.setSource(new String[]{"saas"});
}
queryOrdersDto.setOrderClients(orderClients);
......@@ -3817,7 +3817,6 @@ public class OrderAdapter {
queryOrdersDto.setPayStatuses(payStatus);
//queryOrdersDto.setPayStatus((Integer[]) payStatus.toArray());
//TODO 查询退款的待确定
if (queryOrderStatus != null) {
if (QueryOrderStatus.ALL_BILL.getCode().equals(queryOrderStatus)) {
List<Integer> orderStatuses = new ArrayList<>();
......@@ -3840,11 +3839,7 @@ public class OrderAdapter {
//queryOrdersDto.setStatus(new Integer[]{OrderStatus.COMPLETE.getCode()});
}
if (QueryOrderStatus.REFUND_BILL.getCode().equals(queryOrderStatus)) {
// 不走es
/* Integer[] statuses = new Integer[]{RefundStatus.APPLY_REFUND.getCode(), RefundStatus.AGREE_REFUND.getCode(), RefundStatus.COMPLETE_REFUND.getCode()};
List<Integer> orderStatuses = new ArrayList<>();
Collections.addAll(orderStatuses, statuses);
queryOrdersDto.setAfterSalesStatus(orderStatuses);*/
//Integer[] statuses = new Integer[]{RefundStatus.APPLY_REFUND.getCode(), RefundStatus.AGREE_REFUND.getCode(), RefundStatus.COMPLETE_REFUND.getCode()};
//queryOrdersDto.setRefundStatus(statuses);
}
if (QueryOrderStatus.NO_PAY.getCode().equals(queryOrderStatus)) {
......@@ -3875,14 +3870,14 @@ public class OrderAdapter {
// 兼容历史版本,如果传参是4 查询拆程4和5
List<Integer> orderTypes = new ArrayList<>();
if (queryOrderStatus != null) {
if (Objects.equals(queryOrderStatus, OrderType.COLLECT_GOODS.getCode())) {
if (queryOrderType != null) {
if (Objects.equals(queryOrderType, OrderType.COLLECT_GOODS.getCode())) {
orderTypes.add(OrderType.COLLECT_GOODS.getCode());
orderTypes.add(OrderType.EAT_IN.getCode());
//queryOrdersDto.setType(new Integer[]{OrderType.COLLECT_GOODS.getCode(), OrderType.EAT_IN.getCode()});
} else {
orderTypes.add(queryOrderStatus);
//queryOrdersDto.setType(new Integer[]{queryOrderStatus});
orderTypes.add(queryOrderType);
//queryOrdersDto.setType(new Integer[]{queryOrderDto.getQueryOrderType()});
}
}
queryOrdersDto.setOrderTypes(orderTypes);
......@@ -3892,8 +3887,7 @@ public class OrderAdapter {
List<Integer> orderStatuses = new ArrayList<>();
Collections.addAll(orderStatuses, statuses);
queryOrdersDto.setOrderStatuses(orderStatuses);
//queryOrdersDto.setStatus(orderStatuses);
//queryOrdersDto.setStatus(statuses);
Integer[] payWCStatus =new Integer[]{PayStatus.NOT_PAY.getCode(),PayStatus.HAVE_PAID.getCode(), PayStatus.HAVE_REFUND.getCode(), PayStatus.COMPLETE.getCode()};
List<Integer> payStatuses = new ArrayList<>();
......
......@@ -838,7 +838,7 @@ public class OrderServiceImpl implements Orderservice {
es.setEndTimestamp(DateTimeUtil.parseDate(endDateStr,DateTimeUtil.YYYY_MM_DD_HH_MM_SS).getTime()/1000);
es.setPageNum(queryOrderVo.getPageNumber());
es.setPageSize(queryOrderVo.getPageSize());
OrderConditionsReq queryEs = orderAdapter.convent2QueryOrdersDtoES(es,userId,channelType,queryOrderVo.getQueryOrderStatus());
OrderConditionsReq queryEs = orderAdapter.convent2QueryOrdersDtoES(es,userId,channelType,queryOrderVo.getQueryOrderStatus(),queryOrderVo.getQueryOrderType());
BaseDownLoadResponse<List<OrderInfoReqs>> response = orderDownLoadSdkService.queryOrderByConditions(queryEs, LogThreadLocal.getTrackingNo());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment