|
@@ -161,8 +161,10 @@ public class EfastOrderServiceImpl implements EfastOrderService {
|
|
|
List<OrderItem> items = adminOrderService.getShopOrderItemByOrderId(order.getSalesOrderid());
|
|
|
|
|
|
// request url
|
|
|
- String url = NameUtils.getConfig("efast_base_url");
|
|
|
-
|
|
|
+ //String url = NameUtils.getConfig("efast_base_url");
|
|
|
+ // "http://test.iamberry.com//mallorder/order";
|
|
|
+ String url = NameUtils.getConfig("rst_base_url");
|
|
|
+
|
|
|
// set Requeset Data
|
|
|
Map<String, String> requestData = new HashMap<String, String>();
|
|
|
|
|
@@ -206,11 +208,12 @@ public class EfastOrderServiceImpl implements EfastOrderService {
|
|
|
/**
|
|
|
* 系统级参数
|
|
|
*/
|
|
|
- requestData.put("app_nick", NameUtils.getConfig("app_nick"));
|
|
|
+ /*requestData.put("app_nick", NameUtils.getConfig("app_nick"));
|
|
|
requestData.put("app_key", NameUtils.getConfig("app_key"));
|
|
|
requestData.put("app_secret", NameUtils.getConfig("app_secret"));
|
|
|
requestData.put("timestamp",DateTimeUtil.format(new Date(),"yyyyMMddHHmmss"));
|
|
|
- requestData.put("app_act", message.getServiceOtherMessage()); // "efast.trade.new.add"
|
|
|
+ requestData.put("app_act", message.getServiceOtherMessage());*/ // "efast.trade.new.add"
|
|
|
+ requestData.put("app_act", "rst.trade.new.add");
|
|
|
|
|
|
/**
|
|
|
* 订单基本信息
|
|
@@ -276,7 +279,7 @@ public class EfastOrderServiceImpl implements EfastOrderService {
|
|
|
orderData.put("sd_id", sd_id); // 对应 efast 店铺 id
|
|
|
orderData.put("shipping_fee", 0); // 快递费
|
|
|
orderData.put("shipping_name", "yto"); // 快递公司代码
|
|
|
- orderData.put("tel", ""); // 我司电话
|
|
|
+ orderData.put("tel", order.getSalesAddressTel()); // 我司电话
|
|
|
orderData.put("to_buyer", ""); // 商家备注
|
|
|
orderData.put("total_amount", (order.getSalesAmount()/100.0)); // 订单总额
|
|
|
orderData.put("user_name", order.getSalesOpenid()); // 买家账户 百胜根据user_name来判断是否有重复,传openId是为了防止重复
|
|
@@ -284,7 +287,7 @@ public class EfastOrderServiceImpl implements EfastOrderService {
|
|
|
|
|
|
|
|
|
com.fasterxml.jackson.databind.ObjectMapper mapper = new ObjectMapper();
|
|
|
- String orderDataStr = null;;
|
|
|
+ String orderDataStr = null;
|
|
|
try {
|
|
|
orderDataStr = mapper.writeValueAsString(orderData);
|
|
|
} catch (JsonProcessingException e2) {
|
|
@@ -294,7 +297,7 @@ public class EfastOrderServiceImpl implements EfastOrderService {
|
|
|
requestData.put("info", orderDataStr);
|
|
|
|
|
|
try {
|
|
|
- String result = HttpClient431Util.doGet(requestData, url);
|
|
|
+ String result = HttpClient431Util.doPost(requestData, url);
|
|
|
result = StringEscapeUtils.unescapeJava(result); // unicode 编码
|
|
|
logger.info("add-推送订单号为:" + order.getSalesOrderid() + "的订单,百胜返回信息:" + result);
|
|
|
// parse JSON String to Object
|
|
@@ -410,7 +413,7 @@ public class EfastOrderServiceImpl implements EfastOrderService {
|
|
|
|
|
|
|
|
|
com.fasterxml.jackson.databind.ObjectMapper mapper = new ObjectMapper();
|
|
|
- String orderDataStr = null;;
|
|
|
+ String orderDataStr = null;
|
|
|
try {
|
|
|
orderDataStr = mapper.writeValueAsString(orderData);
|
|
|
} catch (JsonProcessingException e2) {
|