1
This commit is contained in:
@@ -818,10 +818,26 @@ public class JDOrderController extends BaseController {
|
||||
*/
|
||||
private void sendEnterprisePushNotification(JDOrder order, String waybillNo, JSONObject logisticsData) {
|
||||
try {
|
||||
// 构建推送消息内容(只包含:型号、收货地址、运单号)
|
||||
// 构建推送消息内容
|
||||
StringBuilder pushContent = new StringBuilder();
|
||||
|
||||
// 第一行:分销标识(F或PDD)
|
||||
String distributionMark = order.getDistributionMark() != null ? order.getDistributionMark() : "未知";
|
||||
pushContent.append(distributionMark).append("\n");
|
||||
|
||||
// PDD订单包含第三方单号,F订单不包含
|
||||
if ("PDD".equals(distributionMark)) {
|
||||
String thirdPartyOrderNo = order.getThirdPartyOrderNo();
|
||||
if (thirdPartyOrderNo != null && !thirdPartyOrderNo.trim().isEmpty()) {
|
||||
pushContent.append("第三方单号:").append(thirdPartyOrderNo).append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
// 型号
|
||||
pushContent.append("型号:").append(order.getModelNumber() != null ? order.getModelNumber() : "无").append("\n");
|
||||
// 收货地址
|
||||
pushContent.append("收货地址:").append(order.getAddress() != null ? order.getAddress() : "无").append("\n");
|
||||
// 运单号
|
||||
pushContent.append("运单号:").append(waybillNo).append("\n");
|
||||
|
||||
// 调用企业微信推送接口(参考WxtsUtil的实现)
|
||||
|
||||
@@ -120,10 +120,26 @@ public class LogisticsServiceImpl implements ILogisticsService {
|
||||
*/
|
||||
private void sendEnterprisePushNotification(JDOrder order, String waybillNo) {
|
||||
try {
|
||||
// 构建推送消息内容(只包含:型号、收货地址、运单号)
|
||||
// 构建推送消息内容
|
||||
StringBuilder pushContent = new StringBuilder();
|
||||
|
||||
// 第一行:分销标识(F或PDD)
|
||||
String distributionMark = order.getDistributionMark() != null ? order.getDistributionMark() : "未知";
|
||||
pushContent.append(distributionMark).append("\n");
|
||||
|
||||
// PDD订单包含第三方单号,F订单不包含
|
||||
if ("PDD".equals(distributionMark)) {
|
||||
String thirdPartyOrderNo = order.getThirdPartyOrderNo();
|
||||
if (thirdPartyOrderNo != null && !thirdPartyOrderNo.trim().isEmpty()) {
|
||||
pushContent.append("第三方单号:").append(thirdPartyOrderNo).append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
// 型号
|
||||
pushContent.append("型号:").append(order.getModelNumber() != null ? order.getModelNumber() : "无").append("\n");
|
||||
// 收货地址
|
||||
pushContent.append("收货地址:").append(order.getAddress() != null ? order.getAddress() : "无").append("\n");
|
||||
// 运单号
|
||||
pushContent.append("运单号:").append(waybillNo).append("\n");
|
||||
|
||||
// 调用企业微信推送接口
|
||||
|
||||
Reference in New Issue
Block a user