Commit 8ae2bcce by 徐康

Merge remote-tracking branch 'origin/develop' into develop

parents a3aa4ce1 63d06c37
......@@ -882,12 +882,27 @@ public class OrderServiceImpl implements Orderservice {
BeanUtils.copyProperties(queryOrderVo,vo);
String channelType = this.getQueryOrderChannelType(vo, userLoginInfoDto);
QueryOrdersDto queryOrdersDto = orderAdapter.convent2QueryOrdersDtoMcCafe(queryOrderVo, userId, channelType);
//封装查询正在进行中的订单数
McCafeQueryOrderVo queryOrderVoNow =new McCafeQueryOrderVo();
BeanUtils.copyProperties(queryOrderVo,queryOrderVoNow);
List<Integer> queryOrderStatus = Arrays.asList(QueryOrderStatus.TAKE_MEAL.getCode());
List<Integer> queryOrderType = Arrays.asList(OrderType.COLLECT_GOODS.getCode(),OrderType.TAKE_OUT.getCode());
queryOrderVoNow.setQueryOrderStatus(queryOrderStatus);
queryOrderVoNow.setQueryOrderType(queryOrderType);
QueryOrdersDto queryOrdersDtoNow = orderAdapter.convent2QueryOrdersDtoMcCafe(queryOrderVoNow, userId, channelType);
QueryOrdersResponse queryOrderResponse;
QueryOrdersResponse queryOrderResponseNow;
try {
QueryOrdersRequest queryOrdersRequest2 = new QueryOrdersRequest();
BeanUtil.convertBean(queryOrdersDto, queryOrdersRequest2);
queryOrdersRequest2.setTrackingNo(LogTreadLocal.getTrackingNo());
queryOrderResponse = orderCenterSdkService.queryOrders(queryOrdersRequest2);
QueryOrdersRequest queryOrdersRequestNow = new QueryOrdersRequest();
BeanUtil.convertBean(queryOrdersDtoNow, queryOrdersRequestNow);
queryOrdersRequestNow.setTrackingNo(LogTreadLocal.getTrackingNo());
queryOrderResponseNow = orderCenterSdkService.queryOrders(queryOrdersRequestNow);
} catch (Exception e) {
LogUtil.error("queryOrders_error", gson.toJson(queryOrdersDto), e);
return ResponseUtil.error(ResponseResult.ORDER_QUERYORDER_ERROR);
......@@ -899,6 +914,7 @@ public class OrderServiceImpl implements Orderservice {
//用户无订单数据
if (queryOrderResponse.getData() == null || queryOrderResponse.getData().getCount() == 0) {
responseMap.put("count", 0);
responseMap.put("progressOrderCount", queryOrderResponseNow.getData() == null ? 0 : queryOrderResponseNow.getData().getCount());
responseMap.put("list", new ArrayList<QueryOrderResponseVo>());
return ResponseUtil.success(responseMap);
}
......@@ -978,6 +994,7 @@ public class OrderServiceImpl implements Orderservice {
List<QueryOrderResponseVo> queryOrderResponseVos = orderAdapter.convent2QueryOrderResponseVos(orders, userLoginInfoDto.getWxAppId(), userLoginInfoDto.getIappId());
responseMap.put("count", queryOrderResponse.getData() == null ? 0 : queryOrderResponse.getData().getCount());
responseMap.put("progressOrderCount", queryOrderResponseNow.getData() == null ? 0 : queryOrderResponseNow.getData().getCount());
responseMap.put("list", queryOrderResponseVos);
//只有有订单时才显示用户自定义取餐信息
if (CollectionUtils.isNotEmpty(queryOrderResponseVos)) {
......
......@@ -76,7 +76,7 @@ public class ParkingOrderServiceImpl implements ParkingOrderService {
request.setEndTimestamp(date.getTime()/1000);
request.setOrderClients(Arrays.asList(OrderClientType.PARKING.getIndex()));
request.setPayStatuses(Arrays.asList(2,3,4));
request.setBizTypes(Arrays.asList(1,99));
BaseDownLoadResponse<List<OrderInfoReqs>> listBaseDownLoadResponse = orderDownLoadSdkService.queryOrderByConditions(request, trackingNo);
if(listBaseDownLoadResponse == null && !ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(listBaseDownLoadResponse.getCode())){
return ResponseUtil.success();
......
......@@ -45,4 +45,7 @@ public class ParkingOrderConditionsReq {
private List<Integer> payStatuses;
//业务类型
private List<Integer> bizTypes;
}
......@@ -47,6 +47,12 @@
<artifactId>assortment-shoppingcart-sdk</artifactId>
<version>1.2.0-SNAPSHOT</version>
</dependency>
<!-- 再来一单查询订单信息 -->
<dependency>
<groupId>cn.freemud</groupId>
<artifactId>ordercenter-sdk</artifactId>
<version>1.3.10.RELEASE</version>
</dependency>
<dependency>
<groupId>com.freemud.application.service.sdk</groupId>
<artifactId>promotioncenter-sdk</artifactId>
......
......@@ -97,17 +97,17 @@ public class MCoffeeShoppingCartController {
/**
* 切换点餐方式或者门店
*/
@ApiAnnotation(logMessage = "switchCartGoods")
@PostMapping(value = "/switchCartGoods")
public BaseResponse switchCartGoods(@Validated @LogParams @RequestBody SwitchShoppingCartRequestVo request) {
return shoppingCartMCoffeeService.switchCartGoods(request);
@ApiAnnotation(logMessage = "switchCartGoodsCheck")
@PostMapping(value = "/switchCartGoodsCheck")
public BaseResponse switchCartGoodsCheck(@Validated @LogParams @RequestBody SwitchShoppingCartRequestVo request) {
return shoppingCartMCoffeeService.switchCartGoodsCheck(request);
}
/**
* 再来一单
*/
@ApiAnnotation(logMessage = "listCartGoods")
@ApiAnnotation(logMessage = "copyOrder")
@PostMapping(value = "/copyOrder")
public BaseResponse copyOrder(@Validated @LogParams @RequestBody CopyShoppingCartRequestVo request) {
return shoppingCartMCoffeeService.copyOrder(request);
......
......@@ -292,14 +292,6 @@ public class CalculationServiceImpl {
throw new ServiceException(ResponseResult.USER_GETRECEIVEADDRESS_ERROR);
}
// QueryDeliveryRequest queryDeliveryRequest = new QueryDeliveryRequest();
// queryDeliveryRequest.setPartnerId(partnerId);
// queryDeliveryRequest.setStoreCode(storeId);
// queryDeliveryRequest.setUserLatitude(queryReceiveAddressResponse.getData().getLatitude());
// queryDeliveryRequest.setUserLongitude(queryReceiveAddressResponse.getData().getLongitude());
// com.freemud.application.sdk.api.base.BaseResponse<QueryDeliverDetailResponse> queryDeliverDetailResponse = storeCenterService.queryDeliverDetail(queryDeliveryRequest, trackingNo);
StoreInfoRequest storeInfoRequest = new StoreInfoRequest();
storeInfoRequest.setPartnerId(partnerId);
storeInfoRequest.setStoreCode(storeId);
......@@ -308,12 +300,11 @@ public class CalculationServiceImpl {
if (storeInfo == null || storeInfo.getStatusCode() != 100 || storeInfo.getBizVO() == null) {
throw new ServiceException(ResponseResult.STORE_ITEM_NOT_DELIVERY);
}
// if (storeInfo.getBizVO().getDeliveryPrice() == 0) {
// throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR);
// }
// Double deliveryPrice = storeInfo.getBizVO().getDeliveryPrice();
// deliveryAmount = deliveryPrice.longValue();
deliveryAmount = 700l;
if (storeInfo.getBizVO().getDeliveryPrice() == 0) {
throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR);
}
Double deliveryPrice = storeInfo.getBizVO().getDeliveryPrice();
deliveryAmount = deliveryPrice.longValue();
return deliveryAmount;
}
......@@ -408,6 +399,7 @@ public class CalculationServiceImpl {
shoppingCartGoodsResponseVo.setNewPackAmount(totalPackgeAmount);
shoppingCartGoodsResponseVo.setTotalDiscountAmount(calculationDiscount == null ? 0L : calculationDiscount.getTotalDiscountAmount());
if(calculationDiscount != null && calculationDiscount.getDeliveryAmount() == null){
shoppingCartGoodsResponseVo.setDeliveryAmount(deliveryAmount);
shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(deliveryAmount);
shoppingCartGoodsResponseVo.setOriginalTotalAmount(shoppingCartGoodsResponseVo.getOriginalTotalAmount() + deliveryAmount);
shoppingCartGoodsResponseVo.setTotalAmount(shoppingCartGoodsResponseVo.getTotalAmount() + deliveryAmount);
......
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