Commit 10376c29 by ping.wu

再来一单

parent fc95e342
...@@ -47,6 +47,12 @@ ...@@ -47,6 +47,12 @@
<artifactId>assortment-shoppingcart-sdk</artifactId> <artifactId>assortment-shoppingcart-sdk</artifactId>
<version>1.1.3.RELEASE</version> <version>1.1.3.RELEASE</version>
</dependency> </dependency>
<!-- 再来一单查询订单信息 -->
<dependency>
<groupId>cn.freemud</groupId>
<artifactId>ordercenter-sdk</artifactId>
<version>1.3.10.RELEASE</version>
</dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<artifactId>promotioncenter-sdk</artifactId> <artifactId>promotioncenter-sdk</artifactId>
......
...@@ -107,7 +107,7 @@ public class MCoffeeShoppingCartController { ...@@ -107,7 +107,7 @@ public class MCoffeeShoppingCartController {
/** /**
* 再来一单 * 再来一单
*/ */
@ApiAnnotation(logMessage = "listCartGoods") @ApiAnnotation(logMessage = "copyOrder")
@PostMapping(value = "/copyOrder") @PostMapping(value = "/copyOrder")
public BaseResponse copyOrder(@Validated @LogParams @RequestBody CopyShoppingCartRequestVo request) { public BaseResponse copyOrder(@Validated @LogParams @RequestBody CopyShoppingCartRequestVo request) {
return shoppingCartMCoffeeService.copyOrder(request); return shoppingCartMCoffeeService.copyOrder(request);
......
...@@ -292,14 +292,6 @@ public class CalculationServiceImpl { ...@@ -292,14 +292,6 @@ public class CalculationServiceImpl {
throw new ServiceException(ResponseResult.USER_GETRECEIVEADDRESS_ERROR); 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 storeInfoRequest = new StoreInfoRequest();
storeInfoRequest.setPartnerId(partnerId); storeInfoRequest.setPartnerId(partnerId);
storeInfoRequest.setStoreCode(storeId); storeInfoRequest.setStoreCode(storeId);
...@@ -308,12 +300,11 @@ public class CalculationServiceImpl { ...@@ -308,12 +300,11 @@ public class CalculationServiceImpl {
if (storeInfo == null || storeInfo.getStatusCode() != 100 || storeInfo.getBizVO() == null) { if (storeInfo == null || storeInfo.getStatusCode() != 100 || storeInfo.getBizVO() == null) {
throw new ServiceException(ResponseResult.STORE_ITEM_NOT_DELIVERY); throw new ServiceException(ResponseResult.STORE_ITEM_NOT_DELIVERY);
} }
// if (storeInfo.getBizVO().getDeliveryPrice() == 0) { if (storeInfo.getBizVO().getDeliveryPrice() == 0) {
// throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR); throw new ServiceException(ResponseResult.STORE_DELIVERY_AMOUNT_ERROR);
// } }
// Double deliveryPrice = storeInfo.getBizVO().getDeliveryPrice(); Double deliveryPrice = storeInfo.getBizVO().getDeliveryPrice();
// deliveryAmount = deliveryPrice.longValue(); deliveryAmount = deliveryPrice.longValue();
deliveryAmount = 700l;
return deliveryAmount; return deliveryAmount;
} }
...@@ -408,6 +399,7 @@ public class CalculationServiceImpl { ...@@ -408,6 +399,7 @@ public class CalculationServiceImpl {
shoppingCartGoodsResponseVo.setNewPackAmount(totalPackgeAmount); shoppingCartGoodsResponseVo.setNewPackAmount(totalPackgeAmount);
shoppingCartGoodsResponseVo.setTotalDiscountAmount(calculationDiscount == null ? 0L : calculationDiscount.getTotalDiscountAmount()); shoppingCartGoodsResponseVo.setTotalDiscountAmount(calculationDiscount == null ? 0L : calculationDiscount.getTotalDiscountAmount());
if(calculationDiscount != null && calculationDiscount.getDeliveryAmount() == null){ if(calculationDiscount != null && calculationDiscount.getDeliveryAmount() == null){
shoppingCartGoodsResponseVo.setDeliveryAmount(deliveryAmount);
shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(deliveryAmount); shoppingCartGoodsResponseVo.setDiscountDeliveryAmount(deliveryAmount);
shoppingCartGoodsResponseVo.setOriginalTotalAmount(shoppingCartGoodsResponseVo.getOriginalTotalAmount() + deliveryAmount); shoppingCartGoodsResponseVo.setOriginalTotalAmount(shoppingCartGoodsResponseVo.getOriginalTotalAmount() + deliveryAmount);
shoppingCartGoodsResponseVo.setTotalAmount(shoppingCartGoodsResponseVo.getTotalAmount() + 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