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);