|
|
@ -195,14 +195,6 @@ public class BsMerController { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
|
|
|
|
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (userModel.getAccount().getObjectType() != SecUserObjectTypeEnum.type2.getCode()) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (body == null |
|
|
|
if (body == null |
|
|
|
|| body.getMerId() == null |
|
|
|
|| body.getMerId() == null |
|
|
|
|| body.getPayPlatform() == null) { |
|
|
|
|| body.getPayPlatform() == null) { |
|
|
@ -221,14 +213,13 @@ public class BsMerController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BsMerPayConfig merPayConfig; |
|
|
|
Map<String, Object> param = new HashMap<>(); |
|
|
|
|
|
|
|
param.put("merId", body.getMerId()); |
|
|
|
|
|
|
|
param.put("payPlatform", body.getPayPlatform()); |
|
|
|
|
|
|
|
|
|
|
|
if (body.getId() != null) { |
|
|
|
BsMerPayConfig merPayConfig = bsMerPayConfigService.queryDetailByMap(param); |
|
|
|
merPayConfig = bsMerPayConfigService.queryDetail(body.getId()); |
|
|
|
|
|
|
|
if (merPayConfig == null) { |
|
|
|
if (merPayConfig == null) { |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.CONTENT_NOT_FOUND, ""); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
merPayConfig = new BsMerPayConfig(); |
|
|
|
merPayConfig = new BsMerPayConfig(); |
|
|
|
merPayConfig.setCreateTime(new Date()); |
|
|
|
merPayConfig.setCreateTime(new Date()); |
|
|
|
} |
|
|
|
} |
|
|
@ -248,7 +239,7 @@ public class BsMerController { |
|
|
|
merPayConfig.setStatus(1); |
|
|
|
merPayConfig.setStatus(1); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (body.getId() != null) { |
|
|
|
if (merPayConfig.getId() != null) { |
|
|
|
bsMerPayConfigService.update(merPayConfig); |
|
|
|
bsMerPayConfigService.update(merPayConfig); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
bsMerPayConfigService.create(merPayConfig); |
|
|
|
bsMerPayConfigService.create(merPayConfig); |
|
|
|