Commit 2abd19a1 by ping.wu

兑换详情返回实物收货地址

parent 47ec9af8
......@@ -99,8 +99,8 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
return ResponseUtil.error("101", "商品异常");
}
IntegralProductType integralProductType = productInfosDto.getResult().get(0);
if(!Objects.equals(1,integralProductType.getExchangeType())){
return ResponseUtil.error("101","积分商城暂不支持现金兑换");
if (!Objects.equals(1, integralProductType.getExchangeType())) {
return ResponseUtil.error("101", "积分商城暂不支持现金兑换");
}
// integralProductType.setIntegralPrice(2);
// integralProductType.setCashPrice(0);
......@@ -109,7 +109,7 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
Integer exchangeType = integralProductType.getExchangeType();
boolean isCoupon = integralProductType.getProductType() == 1;
WeixinDeliveryAddressDto weixinDeliveryAddress = createOrderVo.getWeixinDeliveryAddress();
if(!isCoupon && (weixinDeliveryAddress == null || StringUtils.isEmpty(weixinDeliveryAddress.getProvinceName()))) {
if (!isCoupon && (weixinDeliveryAddress == null || StringUtils.isEmpty(weixinDeliveryAddress.getProvinceName()))) {
return ResponseUtil.error("101", "收货地址异常");
}
Active active = null;
......@@ -272,8 +272,8 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
ScoreRecordVo responseVo = new ScoreRecordVo();
responseVo.setOrderCode(order.getOrderCode());
responseVo.setOrderStatus(order.getOrderState());
responseVo.setExpressChannelName(order.getExpressChannelName());
responseVo.setExpressChannelCode(order.getExpressChannelCode());
// responseVo.setExpressChannelName(order.getExpressChannelName());
// responseVo.setExpressChannelCode(order.getExpressChannelCode());
if (order.getCreateTime() != null) {
responseVo.setCreateTime(Long.parseLong(order.getCreateTime()));
}
......@@ -286,7 +286,7 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
responseVo.setIntegralPrice(orderItemResp.getProductPrice().intValue());
responseVo.setCashPrice(orderItemResp.getSalePrice().intValue());
responseVo.setProductPicUrl(orderItemResp.getProductPicUrl());
if(orderItemResp.getProductType() == 2){
if (orderItemResp.getProductType() == 2) {
entityProduct = true;
}
}
......@@ -328,7 +328,8 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
if (order.getCreateTime() != null) {
responseVo.setCreateTime(Long.parseLong(order.getCreateTime()));
}
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(order.getOrderItemList())) {
boolean entityProduct = false;
if (CollectionUtils.isNotEmpty(order.getOrderItemList())) {
OrderItemResp orderItemResp = order.getOrderItemList().get(0);
responseVo.setProductName(orderItemResp.getProductName());
responseVo.setProductQuantity(orderItemResp.getProductQuantity());
......@@ -336,6 +337,16 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
responseVo.setIntegralPrice(orderItemResp.getProductPrice().intValue());
responseVo.setCashPrice(orderItemResp.getSalePrice().intValue());
responseVo.setProductPicUrl(orderItemResp.getProductPicUrl());
if (orderItemResp.getProductType() == 2) {
entityProduct = true;
}
}
if (entityProduct && CollectionUtils.isNotEmpty(order.getDeliveryContactInfoList())) {
DeliveryContactInfoResp deliveryContactInfoResp = order.getDeliveryContactInfoList().get(0);
responseVo.setUserName(deliveryContactInfoResp.getContactsName());
responseVo.setMobile(deliveryContactInfoResp.getMobile());
String addressDetail = deliveryContactInfoResp.getProvince() + deliveryContactInfoResp.getCity() + deliveryContactInfoResp.getRegion() + deliveryContactInfoResp.getAddressDetail();
responseVo.setAddressDetail(addressDetail);
}
return ResponseUtil.success(responseVo);
}
......@@ -452,7 +463,7 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
String shopId, String cardCode,
String channel, Integer bizType,
IntegralProductType productBean, String skuId,
Active active,WeixinDeliveryAddressDto weixinDeliveryAddress) {
Active active, WeixinDeliveryAddressDto weixinDeliveryAddress) {
CreateOrderRequest request = new CreateOrderRequest();
String partnerId = userLoginInfoDto.getPartnerId();
request.setOrderClient(orderClient);
......@@ -505,9 +516,12 @@ public class PointsMallOrderServiceImpl implements PointsMallOrderService {
deliveryContactInfoCreateReq.setProvince(null);
deliveryContactInfoCreateReq.setCity(null);
deliveryContactInfoCreateReq.setRegion(null);
if(weixinDeliveryAddress != null){
if (weixinDeliveryAddress != null) {
deliveryContactInfoCreateReq.setContactsName(weixinDeliveryAddress.getUserName());
deliveryContactInfoCreateReq.setMobile(weixinDeliveryAddress.getTelNumber());
deliveryContactInfoCreateReq.setProvince(weixinDeliveryAddress.getProvinceName());
deliveryContactInfoCreateReq.setCity(weixinDeliveryAddress.getCityName());
deliveryContactInfoCreateReq.setRegion(weixinDeliveryAddress.getCountyName());
deliveryContactInfoCreateReq.setAddressDetail(weixinDeliveryAddress.getDetailInfo());
}
deliveryContactInfoList.add(deliveryContactInfoCreateReq);
......
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