这是基于vue-vben-admin 模板适用于abp Vnext的前端管理项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

2.0 KiB

LINGYUN.Abp.Identity.WxPusher

Implementation of the IWxPusherUserStore interface for the Identity module, retrieving subscribed topic lists through user Claims.

简体中文

Features

  • Integration with WxPusher user storage interface
  • Manage WxPusher UID and Topic through user Claims
  • Support batch retrieval of user-bound UIDs
  • Support batch retrieval of user-subscribed Topics

Installation

dotnet add package LINGYUN.Abp.Identity.WxPusher

Module Reference

[DependsOn(typeof(AbpIdentityWxPusherModule))]
public class YouProjectModule : AbpModule
{
    // other
}

Usage

This module implements the IWxPusherUserStore interface, storing WxPusher-related information through user Claims:

  • AbpWxPusherClaimTypes.Uid: Stores the WxPusher UID bound to the user
  • AbpWxPusherClaimTypes.Topic: Stores the Topic ID subscribed by the user

Get User-Bound UIDs

public class YourService
{
    private readonly IWxPusherUserStore _wxPusherUserStore;

    public YourService(IWxPusherUserStore wxPusherUserStore)
    {
        _wxPusherUserStore = wxPusherUserStore;
    }

    public async Task DoSomethingAsync(IEnumerable<Guid> userIds)
    {
        var uids = await _wxPusherUserStore.GetBindUidsAsync(userIds);
        // Use the retrieved uids for message pushing or other operations
    }
}

Get User-Subscribed Topics

public class YourService
{
    private readonly IWxPusherUserStore _wxPusherUserStore;

    public YourService(IWxPusherUserStore wxPusherUserStore)
    {
        _wxPusherUserStore = wxPusherUserStore;
    }

    public async Task DoSomethingAsync(IEnumerable<Guid> userIds)
    {
        var topics = await _wxPusherUserStore.GetSubscribeTopicsAsync(userIds);
        // Use the retrieved topics for message pushing or other operations
    }
}

Source Code

LINGYUN.Abp.Identity.WxPusher