|
|
|
@ -165,6 +165,51 @@ public class SzwhApiUtils { |
|
|
|
return json; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 查询资源下载状态 |
|
|
|
* @param batchcode |
|
|
|
* @param isliCode |
|
|
|
* @param userid |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static JSONObject getResStatus(String batchcode,String isliCode,String userid){ |
|
|
|
String entHost= ProperUtils.getSzwhProp("REAL_URL");//委托系统主机
|
|
|
|
String url=entHost+"/catalogs/v1/query/status/"+batchcode |
|
|
|
+"/"+isliCode+"/"+userid; |
|
|
|
// 使用的token
|
|
|
|
String sign=SignUtils.createSign("distribute"); |
|
|
|
Map hmap = new HashMap(); |
|
|
|
hmap.put("dist_token",sign); |
|
|
|
hmap.put("Content-Type","application/json"); |
|
|
|
JSONObject rtjson = RequestUtils.GetData(url,hmap,true); |
|
|
|
return rtjson; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取撤销委托信息 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public static JSONObject getCancelWaiting(){ |
|
|
|
String channelUser=ProperUtils.getSzwhProp("CHANNEL_ISLI"); |
|
|
|
String tlangHost= ProperUtils.getSzwhProp("TIANLANG_ENTRUST_URL"); |
|
|
|
//todo v2:测试环境 v1:正式环境
|
|
|
|
//目标为买方
|
|
|
|
String url=tlangHost+"/consignation/v2/cancel/waiting"; |
|
|
|
log.info("获取撤销委托:"+url); |
|
|
|
// 使用的token
|
|
|
|
String sign=SignUtils.createSign("apply"); |
|
|
|
Map hmap = new HashMap(); |
|
|
|
hmap.put("cloudhub_token",sign); |
|
|
|
hmap.put("Content-Type","application/json"); |
|
|
|
hmap.put("channel_isli_flag",channelUser); |
|
|
|
// 发送参数
|
|
|
|
Map postMap = new HashMap(); |
|
|
|
// convet to json string
|
|
|
|
JSONObject postJson = new JSONObject(postMap); |
|
|
|
JSONObject json = RequestUtils.postData(url,postJson.toString(),hmap); |
|
|
|
return json; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 请求申请合约关联编码 接口1.5 |
|
|
|
* @param goodsIsli |
|
|
|
|