增加common_sub_merchant_id switch

master
yuan 7 years ago
parent 858494290f
commit 6866c263ed

@ -233,6 +233,11 @@ public class PartnerManageController {
clientManager.refusePartner(clientMoniker, manager, refuse.getString("refuse_remark"));
}
@ManagerMapping(value = "/{clientMoniker}/common_sub_merchant_id", method = RequestMethod.PUT, role = {ManagerRole.OPERATOR, ManagerRole.BD_USER})
public void switchCommonSubMerchantId(@PathVariable String clientMoniker, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchPermission(manager, clientMoniker, "common_sub_merchant_id", pass.getBooleanValue("allow"));
}
@ManagerMapping(value = "/{clientMoniker}/channels/{channel}/permission", method = RequestMethod.PUT, role = {ManagerRole.SERVANT, ManagerRole.DEVELOPER})
public void switchChannelPermission(@PathVariable String clientMoniker, @PathVariable String channel, @RequestBody JSONObject pass, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) {
clientManager.switchChannelPermission(manager, clientMoniker, channel, pass.getBooleanValue("allow"));

@ -1202,7 +1202,25 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
})
};
$scope.init = {jsapi: false, gateway: false, offline: false, refund: false, channel: {}};
$scope.init = {jsapi: false, gateway: false, offline: false, refund: false,common_sub_merchant_id:false, channel: {}};
$scope.switchCommonSubMerchantId = function () {
if (!$scope.paymentInfo) {
return;
}
if (!$scope.init.common_sub_merchant_id) {
$scope.init.common_sub_merchant_id = true;
return;
}
$http.put('/sys/partners/' + $scope.partner.client_moniker + '/common_sub_merchant_id', {allow: $scope.paymentInfo.common_sub_merchant_id}).then(function () {
$scope.loadPartnerPaymentInfo();
}, function (resp) {
commonDialog.alert({
title: 'Failed to change common_sub_merchant_id permission status',
content: resp.data.message,
type: 'error'
})
})
};
$scope.toggleChannel = function (channel) {
if (!channel) {
return;

@ -39,6 +39,12 @@
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Common Sub Merchant Id</label>
<div class="col-xs-9">
<input type="checkbox" ng-model="paymentInfo.common_sub_merchant_id" bs-switch switch-change="switchCommonSubMerchantId()">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">Max Order Amount</label>
<div class="col-sm-9">

Loading…
Cancel
Save