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")); ApsConfigData apsConfig = apsConfigService.getApsConfigByClientId(client.getString("client_id"));
if (apsConfig == null) { 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("aps_config_id", apsConfig.getId());
client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch()); client.put("alipay_cn_switch", apsConfig.getAlipayCnSwitch());
}
return client; return client;
} }

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

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

@ -2487,7 +2487,17 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
// $scope.init.channel[channel] = true // $scope.init.channel[channel] = true
// return // return
// } // }
if ($scope.paymentInfo.alipay_cn_switch) { 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({ commonDialog.alert({
title: 'ERROR', title: 'ERROR',
content: "Please switch AlipayCN to Alipay channel, and then close Alipay+(APS) channel", content: "Please switch AlipayCN to Alipay channel, and then close Alipay+(APS) channel",
@ -2496,6 +2506,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
$scope.loadPartnerPaymentInfo() $scope.loadPartnerPaymentInfo()
return; return;
} }
}
$scope.getComplianceInfo() $scope.getComplianceInfo()
if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) { if ($scope.paymentInfo['enable_wechat'] && channel == 'wechat' && $scope.paymentInfo.open_status == 5 && info.length > 0) {
commonDialog commonDialog

@ -376,10 +376,7 @@
</tbody> </tbody>
</table> </table>
</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> </div>
</div> </div>
</div> </div>
@ -511,4 +508,9 @@
</div> </div>
</div> </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> </div>

@ -549,7 +549,7 @@
</div> </div>
<!--AlipayCN支付渠道切换--> <!--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-heading">AlipayCN Channel Configuration</div>
<div class="panel-body"> <div class="panel-body">
<div class="form-horizontal"> <div class="form-horizontal">

Loading…
Cancel
Save