Commit 6593f257 by dingkai

商城订单列表

parent 34be4d11
......@@ -27,6 +27,7 @@ import cn.freemud.entities.vo.*;
import cn.freemud.entities.vo.encircle.PreviewOrderInfoVo;
import cn.freemud.enums.ActivityTypeEnum;
import cn.freemud.enums.*;
import cn.freemud.enums.OrderChannelType;
import cn.freemud.enums.OrderSourceType;
import cn.freemud.enums.PayStatus;
import cn.freemud.enums.QueryOrderStatus;
......@@ -737,7 +738,7 @@ public class OrderAdapter {
return confirmOrderDto;
}
public QueryOrdersDto convent2QueryOrdersDto(QueryOrderDto queryOrderDto, String memberId, String iAppId) {
public QueryOrdersDto convent2QueryOrdersDto(QueryOrderDto queryOrderDto, String memberId, String channelType) {
QueryOrdersDto queryOrdersDto = new QueryOrdersDto();
queryOrdersDto.setUserId(memberId);
queryOrdersDto.setCompanyId(queryOrderDto.getPartnerId());
......@@ -746,8 +747,10 @@ public class OrderAdapter {
queryOrdersDto.setStartDate(queryOrderDto.getStartDate());
queryOrdersDto.setEndDate(queryOrderDto.getEndDate());
if (IappIdType.WC_XCX.getCode().equals(iAppId)) {
if(OrderChannelType.IWC.getCode().equals(channelType)) {
queryOrdersDto.setSource(new String[]{"meals"});
} else if(OrderChannelType.MALL.getCode().equals(channelType)) {
queryOrdersDto.setSource(new String[]{"mall"});
} else {
queryOrdersDto.setSource(new String[]{"saas"});
}
......@@ -772,7 +775,7 @@ public class OrderAdapter {
queryOrdersDto.setRefundStatus(statuses);
}
}
if (IappIdType.WC_XCX.getCode().equals(iAppId)) {
if (OrderChannelType.IWC.getCode().equals(channelType) || OrderChannelType.MALL.getCode().equals(channelType)) {
Integer[] statuses = new Integer[]{OrderStatus.COMPLETE.getCode(), OrderStatus.CALCEL.getCode()};
queryOrdersDto.setStatus(statuses);
}
......
......@@ -130,7 +130,7 @@ public class OrderController {
@ApiAnnotation(logMessage = "queryOrderById")
@PostMapping("/queryOrderById")
public BaseResponse queryOrderById(@Validated @LogParams @RequestBody QueryOrderVo queryOrderVo) {
return orderservice.queryOrderById(queryOrderVo.getOperation(),queryOrderVo.getSessionId(), queryOrderVo.getOid(),queryOrderVo.getPartnerId(),queryOrderVo.getChannel());
return orderservice.queryOrderById(queryOrderVo.getOperation(),queryOrderVo.getSessionId(), queryOrderVo.getOid(),queryOrderVo.getPartnerId(),queryOrderVo.getChannelType());
}
/**
......
......@@ -55,8 +55,8 @@ public class QueryOrderVo {
private String endDate;
/**
* 渠道信息 1:saas 2:img 3:iwc
* 渠道信息 1:saas 2:img 3:iwc;4:mall
*/
private String channel;
private String channelType;
}
......@@ -661,7 +661,8 @@ public class OrderServiceImpl implements Orderservice {
queryOrderDto.setPartnerId(queryOrderVo.getPartnerId());
queryOrderDto.setStartDate(startDateStr);
queryOrderDto.setEndDate(endDateStr);
QueryOrdersDto queryOrdersDto = orderAdapter.convent2QueryOrdersDto(queryOrderDto, userId, userLoginInfoDto.getIappId());
String channelType = this.getQueryOrderChannelType(queryOrderVo, userLoginInfoDto);
QueryOrdersDto queryOrdersDto = orderAdapter.convent2QueryOrdersDto(queryOrderDto, userId, channelType);
QueryOrdersResponse queryOrderResponse;
try {
QueryOrdersRequest queryOrdersRequest2 = new QueryOrdersRequest();
......@@ -2063,4 +2064,19 @@ public class OrderServiceImpl implements Orderservice {
}
}
/**
* 历史判断围餐是从userLoginInfoDto判断iappid的。
* 商城订单从前端传channelType区分,
* 默认点餐
*/
private String getQueryOrderChannelType(QueryOrderVo queryOrderVo, AssortmentCustomerInfoVo userLoginInfoDto) {
String channelType = OrderChannelType.SAAS.getCode();
if(IappIdType.WC_XCX.getCode().equals(userLoginInfoDto.getIappId())) {
channelType = OrderChannelType.IWC.getCode();
} else if(OrderChannelType.MALL.getCode().equals(queryOrderVo.getChannelType())) {
channelType = OrderChannelType.MALL.getCode();
}
return channelType;
}
}
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