public int DelectRole(UserToken token, int roleId, string name) { int accountId = AccountBiz.GetAccountId(token);//获取不到此用户 if (accountId == -1) { return(-1); } if (UserCache.GetRoleCount(accountId) <= 0) { return(-2); //此账号没有角色 } UserCache.DeleteRole(accountId, roleId, name); return(1); }