diff --git a/bweb/src/main/java/com/bweb/controller/TestController.java b/bweb/src/main/java/com/bweb/controller/TestController.java index f9b4835..570d103 100644 --- a/bweb/src/main/java/com/bweb/controller/TestController.java +++ b/bweb/src/main/java/com/bweb/controller/TestController.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") diff --git a/cweb/src/main/java/com/cweb/controller/TestController.java b/cweb/src/main/java/com/cweb/controller/TestController.java index 503dcd1..23463f7 100644 --- a/cweb/src/main/java/com/cweb/controller/TestController.java +++ b/cweb/src/main/java/com/cweb/controller/TestController.java @@ -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) { diff --git a/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java b/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java index 13ff0e4..ecaacc3 100644 --- a/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java +++ b/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java @@ -442,7 +442,7 @@ public class SaasMerService { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "未找到平台商户号"); } Map param = new HashMap<>(); - param.put("productCode", "WECHAT_PAY"); + param.put("productCode", "PAPER_CODE"); param.put("settlementType", "AUTOMATIC"); // 商户费率 List> 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 param = new HashMap<>(); - // param.put("productCode", "WECHAT_PAY"); + param.put("productCode", "WECHAT_PAY"); Map 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));