提交代码

yy_dev
胡锐 1 year ago
parent fd919e66a6
commit 53c8bc055a
  1. 56
      bweb/src/main/java/com/bweb/controller/TestController.java
  2. 4
      cweb/src/main/java/com/cweb/controller/TestController.java
  3. 9
      service/src/main/java/com/hfkj/channel/saas/SaasMerService.java

@ -89,6 +89,62 @@ public class TestController {
@Resource
private LaKaLaTradeSeparateService laKaLaTradeSeparateService;
@RequestMapping(value="/saasUpdateFee",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "saasUpdateFee")
public ResponseData saasUpdateFee(@RequestParam(value = "merId", required = true) Long merId) {
try {
return ResponseMsgUtil.success(saasMerService.updateFee(merId));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryMerchantInfo",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "queryMerchantInfo")
public ResponseData queryMerchantInfo(@RequestParam(value = "customerNo", required = true) String customerNo) {
try {
return ResponseMsgUtil.success(saasMerService.merchantInfo(customerNo));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryFee",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "queryFee")
public ResponseData queryFee(@RequestParam(value = "merId", required = true) Long merId) {
try {
return ResponseMsgUtil.success(saasMerService.queryFee(merId));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/updateReview",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "updateReview")
public ResponseData updateReview(@RequestParam(value = "reviewRelatedId", required = true) String reviewRelatedId) {
try {
return ResponseMsgUtil.success(saasMerService.updateReview(reviewRelatedId));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/separate",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "separate")

@ -289,8 +289,8 @@ public class TestController {
// saasMerService.updateFee(Long.parseLong(id""));
}*/
// return ResponseMsgUtil.success("");
// return ResponseMsgUtil.success(saasMerService.updateFee(74L));
return ResponseMsgUtil.success(saasMerService.queryFee(85L));
return ResponseMsgUtil.success(saasMerService.updateFee(merId));
// return ResponseMsgUtil.success(saasMerService.queryFee(85L));
//return ResponseMsgUtil.success(saasMerService.updateReview(merId.toString()));
} catch (Exception e) {

@ -442,7 +442,7 @@ public class SaasMerService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "未找到平台商户号");
}
Map<String,Object> param = new HashMap<>();
param.put("productCode", "WECHAT_PAY");
param.put("productCode", "PAPER_CODE");
param.put("settlementType", "AUTOMATIC");
// 商户费率
List<Map<String, Object>> feesMapList = new ArrayList<>();
@ -452,6 +452,9 @@ public class SaasMerService {
feesMap = new HashMap<>();
feesMap.put("fee", rate.getRatePct());
feesMap.put("feeType", rate.getRateSaasTypeCode());
if (StringUtils.isNotBlank(rate.getExt1())) {
feesMap.put("topFee", rate.getExt1());
}
feesMapList.add(feesMap);
}
param.put("fees", feesMapList);
@ -483,12 +486,12 @@ public class SaasMerService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "未找到平台商户号");
}
Map<String,Object> param = new HashMap<>();
// param.put("productCode", "WECHAT_PAY");
param.put("productCode", "WECHAT_PAY");
Map<String,Object> header = new HashMap<>();
header.put("Authorization", "bearer " + saasCommon.getUpdateToken());
String doSaasGet = HttpsUtils.doSaasGet(SaasConfig.requestMerUrl + "channel/customer/update/fee/" + merPlatformNo.getPlatformNo(), param, header, false);
String doSaasGet = HttpsUtils.doSaasGet(SaasConfig.requestMerUrl + "channel/customer/update/fee/" + merPlatformNo.getPlatformNo(), param, header, true);
JSONObject responseObj = JSONObject.parseObject(doSaasGet);
System.out.println("商户号:" + merPlatformNo.getPlatformNo() + " " + merPlatformNo.getCupNo());
System.out.println("body:" + JSONObject.toJSONString(param));

Loading…
Cancel
Save