Commit 83c5419d by 徐康

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

parents 4855d3ca d0b8b405
......@@ -26,6 +26,7 @@ import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
import com.freemud.sdk.api.assortment.order.enums.OrderSourceType;
import com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse;
import javafx.util.Pair;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -46,6 +47,7 @@ import org.springframework.stereotype.Component;
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
@Component
@Slf4j
public class DeliveryHandle {
private static final String THIRD = "third";
......@@ -143,6 +145,7 @@ public class DeliveryHandle {
deliveryOrderHaltedRequest.setOrderKey(data.getOid());
deliveryOrderHaltedRequest.setStoreId(data.getShopId());
DeliveryResponseDto deliveryResponse = deliveryMCCafeClient.halted(deliveryOrderHaltedRequest);
log.info("配送停机入参:{},出参:{}",JSONObject.toJSONString(deliveryOrderHaltedRequest),JSONObject.toJSON(deliveryResponse));
if (deliveryResponse == null || !StringUtils.equals(ResponseResult.SUCCESS.getCode(), deliveryResponse.getCode()+"")) {
emailAlertService.sendEmailAlert("配送单停单失败", String.format("request:%s \r\nresponse:%s", JSONObject.toJSONString(deliveryOrderHaltedRequest), JSONObject.toJSONString(deliveryResponse)));
return ResponseUtil.error(ResponseResult.DELIVERY_ORDER_STOP_ERROR);
......
......@@ -11,9 +11,11 @@ import cn.freemud.management.service.OrderManagerService;
import cn.freemud.management.service.handle.*;
import cn.freemud.management.thirdparty.DeliveryMCCafeClient;
import cn.freemud.management.util.ResponseUtil;
import com.alibaba.fastjson.JSONObject;
import com.freemud.application.sdk.api.deliverycenter.response.DeliveryResponseDto;
import com.freemud.sdk.api.assortment.message.enums.OrderType;
import com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
......@@ -36,6 +38,7 @@ import java.util.Objects;
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
@Service
@Slf4j
public class McCafeMangerServiceImpl implements OrderManagerService {
@Resource
private SaasOrderHandle saasOrderHandle;
......@@ -72,7 +75,9 @@ public class McCafeMangerServiceImpl implements OrderManagerService {
assemblyAckRequest.setAssemblyTimeUTC(dateFormat.format(DateUtil.addHours(new Date(), -8)));
assemblyAckRequest.setStoreId(orderBean.getShopId());
//入机成功通知配送
log.info("入机成功通知配送入参:{}",JSONObject.toJSONString(assemblyAckRequest));
DeliveryResponseDto deliveryResponse = deliveryMCCafeClient.assemblyAck(assemblyAckRequest);
log.info("入机成功通知配送出参:{}" ,JSONObject.toJSON(deliveryResponse));
if (deliveryResponse == null || !StringUtils.equals(ResponseResult.SUCCESS.getCode(), deliveryResponse.getCode()+"")) {
return ResponseUtil.error(ResponseResult.DELIVERY_ASSEMBLY_ACK_ERROR);
}
......
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