TRS-ZS-336在管理端将交易员的账号禁用后,交易端应限制其不能登录
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using BaseOUDAL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YLErp.Abstract;
|
||||
using YLErp.Helpers;
|
||||
using YLErp.Model;
|
||||
|
||||
namespace YLErp.Modules.SystemModule
|
||||
{
|
||||
public class SysUserKafkaService
|
||||
{
|
||||
private IKafkaProduce kafkaProduceHelper;
|
||||
private string topic = string.Empty;
|
||||
public SysUserKafkaService(IKafkaProduce kafkaProduce)
|
||||
{
|
||||
kafkaProduceHelper = kafkaProduce;
|
||||
topic = Environment.GetEnvironmentVariable("KafkaConfig_YiLian_SysUserInfoChangeTopic");
|
||||
}
|
||||
public SysUserKafkaService()
|
||||
{
|
||||
kafkaProduceHelper = new KafkaProduceHelper();
|
||||
topic = Environment.GetEnvironmentVariable("KafkaConfig_YiLian_SysUserInfoChangeTopic");
|
||||
}
|
||||
public void Send(SysUserChangeInfo sysUser)
|
||||
{
|
||||
SysUserChangeKafkaRequest sysUserChangeKafkaRequest = new SysUserChangeKafkaRequest();
|
||||
sysUserChangeKafkaRequest.Id = sysUser.Id;
|
||||
if (!string.IsNullOrEmpty(topic))
|
||||
{
|
||||
kafkaProduceHelper.Produce(topic, JsonHelper.Serialize(sysUserChangeKafkaRequest));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user