From b402b6d89a0b5c87566b952df531f52809b855cc Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 6 Jun 2023 14:56:21 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/BsBankActivityController.java | 2 +- .../controller/BsMerSettleAcctController.java | 20 +++++++++++++++++++ .../impl/BsBankActivityRosterServiceImpl.java | 16 +++++++++------ 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/cweb/src/main/java/com/cweb/controller/BsBankActivityController.java b/cweb/src/main/java/com/cweb/controller/BsBankActivityController.java index f02d07a..cee1a7e 100644 --- a/cweb/src/main/java/com/cweb/controller/BsBankActivityController.java +++ b/cweb/src/main/java/com/cweb/controller/BsBankActivityController.java @@ -135,8 +135,8 @@ public class BsBankActivityController { public ResponseData enrollActivity(@RequestBody JSONObject body) { try { if (body == null - || body.getLong("bankActivityId") == null || body.getLong("merId") == null + || body.getLong("bankActivityId") == null || StringUtils.isBlank(body.getString("branchBankNo"))) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } diff --git a/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java b/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java index 836f380..588a8d6 100644 --- a/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java +++ b/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java @@ -45,10 +45,30 @@ public class BsMerSettleAcctController { @Resource private BsMerSettleAcctApplyService merSettleAcctApplyService; @Resource + private BsMerSettleAcctService merSettleAcctService; + @Resource private BsMerService merService; @Resource private CommonService commonService; + @RequestMapping(value="/getSettleAcctByMer",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "根据商户查询结算") + public ResponseData getSettleAcctByMer(@RequestParam(value = "merId" , required = true) Long merId) { + try { + + Map param = new HashMap<>(); + param.put("mer", merService.getMerDetail(merId)); + param.put("merSettleAcct", merSettleAcctService.getMerSettleByMerId(merId)); + return ResponseMsgUtil.success(param); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/createApplyUpdateSettle",method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "创建申请修改结算") diff --git a/service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java index 9f7fc8a..015cad5 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java @@ -8,12 +8,10 @@ import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; import com.hfkj.dao.BsBankActivityRosterMapper; import com.hfkj.entity.*; -import com.hfkj.service.BsBankActivityRosterRateService; -import com.hfkj.service.BsBankActivityRosterService; -import com.hfkj.service.BsBankActivityService; -import com.hfkj.service.BsMerPlatformNoService; +import com.hfkj.service.*; import com.hfkj.sysenum.PlatformTypeEnum; import org.apache.commons.collections4.ListUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @@ -28,7 +26,8 @@ import java.util.*; **/ @Service("bankActivityRosterService") public class BsBankActivityRosterServiceImpl implements BsBankActivityRosterService { - + @Resource + private CommonService commonService; @Resource private BsBankActivityRosterMapper bsBankActivityRosterMapper; @Resource @@ -70,8 +69,13 @@ public class BsBankActivityRosterServiceImpl implements BsBankActivityRosterServ if (merPlatform == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); } + // 客户经理 + String refereeId = commonService.getDictionaryCodeName("ACTIVITY_BRANCH_BANK_NO", branchBankNo); + if (StringUtils.isBlank(refereeId)) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "该支行暂无法报名"); + } // 渠道报名 - saasActivityService.customerRegisterActivity(activity.getActivityNo().toString(), branchBankNo, "110287", Arrays.asList(merPlatform.getCupNo())); + saasActivityService.customerRegisterActivity(activity.getActivityNo().toString(), branchBankNo, refereeId, Arrays.asList(merPlatform.getCupNo())); BsBankActivityRoster bankActivityRoster = new BsBankActivityRoster(); bankActivityRoster.setBankActivityId(bankActivityId); From 652d3ffbe72fa3f859ccb034467f30c75cf96ecc Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 6 Jun 2023 16:18:45 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hfkj/service/impl/BsBankActivityRosterServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java index 015cad5..c9e051e 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.java @@ -85,8 +85,11 @@ public class BsBankActivityRosterServiceImpl implements BsBankActivityRosterServ bankActivityRoster.setStatus(1); editData(bankActivityRoster); + // 延迟1秒 + Thread.sleep(1000); + // 查询渠道费率 - JSONArray rates = saasActivityService.queryCustomerRates(activity.getActivityNo().toString(), merPlatform.getPlatformNo()); + JSONArray rates = saasActivityService.queryCustomerRates(activity.getActivityNo().toString(), merPlatform.getCupNo()); for (Object obj : rates) { JSONObject rate = (JSONObject) obj; BsBankActivityRosterRate rosterRate = new BsBankActivityRosterRate();