Browse Source

权限: 更新描述字段逻辑

wangdy 8 years ago
parent
commit
59e05eb4ac

+ 1 - 1
src/main/java/com/uas/platform/b2c/common/account/model/ResourceItem.java

@@ -46,7 +46,7 @@ public class ResourceItem implements Serializable {
 	/**
 	 * 对资源的具体操作对象及行为的描述
 	 */
-	@Column(name = "item_desc")
+	@Column(name = "item_desc" , unique = true)
 	private String desc;
 
 	public Long getId() {

+ 1 - 1
src/main/java/com/uas/platform/b2c/core/filter/SSOInterceptor.java

@@ -197,7 +197,7 @@ public class SSOInterceptor extends AbstractSSOInterceptor {
 			List<ResourceItem> resources = resourceItemDao.findAll();
 			for (ResourceItem resource : resources) {
 				Collection<ConfigAttribute> configAttributes = new ArrayList<ConfigAttribute>();
-				ConfigAttribute configAttribute = new SecurityConfig(resource.getName());
+				ConfigAttribute configAttribute = new SecurityConfig(resource.getDesc());
 				configAttributes.add(configAttribute);
 				resourceMap.put(resource.getMethod() + ":" + resource.getUrl(), configAttributes);
 			}

+ 2 - 2
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_takeSelf_ctrl.js

@@ -192,8 +192,8 @@ define([ 'app/app' ], function(app) {
                         toaster.pop('success', '成功', '保存自提点地址成功');
                     }
                     $modalInstance.close(data);
-                },function () {
-                    toaster.pop('error', '保存自提点地址失败');
+                },function (response) {
+                    toaster.pop('error', '保存自提点地址失败'+ ' '+ response.data);
                 })
             };