Commit e9c481a0 authored by liboyang's avatar liboyang

修改bug

parent 070443a7
...@@ -239,7 +239,7 @@ public class AdminApi { ...@@ -239,7 +239,7 @@ public class AdminApi {
SysPermission sysPermission = new SysPermission(); SysPermission sysPermission = new SysPermission();
sysPermission.setName(jsonObject.getString("name")); sysPermission.setName(jsonObject.getString("name"));
sysPermission.setResource_type(jsonObject.getString("resourceType")); sysPermission.setResource_type(jsonObject.getString("resourceType"));
// sysPermission.setUrl(jsonObject.getString("url")); sysPermission.setUrl(jsonObject.getString("url"));
sysPermission.setPermission(jsonObject.getString("permission")); sysPermission.setPermission(jsonObject.getString("permission"));
// sysPermission.setParent_id(Long.parseLong(jsonObject.getString("parentId"))); // sysPermission.setParent_id(Long.parseLong(jsonObject.getString("parentId")));
// if(jsonObject.getString("parentId").equals(str)){ // if(jsonObject.getString("parentId").equals(str)){
...@@ -401,7 +401,7 @@ public class AdminApi { ...@@ -401,7 +401,7 @@ public class AdminApi {
sysPermission.setId(Integer.parseInt(jsonObject.getString("id"))); sysPermission.setId(Integer.parseInt(jsonObject.getString("id")));
sysPermission.setName(jsonObject.getString("name")); sysPermission.setName(jsonObject.getString("name"));
sysPermission.setResource_type(jsonObject.getString("resourceType")); sysPermission.setResource_type(jsonObject.getString("resourceType"));
// sysPermission.setUrl(jsonObject.getString("url")); sysPermission.setUrl(jsonObject.getString("url"));
sysPermission.setPermission(jsonObject.getString("permission")); sysPermission.setPermission(jsonObject.getString("permission"));
// sysPermission.setParent_id(Long.parseLong(parentId)); // sysPermission.setParent_id(Long.parseLong(parentId));
// if(parentId.equals(str)){ // if(parentId.equals(str)){
......
...@@ -17,7 +17,7 @@ public interface SysPermissionMapper{ ...@@ -17,7 +17,7 @@ public interface SysPermissionMapper{
* @param sysPermission * @param sysPermission
*/ */
@Insert("INSERT INTO sys_permission (id,available,name,parent_id,parent_ids,permission,resource_type,url)\n" + @Insert("INSERT INTO sys_permission (id,available,name,parent_id,parent_ids,permission,resource_type,url)\n" +
"VALUES (PERMISSION_seq.nextval,0,#{name},'0','0/',#{permission},#{resource_type},'')") "VALUES (PERMISSION_seq.nextval,0,#{name},'0','0/',#{permission},#{resource_type},#{url})")
public void addPermissionByMap(SysPermission sysPermission); public void addPermissionByMap(SysPermission sysPermission);
/** /**
......
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
<label>名称</label> <label>名称</label>
<input type="text" class="form-control" ng-model="thisPerm.name" ng-value="thisPerm.name" required > <input type="text" class="form-control" ng-model="thisPerm.name" ng-value="thisPerm.name" required >
</div> </div>
<div class="form-group">
<label>路径</label>
<input type="text" class="form-control" ng-model="thisPerm.url" ng-value="thisPerm.url" required >
</div>
<div class="form-group"> <div class="form-group">
<label>权限字符串</label> <label>权限字符串</label>
<input type="text" class="form-control" ng-model="thisPerm.permission" ng-value="thisPerm.permission" required > <input type="text" class="form-control" ng-model="thisPerm.permission" ng-value="thisPerm.permission" required >
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<th>ID</th> <th>ID</th>
<th>权限</th> <th>权限</th>
<th>名称</th> <th>名称</th>
<!--<th>路径</th>--> <th>路径</th>
<th>类型</th> <th>类型</th>
<!--<th>父类id</th>--> <!--<th>父类id</th>-->
<!--<th>父类id树</th>--> <!--<th>父类id树</th>-->
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<td>{{permission.id}}</td> <td>{{permission.id}}</td>
<td>{{permission.permission}}</td> <td>{{permission.permission}}</td>
<td>{{permission.name}}</td> <td>{{permission.name}}</td>
<!--<td>{{permission.url}}</td>--> <td>{{permission.url}}</td>
<td>{{permission.resource_type}}</td> <td>{{permission.resource_type}}</td>
<!--<td>{{permission.parent_id}}</td>--> <!--<td>{{permission.parent_id}}</td>-->
<!--<td>{{permission.parent_ids}}</td>--> <!--<td>{{permission.parent_ids}}</td>-->
......
...@@ -69,7 +69,7 @@ app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state', ...@@ -69,7 +69,7 @@ app.controller('permissionListCtrl', ['$scope','$rootScope', '$http', '$state',
var jsonPerm = {}; var jsonPerm = {};
jsonPerm.id = $scope.thisPerm.id; jsonPerm.id = $scope.thisPerm.id;
jsonPerm.name=$scope.thisPerm.name; jsonPerm.name=$scope.thisPerm.name;
// jsonPerm.url=$scope.thisPerm.url; jsonPerm.url=$scope.thisPerm.url;
jsonPerm.permission =$scope.thisPerm.permission; jsonPerm.permission =$scope.thisPerm.permission;
jsonPerm.resourceType=resourceType; jsonPerm.resourceType=resourceType;
console.log(jsonPerm) console.log(jsonPerm)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment