LogicRPCServiceImpl.java
1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package com.diligrp.website.rpc.impl;
import com.alibaba.fastjson.JSONObject;
import com.diligrp.website.rpc.APIClient;
import com.diligrp.website.rpc.LogicRPCService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* <B>Description</B> 物流接口
* <B>Copyright</B> Copyright (c) 2014 www.diligrp.com All rights reserved. <br />
* 本软件源代码版权归地利集团,未经许可不得任意复制与传播.<br />
* <B>Company</B> 地利集团
*
* @author LaiKui
* @createTime 2016年1月5日 下午5:32:34
*/
@Service
public class LogicRPCServiceImpl implements LogicRPCService {
private String wlHost;
private Map<String, String> header;
private static final Logger log = LoggerFactory.getLogger(LogicRPCServiceImpl.class);
@Override
public JSONObject shopLosOrdersCount(Long shopId) {
String url = wlHost + "/api/company/pc/shop/shopLosOrdersCount";
JSONObject object=new JSONObject();
object.put("id",shopId);
JSONObject res = null;
if (shopId != null) {
try{
res = JSONObject.parseObject(APIClient.postJson(url, object, getHeader()));
}catch (Exception e){
log.error("调用物流未完结订单接口出错!");
e.printStackTrace();
}
}
return res;
}
public void setWlHost(String wlHost) {
this.wlHost = wlHost;
}
public Map<String, String> getHeader() {
return header;
}
public void setHeader(Map<String, String> header) {
this.header = header;
}
}