|
|
@@ -73,6 +73,13 @@ public class ProjectMainPaySettingService extends SuperService {
|
|
|
if (orgPaySettingInfo.getIsDefault() == null || !orgPaySettingInfo.getIsDefault()) {
|
|
|
return ResultContent.buildFail("选择的不是主账户类型");
|
|
|
}
|
|
|
+
|
|
|
+ // 子商户信息
|
|
|
+ ProjectOrgPaySettingInfo childPaySettingInfo = null;
|
|
|
+ if (StringUtils.isNotEmpty(param.getChildPaySettingInfoId())) {
|
|
|
+ childPaySettingInfo = projectPaySettingInfoDao.findTopById(param.getChildPaySettingInfoId());
|
|
|
+ }
|
|
|
+
|
|
|
if (param.getSettlementRulesType() == SettlementRulesType.Dn) {
|
|
|
if (StringUtils.isEmpty(param.getDnTimeStr())) {
|
|
|
return ResultContent.buildFail("dnTimeStr不能为空");
|
|
|
@@ -104,14 +111,15 @@ public class ProjectMainPaySettingService extends SuperService {
|
|
|
return ResultContent.buildFail("项目分成和机构分成之和不等100");
|
|
|
}
|
|
|
|
|
|
-// Long minWithdraw = param.getMinWithdraw();
|
|
|
-// Long maxWithdraw = param.getMaxWithdraw();
|
|
|
-// if (minWithdraw <= 0 || maxWithdraw <= 0) {
|
|
|
-// return ResultContent.buildFail("minWithdraw或maxWithdraw不能小于等于0");
|
|
|
-// }
|
|
|
-// if (minWithdraw > maxWithdraw) {
|
|
|
-// return ResultContent.buildFail("minWithdraw不能大于maxWithdraw");
|
|
|
-// }
|
|
|
+ // 提现额度
|
|
|
+ Long minWithdraw = param.getMinWithdraw();
|
|
|
+ Long maxWithdraw = param.getMaxWithdraw();
|
|
|
+ if (minWithdraw <= 0 || maxWithdraw <= 0) {
|
|
|
+ return ResultContent.buildFail("minWithdraw或maxWithdraw不能小于等于0");
|
|
|
+ }
|
|
|
+ if (minWithdraw > maxWithdraw) {
|
|
|
+ return ResultContent.buildFail("minWithdraw不能大于maxWithdraw");
|
|
|
+ }
|
|
|
|
|
|
ProjectMainPaySetting mainPaySetting = projectMainPaySettingDao.findTopByProjectOidAndChannelType(param.getProjectOid(), orgPaySettingInfo.getChannelType());
|
|
|
if (ObjectUtils.isEmpty(mainPaySetting)) {
|
|
|
@@ -119,9 +127,14 @@ public class ProjectMainPaySettingService extends SuperService {
|
|
|
}
|
|
|
BeanUtils.copyProperties(param, mainPaySetting);
|
|
|
|
|
|
+ // 主商户信息
|
|
|
mainPaySetting.setPaySettingInfo(orgPaySettingInfo);
|
|
|
mainPaySetting.setBelongOig(orgPaySettingInfo.getBelongOig());
|
|
|
mainPaySetting.setBelongOrgName(orgPaySettingInfo.getBelongOrgName());
|
|
|
+
|
|
|
+ // 主账户的子商户信息
|
|
|
+ mainPaySetting.setChildPaySettingInfo(childPaySettingInfo);
|
|
|
+
|
|
|
mainPaySetting.setChannelType(orgPaySettingInfo.getChannelType());
|
|
|
mainPaySetting.setPaymentChannelType(orgPaySettingInfo.getPaymentChannelType());
|
|
|
|
|
|
@@ -259,6 +272,8 @@ public class ProjectMainPaySettingService extends SuperService {
|
|
|
model.setPaySettingInfoName(paySettingInfo.getName());
|
|
|
}
|
|
|
model.setSettingInfoModel(projectPaySettingService.toModel(entity.getPaySettingInfo()));
|
|
|
+
|
|
|
+ model.setChildPaySettingInfo(projectPaySettingService.toModel(entity.getChildPaySettingInfo()));
|
|
|
}
|
|
|
return model;
|
|
|
}
|