Merge branch 'master' into dev

yy_dev
胡锐 1 year ago
commit 5cccc62dd2
  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 @Resource
private LaKaLaTradeSeparateService laKaLaTradeSeparateService; 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) @RequestMapping(value="/separate",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "separate") @ApiOperation(value = "separate")

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

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

Loading…
Cancel
Save