init client permission

master
kira 6 years ago
parent 1dd8dcd8f6
commit 2eeb320dc3

@ -124,6 +124,8 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
moduleClientAdd.put("is_valid", true);
permissionClientModulesService.save(moduleClientAdd);
}
systemPackageCacheSupport.clearClientPermission(clientMoniker);
systemPackageCacheSupport.clearClientPermission(clientId);
}

@ -1,6 +1,8 @@
package au.com.royalpay.payment.manage.management.sysconfig.web;
import au.com.royalpay.payment.manage.management.sysconfig.beans.PermissionClientVO;
import au.com.royalpay.payment.manage.management.sysconfig.core.PermissionPartnerManager;
import au.com.royalpay.payment.manage.merchants.core.ClientManager;
import au.com.royalpay.payment.manage.system.core.PermissionClientModulesService;
import au.com.royalpay.payment.tools.CommonConsts;
@ -26,6 +28,10 @@ import javax.annotation.Resource;
public class SysPermissionClientController {
@Resource
private PermissionClientModulesService permissionClientModulesService;
@Resource
private PermissionPartnerManager permissionPartnerManager;
@Resource
private ClientManager clientManager;
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ -38,4 +44,11 @@ public class SysPermissionClientController {
permissionClientModulesService.switchValid(id,permissionClientVO.getIsValid(),loginManager);
}
@RequestMapping(value = "/init", method = RequestMethod.POST)
public void init(@RequestBody JSONObject param) {
JSONObject client = clientManager.getClientInfoByMoniker(param.getString("client_moniker"));
permissionPartnerManager.permissionClientModuleSave(client.getIntValue("client_id"),client.getString("client_moniker"));
}
}

@ -3107,6 +3107,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter
})
};
$scope.init = function () {
var params = {client_moniker:$scope.partner.client_moniker};
$http.post('/sys/permission/init',params).then(function (resp) {
},function (resp) {
commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'})
})
};
}]);

@ -1,6 +1,8 @@
<div class="row">
<div class="col-sm-12">
<h3 class="box-title" style="display: inherit">Permissions</h3>
<a role="button" type="button" class="btn btn-success" ng-click="init()">
初始化权限</a>
<div class="table-responsive col-sm-12">
<table class="table table-bordered table-hover table-striped">
<thead>

Loading…
Cancel
Save