fix 1商户费率配置页面调整

2alipayCN渠道初始化逻辑调整
master
Todking 3 years ago
parent e3a33e5faa
commit e5898e5ec6

@ -563,10 +563,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
}
ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id"));
if (apsConfig == null) {
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor());
if(client.getBoolean("enable_alipay")){
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor().setAlipayCnSwitch(false));
}else if(client.getBoolean("enable_alipayaps")){
apsConfig = apsConfigService.saveApsConfigClientId(manager.getString("manager_id"), client.getString("client_id"), new ApsConfigDescriptor().setAlipayCnSwitch(true));
}
}
if(apsConfig != null){
client.put("aps_config_id", apsConfig.getId());
client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch());
}
client.put("aps_config_id", apsConfig.getId());
client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch());
return client;
}

@ -11,5 +11,5 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
public class ApsConfigDescriptor {
private Boolean alipayCnSwitch = false;
private Boolean alipayCnSwitch;
}

@ -29,8 +29,6 @@ public class ApsConfigData implements Serializable {
private String clientId;
private Boolean enableAlipayAps;
private Boolean alipayCnSwitch;
public static ApsConfigData saveData(String managerId, String clientId, ApsConfigDescriptor apsConfigDescriptor) {

@ -2487,14 +2487,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// $scope.init.channel[channel] = true
// return
// }
if ($scope.paymentInfo.alipay_cn_switch) {
commonDialog.alert({
title: 'ERROR',
content: "Please switch AlipayCN to Alipay channel, and then close Alipay+(APS) channel",
type: 'error',
})
$scope.loadPartnerPaymentInfo()
return;
if($scope.paymentInfo.aps_config_id){
if(channel == 'alipay' && !$scope.paymentInfo.alipay_cn_switch){
commonDialog.alert({
title: 'ERROR',
content: "Please switch AlipayCN to Alipay channel, and then close Alipay channel",
type: 'error',
})
$scope.loadPartnerPaymentInfo()
return;
}
if (channel == 'alipayaps' && $scope.paymentInfo.alipay_cn_switch) {
commonDialog.alert({
title: 'ERROR',
content: "Please switch AlipayCN to Alipay channel, and then close Alipay+(APS) channel",
type: 'error',
})
$scope.loadPartnerPaymentInfo()
return;
}
}
$scope.getComplianceInfo()
if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) {

@ -376,10 +376,7 @@
</tbody>
</table>
</div>
<div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope"
ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
</div>
</div>
</div>
</div>
@ -511,4 +508,9 @@
</div>
</div>
</div>
<div style="text-align: center">
<a role="button" style="margin-bottom: 25px;" class="btn btn-success btn-sm ng-scope"
ng-if="('10'|withRole)" ng-click="complianceCheck()">check</a>
</div>
</div>

@ -549,7 +549,7 @@
</div>
<!--AlipayCN支付渠道切换-->
<div class="panel panel-default" ng-if="(('111'|withRole))">
<div class="panel panel-default" ng-if="(('111'|withRole)) && paymentInfo.aps_config_id">
<div class="panel-heading">AlipayCN Channel Configuration</div>
<div class="panel-body">
<div class="form-horizontal">

Loading…
Cancel
Save