diff --git a/cweb/src/main/java/com/cweb/controller/TestController.java b/cweb/src/main/java/com/cweb/controller/TestController.java index ef8cd3c..2c6bd7c 100644 --- a/cweb/src/main/java/com/cweb/controller/TestController.java +++ b/cweb/src/main/java/com/cweb/controller/TestController.java @@ -149,14 +149,14 @@ public class TestController { } } - @RequestMapping(value="/saasTest1",method = RequestMethod.GET) + @RequestMapping(value="/saasUpdateFee",method = RequestMethod.GET) @ResponseBody - @ApiOperation(value = "saasTest") - public ResponseData saasTest1(@RequestParam(value = "reviewRelatedId", required = true) String reviewRelatedId) { + @ApiOperation(value = "saasUpdateFee") + public ResponseData saasUpdateFee(@RequestParam(value = "merId", required = true) Long merId) { try { // return ResponseMsgUtil.success(saasMerService.updateReview(reviewRelatedId)); - return ResponseMsgUtil.success(saasMerService.getMerSettle("122952457")); + return ResponseMsgUtil.success(saasMerService.updateFee(merId)); } catch (Exception e) { log.error(e.getMessage(), e); @@ -164,6 +164,19 @@ public class TestController { } } + @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="/soundSendMsg",method = RequestMethod.GET) @ResponseBody @@ -282,6 +295,22 @@ public class TestController { } } + @RequestMapping(value="/generate",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "图片上传") + public ResponseData generate() { + try { + /* Configuration cfg = new Configuration(); + Template template = configuration.getTemplate("indexHTKWECHAT_PAY.html");*/ + + return ResponseMsgUtil.success(null); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + @RequestMapping(value = "/rebate", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "返利") diff --git a/schedule/src/main/java/com/hfkj/schedule/Merchant.java b/schedule/src/main/java/com/hfkj/schedule/Merchant.java index 441b36f..1c05c8d 100644 --- a/schedule/src/main/java/com/hfkj/schedule/Merchant.java +++ b/schedule/src/main/java/com/hfkj/schedule/Merchant.java @@ -51,6 +51,12 @@ public class Merchant { @Resource private BsMerContractRecordMsgService merContractRecordMsgService; + @Resource + private BsMerSettleAcctApplyService merSettleAcctApplyService; + + @Resource + private BsMerSettleAcctService merSettleAcctService; + @Resource private WeiXinMerService weiXinMerService; @@ -267,4 +273,70 @@ public class Merchant { } + /** + * 修改结算审批查询并更新 + */ + @SneakyThrows + @Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次 + public void lklSettleAcctApply() { + Map param = new HashMap<>(); + param.put("applyNoIsNotNull", true); + param.put("status", MerSettleAcctApplyStatus.status2.getNumber()); + List applyList = merSettleAcctApplyService.getApplyList(param); + for (BsMerSettleAcctApply merSettleAcctApply : applyList) { + try { + JSONObject responseObj = saasMerService.updateReview(merSettleAcctApply.getApplyNo()); + if (responseObj != null) { + if (responseObj.getString("reviewPass").equals("PASS")) { + + BsMerSettleAcct settle = merSettleAcctService.getMerSettleByMerId(merSettleAcctApply.getMerId()); + if (settle != null) { + settle.setStatus(0); + merSettleAcctService.editMerSettleAcct(settle); + + settle = new BsMerSettleAcct(); + settle.setMerId(settle.getMerId()); + settle.setSettleType(merSettleAcctApply.getSettleType()); + settle.setBankCardImg(merSettleAcctApply.getBankCardImg()); + settle.setBankName(merSettleAcctApply.getBankName()); + settle.setBankCardNo(merSettleAcctApply.getBankCardNo()); + settle.setBankCardHolder(merSettleAcctApply.getBankCardHolder()); + + settle.setOpenningBankCityCode(merSettleAcctApply.getOpenningBankCityCode()); + settle.setOpenningBankCityName(merSettleAcctApply.getOpenningBankCityName()); + settle.setOpenningBankAreaCode(merSettleAcctApply.getOpenningBankAreaCode()); + settle.setOpenningBankAreaName(merSettleAcctApply.getOpenningBankAreaName()); + settle.setOpenningBankProvinceCode(merSettleAcctApply.getOpenningBankProvinceCode()); + settle.setOpenningBankProvinceName(merSettleAcctApply.getOpenningBankProvinceName()); + settle.setOpenningBankCode(merSettleAcctApply.getOpenningBankCode()); + settle.setOpenningBankName(merSettleAcctApply.getOpenningBankName()); + settle.setOpenningBankLicenseUrl(merSettleAcctApply.getOpenningBankLicenseUrl()); + settle.setClearingBankCode(merSettleAcctApply.getClearingBankCode()); + + settle.setSettleIdCardName(merSettleAcctApply.getSettleIdCardName()); + settle.setSettleIdCardNo(merSettleAcctApply.getSettleIdCardNo()); + settle.setSettleIdCardAddress(merSettleAcctApply.getSettleIdCardAddress()); + settle.setSettleIdCardPortraitImg(merSettleAcctApply.getSettleIdCardPortraitImg()); + settle.setSettleIdCardNationalEmblemImg(merSettleAcctApply.getSettleIdCardNationalEmblemImg()); + settle.setSettleIdPeriodType(merSettleAcctApply.getSettleIdPeriodType()); + settle.setSettleIdCardPeriodStart(merSettleAcctApply.getSettleIdCardPeriodStart()); + settle.setSettleIdCardPeriodEnd(merSettleAcctApply.getSettleIdCardPeriodEnd()); + merSettleAcctService.editMerSettleAcct(settle); + } + + merSettleAcctApply.setStatus(MerSettleAcctApplyStatus.status3.getNumber()); + merSettleAcctApplyService.editData(merSettleAcctApply); + + } else if (responseObj.getString("reviewPass").equals("UNPASS")) { + merSettleAcctApply.setStatus(MerSettleAcctApplyStatus.status4.getNumber()); + merSettleAcctApply.setRejectReason(responseObj.getString("reviewResult")); + merSettleAcctApplyService.editData(merSettleAcctApply); + } + } + } catch (Exception e) { + + } + } + } + } diff --git a/service/pom.xml b/service/pom.xml index bdcf515..b9b8ebb 100644 --- a/service/pom.xml +++ b/service/pom.xml @@ -364,6 +364,11 @@ alipay-sdk-java 4.34.0.ALL + + org.freemarker + freemarker + 2.3.23 +