TRS-ZS-336在管理端将交易员的账号禁用后,交易端应限制其不能登录

This commit is contained in:
zhenghaotian
2025-04-24 17:48:59 +08:00
parent 8e0a46d899
commit 5e34056542
5 changed files with 113 additions and 41 deletions
@@ -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));
}
}
}
}