Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite identityuser application service. #19592

Open
1 task done
1957993455 opened this issue Apr 21, 2024 · 1 comment
Open
1 task done

Rewrite identityuser application service. #19592

1957993455 opened this issue Apr 21, 2024 · 1 comment

Comments

@1957993455
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

我在application层使用来替换identityuser时,swgger的接口并没有替换原始的接口,这个问题如何解决?

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IIdentityUserAppService), typeof(IdentityUserAppService)
    , typeof(MyUserAppService))]
public class MyUserAppService: IdentityUserAppService
{
    public MyUserAppService(IdentityUserManager userManager, 
        IIdentityUserRepository userRepository, 
        IIdentityRoleRepository roleRepository,
        IOptions<IdentityOptions> identityOptions, 
        IPermissionChecker permissionChecker) : 
        base(userManager, userRepository, roleRepository,
            identityOptions, permissionChecker)
    {

    }
  [RemoteService(isEnabled:true)]
        public async Task<string> GetNameAA()
        {
            await Task.Delay(200);
            return "hello";
        }

}

在加上面代码之前swgger的断电列表为

GET
​/api​/identity​/users​/{id}

PUT
​/api​/identity​/users​/{id}

DELETE
​/api​/identity​/users​/{id}

GET
​/api​/identity​/users

POST
​/api​/identity​/users

GET
​/api​/identity​/users​/{id}​/roles

PUT
​/api​/identity​/users​/{id}​/roles

GET
​/api​/identity​/users​/assignable-roles

GET
​/api​/identity​/users​/by-username​/{userName}

GET
​/api​/identity​/users​/by-email​/{email}

加了之后端点为

GET
​/api​/identity​/users​/{id}

PUT
​/api​/identity​/users​/{id}

DELETE
​/api​/identity​/users​/{id}

GET
​/api​/identity​/users

POST
​/api​/identity​/users

GET
​/api​/identity​/users​/{id}​/roles

PUT
​/api​/identity​/users​/{id}​/roles

GET
​/api​/identity​/users​/assignable-roles

GET
​/api​/identity​/users​/by-username​/{userName}

GET
​/api​/identity​/users​/by-email​/{email}

GET
​/api​/app​/user​/entire-collection

GET
​/api​/app​/user​/{id}

PUT
​/api​/app​/user​/{id}

DELETE
​/api​/app​/user​/{id}

GET
​/api​/app​/user

POST
​/api​/app​/user

GET
​/api​/app​/user​/{id}​/roles

PUT
​/api​/app​/user​/{id}​/roles

GET
​/api​/app​/user​/assignable-roles

POST
​/api​/app​/user​/find-by-username

POST

我该如何解决这个问题呢?我尝试使用 [RemoteService(isEnabled:true)]来禁用,确实起到效果了,但是我想向userAppservice添加以下方法作为api时,不能在swgger显示

```
[RemoteService(isEnabled:true)]
    public async Task<string> GetNameAA()
    {
        await Task.Delay(200);
        return "hello";
    }
能帮我解决一下?


### Reproduction Steps

_No response_

### Expected behavior

_No response_

### Actual behavior

_No response_

### Regression?

_No response_

### Known Workarounds

_No response_

### Version

8.1

### User Interface

Common (Default)

### Database Provider

EF Core (Default)

### Tiered or separate authentication server

None (Default)

### Operation System

Windows (Default)

### Other information

_No response_
@1957993455 1957993455 added the bug label Apr 21, 2024
@maliming maliming changed the title 重写identityuser应用服务 Rewrite identityuser application service. Apr 22, 2024
@maliming maliming removed the bug label Apr 22, 2024
@CY-Ye
Copy link

CY-Ye commented Apr 25, 2024

按照你的需求来说,你应该重写IdentityUserController,而非IdentityUserAppService。因为Abp Identity并没有将IdentityUserAppService动态生成Controller,而是IdentityUserController调用了IdentityUserAppService而已

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants