Merge branch 'master' into dev

yy_dev
胡锐 1 year ago
commit 09da7e20b2
  1. 2
      cweb/src/main/java/com/cweb/controller/BsBankActivityController.java
  2. 20
      cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java
  3. 21
      service/src/main/java/com/hfkj/service/impl/BsBankActivityRosterServiceImpl.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, "");
}

@ -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<String, Object> 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 = "创建申请修改结算")

@ -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);
@ -81,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();

Loading…
Cancel
Save