|
|
|
@ -1589,6 +1589,20 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void switchChannelPermission(JSONObject manager, String clientMoniker, String channel, boolean allow) {
|
|
|
|
|
PayChannel payChannel = PayChannel.fromChannelCode(channel);
|
|
|
|
|
if(payChannel == PayChannel.ALIPAY_APS){
|
|
|
|
|
ArrayList<String> apsChannels = new ArrayList<>();
|
|
|
|
|
apsChannels.add(PayChannel.ALIPAY_APS_IN_STORE.getChannelCode());
|
|
|
|
|
apsChannels.add(PayChannel.ALIPAY_APS_CASHIER.getChannelCode());
|
|
|
|
|
apsChannels.forEach(apsChannel->{
|
|
|
|
|
extracted(manager, clientMoniker, apsChannel, allow);
|
|
|
|
|
});
|
|
|
|
|
}else {
|
|
|
|
|
extracted(manager, clientMoniker, channel, allow);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void extracted(JSONObject manager, String clientMoniker, String channel, boolean allow) {
|
|
|
|
|
for (PaymentChannelApi channelApi : paymentApi.channels()) {
|
|
|
|
|
if (channelApi.channel().equalsIgnoreCase(channel)) {
|
|
|
|
|
JSONObject client = getClientInfoByMoniker(clientMoniker);
|
|
|
|
|