|
|
@ -102,4 +102,40 @@ public class LaKaLaConfigService { |
|
|
|
return responseBody.getJSONObject("respData"); |
|
|
|
return responseBody.getJSONObject("respData"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 商户报备结果查询 |
|
|
|
|
|
|
|
* @param merCupNo |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public JSONObject queryWechatConfig(String subMerchantId,String merCupNo) { |
|
|
|
|
|
|
|
// 请求参数
|
|
|
|
|
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
|
|
|
|
param.put("timestamp", new Date().getTime()); |
|
|
|
|
|
|
|
param.put("rnd", GenerateUtil.generateRandomString(18)); |
|
|
|
|
|
|
|
param.put("ver", "1.0.0"); |
|
|
|
|
|
|
|
param.put("reqId", new Date().getTime()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
|
|
|
|
map.put("version", "1.0"); |
|
|
|
|
|
|
|
map.put("subMerchantId", subMerchantId); |
|
|
|
|
|
|
|
map.put("merchantNo", merCupNo); |
|
|
|
|
|
|
|
param.put("reqData", map); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 生成签名
|
|
|
|
|
|
|
|
Map<String, Object> reqParam = LaKaLaConfig.generateSignParamsV2(JSONObject.parseObject(JSONObject.toJSONString(param))); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 头部参数
|
|
|
|
|
|
|
|
Map<String, Object> heard = new HashMap<>(); |
|
|
|
|
|
|
|
heard.put("Authorization", reqParam.get("Authorization")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject responseBody = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLkl_request_url() + "/api/v2/mms/sme/queryWechatConfig", param, heard); |
|
|
|
|
|
|
|
System.out.println("Authorization" + JSONObject.toJSONString(reqParam.get("Authorization"))); |
|
|
|
|
|
|
|
System.out.println("request:" + JSONObject.toJSONString(param)); |
|
|
|
|
|
|
|
System.out.println("response:" + responseBody.toJSONString()); |
|
|
|
|
|
|
|
if (!responseBody.getString("retCode").equals("000000")) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseBody.getString("retMsg")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return responseBody.getJSONObject("respData"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|