Commit f7ff0cb8 by 徐光兴

日志修改

parent 53cea7d7
...@@ -3,6 +3,7 @@ package cn.freemud.service.delivery; ...@@ -3,6 +3,7 @@ package cn.freemud.service.delivery;
import cn.freemud.adapter.MessageNoticeAdapter; import cn.freemud.adapter.MessageNoticeAdapter;
import cn.freemud.amp.service.ProduceMQService; import cn.freemud.amp.service.ProduceMQService;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.base.log.ErrorLog;
import cn.freemud.base.log.LogTreadLocal; import cn.freemud.base.log.LogTreadLocal;
import cn.freemud.entities.dto.delivery.*; import cn.freemud.entities.dto.delivery.*;
import cn.freemud.entities.dto.ecology.*; import cn.freemud.entities.dto.ecology.*;
...@@ -30,6 +31,7 @@ import com.freemud.application.sdk.api.deliverycenter.dto.CancelDeliveryOrderReq ...@@ -30,6 +31,7 @@ import com.freemud.application.sdk.api.deliverycenter.dto.CancelDeliveryOrderReq
import com.freemud.application.sdk.api.deliverycenter.response.DeliveryInfoDto; import com.freemud.application.sdk.api.deliverycenter.response.DeliveryInfoDto;
import com.freemud.application.sdk.api.deliverycenter.response.DeliveryResponseDto; import com.freemud.application.sdk.api.deliverycenter.response.DeliveryResponseDto;
import com.freemud.application.sdk.api.deliverycenter.service.DeliveryService; import com.freemud.application.sdk.api.deliverycenter.service.DeliveryService;
import com.freemud.application.sdk.api.log.ApiLog;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import com.freemud.application.sdk.api.ordercenter.enums.OrderClientType; import com.freemud.application.sdk.api.ordercenter.enums.OrderClientType;
import com.freemud.application.sdk.api.ordercenter.enums.OrderType; import com.freemud.application.sdk.api.ordercenter.enums.OrderType;
...@@ -138,7 +140,7 @@ public class ThirdDeliveryServiceImpl implements ThirdDeliveryService { ...@@ -138,7 +140,7 @@ public class ThirdDeliveryServiceImpl implements ThirdDeliveryService {
OrderBaseResponse orderBaseResponseDto = orderCenterSdkService.updateDeliveryInfoById(requestDto); OrderBaseResponse orderBaseResponseDto = orderCenterSdkService.updateDeliveryInfoById(requestDto);
//订单服务修改配送单信息失败 //订单服务修改配送单信息失败
if (!SUCCESS_RESPONSE_CODE.equals(orderBaseResponseDto.getErrcode())) { if (!SUCCESS_RESPONSE_CODE.equals(orderBaseResponseDto.getErrcode())) {
AppLogUtil.errorLog("updateDeliveryInfoById_error", JSONObject.toJSONString(requestDto), JSONObject.toJSONString(orderBaseResponseDto)); ApiLog.printLog("updateDeliveryInfoById_error", JSONObject.toJSONString(requestDto), JSONObject.toJSONString(orderBaseResponseDto), "");
return ResponseUtil.success(); return ResponseUtil.success();
} }
PosBaseRequestDto posBaseRequestDto = new PosBaseRequestDto(); PosBaseRequestDto posBaseRequestDto = new PosBaseRequestDto();
...@@ -410,11 +412,7 @@ public class ThirdDeliveryServiceImpl implements ThirdDeliveryService { ...@@ -410,11 +412,7 @@ public class ThirdDeliveryServiceImpl implements ThirdDeliveryService {
message.setContent(content); message.setContent(content);
pushMessageNoticeDto.setData(new Gson().toJson(message)); pushMessageNoticeDto.setData(new Gson().toJson(message));
try { messageNoticeClient.createMessage(pushMessageNoticeDto, LogThreadLocal.getTrackingNo());
messageNoticeClient.createMessage(pushMessageNoticeDto, LogThreadLocal.getTrackingNo());
}catch (Exception e){
AppLogUtil.errorLog("推送消息中心失败,订单编号:{},失败原因:{}", orderId, "", e);
}
} }
/** /**
...@@ -552,37 +550,33 @@ public class ThirdDeliveryServiceImpl implements ThirdDeliveryService { ...@@ -552,37 +550,33 @@ public class ThirdDeliveryServiceImpl implements ThirdDeliveryService {
* 通知生态发送调用消息 * 通知生态发送调用消息
*/ */
public void sendException(String orderId, String unusualReason, String unusualTime, String desc) { public void sendException(String orderId, String unusualReason, String unusualTime, String desc) {
try { BaseQueryOrderRequest baseQueryOrderRequest = new BaseQueryOrderRequest();
BaseQueryOrderRequest baseQueryOrderRequest = new BaseQueryOrderRequest(); baseQueryOrderRequest.setOrderId(orderId);
baseQueryOrderRequest.setOrderId(orderId); baseQueryOrderRequest.setTrackingNo(LogTreadLocal.getTrackingNo());
baseQueryOrderRequest.setTrackingNo(LogTreadLocal.getTrackingNo()); QueryOrderByIdResponse response = orderCenterSdkService.queryOrderById(baseQueryOrderRequest);
QueryOrderByIdResponse response = orderCenterSdkService.queryOrderById(baseQueryOrderRequest); QueryOrdersResponse.DataBean.OrderBean orderBean = response.getData();
QueryOrdersResponse.DataBean.OrderBean orderBean = response.getData(); SubscribeMessageRequest request = new SubscribeMessageRequest();
SubscribeMessageRequest request = new SubscribeMessageRequest(); OrderExtInfoDto extInfoDto = JSONObject.parseObject(orderBean.getExtInfo(), new TypeReference<OrderExtInfoDto>() {
OrderExtInfoDto extInfoDto = JSONObject.parseObject(orderBean.getExtInfo(), new TypeReference<OrderExtInfoDto>() { });
}); String messageType = "UNUSUAL_ORDER";
String messageType = "UNUSUAL_ORDER"; if (deliveryEarlyWarningMsg.equals(desc)) {
if(deliveryEarlyWarningMsg.equals(desc)){ messageType = "DELIVERY_REMIND";
messageType = "DELIVERY_REMIND"; if (orderBean.getStatus() != null && OrderStatus.getByCode(orderBean.getStatus()) != null) {
if(orderBean.getStatus() != null && OrderStatus.getByCode(orderBean.getStatus()) != null){ desc = OrderStatus.getByCode(orderBean.getStatus()).getDesc();
desc = OrderStatus.getByCode(orderBean.getStatus()).getDesc();
}
} }
request.setMiniAppId(extInfoDto.getAppid());
SendMessageRequest sendMessageRequest = new SendMessageRequest();
sendMessageRequest.setMessageType(messageType);
sendMessageRequest.setMiniAppId(extInfoDto.getAppid());
sendMessageRequest.setOrderId(orderId);
sendMessageRequest.setPartnerId(orderBean.getCompanyId());
sendMessageRequest.setRemark(unusualReason);
sendMessageRequest.setStoreId(orderBean.getShopId());
sendMessageRequest.setOrderStatus(desc);
sendMessageRequest.setUtcTime(unusualTime);
SendMessageResponse sendMessageResponse = ecologyAdminApplicationClient.sendTemplateMessage(sendMessageRequest);
AppLogUtil.debugLotsParams("调用生态返回参数,订单编号:{},返回信息:{}", orderId, JSONObject.toJSONString(sendMessageResponse));
} catch (Exception e) {
AppLogUtil.errorLog("调用生态返回参数失败,订单编号:{},失败原因:{}", orderId, "", e);
} }
request.setMiniAppId(extInfoDto.getAppid());
SendMessageRequest sendMessageRequest = new SendMessageRequest();
sendMessageRequest.setMessageType(messageType);
sendMessageRequest.setMiniAppId(extInfoDto.getAppid());
sendMessageRequest.setOrderId(orderId);
sendMessageRequest.setPartnerId(orderBean.getCompanyId());
sendMessageRequest.setRemark(unusualReason);
sendMessageRequest.setStoreId(orderBean.getShopId());
sendMessageRequest.setOrderStatus(desc);
sendMessageRequest.setUtcTime(unusualTime);
SendMessageResponse sendMessageResponse = ecologyAdminApplicationClient.sendTemplateMessage(sendMessageRequest);
AppLogUtil.debugLotsParams("调用生态返回参数,订单编号:{},返回信息:{}", orderId, JSONObject.toJSONString(sendMessageResponse));
} }
......
...@@ -16,6 +16,7 @@ import cn.freemud.interceptor.ServiceException; ...@@ -16,6 +16,7 @@ import cn.freemud.interceptor.ServiceException;
import cn.freemud.service.EvaluationService; import cn.freemud.service.EvaluationService;
import cn.freemud.service.thirdparty.ActivityApplicationClient; import cn.freemud.service.thirdparty.ActivityApplicationClient;
import cn.freemud.utils.ResponseUtil; import cn.freemud.utils.ResponseUtil;
import com.alibaba.fastjson.JSON;
import com.freemud.api.assortment.datamanager.entity.db.AssortmentOrderEvaluation; import com.freemud.api.assortment.datamanager.entity.db.AssortmentOrderEvaluation;
import com.freemud.api.assortment.datamanager.entity.db.AssortmentProductEvaluation; import com.freemud.api.assortment.datamanager.entity.db.AssortmentProductEvaluation;
import com.freemud.api.assortment.datamanager.entity.dto.InsertOrderEvaluationReqDto; import com.freemud.api.assortment.datamanager.entity.dto.InsertOrderEvaluationReqDto;
...@@ -101,7 +102,7 @@ public class EvaluationServiceImpl implements EvaluationService { ...@@ -101,7 +102,7 @@ public class EvaluationServiceImpl implements EvaluationService {
} }
} }
} catch (Exception ex) { } catch (Exception ex) {
ErrorLog.printErrorLog("userOrderEvaluationNewError", "/order/userOrderEvaluationNew", request, ex); ErrorLog.errorConvertJson(this.getClass(), "userOrderEvaluationNewError /order/userOrderEvaluationNew" + JSON.toJSONString(request), ex);
return ResponseUtil.success(new OrderEvaluationStatus(EvaluationStatus.FAIL.getCode())); return ResponseUtil.success(new OrderEvaluationStatus(EvaluationStatus.FAIL.getCode()));
} }
return ResponseUtil.success(orderEvaluationStatus); return ResponseUtil.success(orderEvaluationStatus);
......
...@@ -1321,23 +1321,19 @@ public class OrderServiceImpl implements Orderservice { ...@@ -1321,23 +1321,19 @@ public class OrderServiceImpl implements Orderservice {
//fisherman 【ID1032306】 【订单聚合层】总部和区域活动可同时生效 //fisherman 【ID1032306】 【订单聚合层】总部和区域活动可同时生效
BaseResponse<PayGiftCheckAndJoinResponseObj> payGiftBaseResponse; BaseResponse<PayGiftCheckAndJoinResponseObj> payGiftBaseResponse;
try { payGiftBaseResponse = activityApplicationClient.payGiftCheckAndJoinNew(payGitRequestDto);
payGiftBaseResponse = activityApplicationClient.payGiftCheckAndJoinNew(payGitRequestDto); AppLogUtil.infoLog("fisherman 总部和区域活动可同时生效 ", payGitRequestDto, payGiftBaseResponse);
AppLogUtil.infoLog("fisherman 总部和区域活动可同时生效 ", payGitRequestDto, payGiftBaseResponse); if (String.valueOf(RESPONSE_SUCCESS_CODE).equals(payGiftBaseResponse.getCode()) && payGiftBaseResponse.getResult() != null) {
if (String.valueOf(RESPONSE_SUCCESS_CODE).equals(payGiftBaseResponse.getCode()) && payGiftBaseResponse.getResult() != null) { PayGiftCheckAndJoinResponseObj result = payGiftBaseResponse.getResult();
PayGiftCheckAndJoinResponseObj result = payGiftBaseResponse.getResult(); PayGiftCheckAndJoinResponseDto oldPayGift = result.getOldPayGift();
PayGiftCheckAndJoinResponseDto oldPayGift = result.getOldPayGift(); // fisherman 版本前 原参数保留,暂不变更 向下兼容
// fisherman 版本前 原参数保留,暂不变更 向下兼容 if (oldPayGift != null) {
if (oldPayGift != null) { queryOrderResponseVo.setActivityName(oldPayGift.getActivityName());
queryOrderResponseVo.setActivityName(oldPayGift.getActivityName()); queryOrderResponseVo.setCoupons(oldPayGift.getCoupons());
queryOrderResponseVo.setCoupons(oldPayGift.getCoupons()); queryOrderResponseVo.setWechatCouponInfo(oldPayGift.getWechatCouponInfo());
queryOrderResponseVo.setWechatCouponInfo(oldPayGift.getWechatCouponInfo()); queryOrderResponseVo.setPayGiftReps(oldPayGift);
queryOrderResponseVo.setPayGiftReps(oldPayGift);
}
queryOrderResponseVo.setNewPayGift(result.getNewPayGift());
} }
}catch (Exception e){ queryOrderResponseVo.setNewPayGift(result.getNewPayGift());
AppLogUtil.errorLog("error to /promotionActivity/payGiftShareCheckAndJoin ", JSON.toJSONString(payGitRequestDto),null, e);
} }
} }
......
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