Browse Source

Merge branch 'master' of http://git.iamberry.com/hexiugang/iamberry-common-parent

# Conflicts:
#	watero-rst-web/src/main/webapp/WEB-INF/views/cm/customer/order_list.ftl
wangxiang 7 years ago
parent
commit
6a633a66e6

+ 11 - 8
watero-wechat-service/src/main/java/com/iamberry/wechat/service/mq/EfastOrderServiceImpl.java

@@ -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) {

+ 2 - 0
watero-wechat-web/src/main/resources/platform.properties

@@ -118,6 +118,8 @@ sd_idt=001
 rst_base_url=http://test.iamberry.com/rst/mcahine/getMachineInfo?barCode=
 # efast_base_url
 efast_base_url=http://121.199.165.244/efast_test/efast_api/webservice/web/index.php
+# rst_base_url
+rst_base_url=http://test.iamberry.com//mallorder/order
 # order_field
 order_field=order_sn,deal_code,order_status,shipping_status,pay_status,process_status,is_send,is_locked,is_separate,consignee,address,zipcode,tel,mobile,shipping_name,pay_name,invoice_no,order_amount ,money_paid,user_id ,orders.goods_sn,orders.goods_name,orders.goods_number,orders.goods_price,orders.goods_barcode,orders.payment_ft,pay_time,to_buyer,postscript,order_amount,user_nick,money_paid,shipping_fee
 # binding downlod