using CoreCms.Net.Configuration;
|
using CoreCms.Net.IServices;
|
using CoreCms.Net.Loging;
|
using InitQ.Abstractions;
|
using InitQ.Attributes;
|
using Newtonsoft.Json;
|
using NPOI.Util;
|
using System;
|
using System.Collections.Generic;
|
using System.ComponentModel.Design;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace CoreCms.Net.RedisMQ
|
{
|
public class DistributionAchievementMQ : IRedisSubscribe
|
{
|
private ICoreCmsDistributionServices _dbService;
|
|
public DistributionAchievementMQ(ICoreCmsDistributionServices dictionaryService)
|
{
|
_dbService = dictionaryService;
|
|
}
|
/// <summary>
|
/// 处理代理业绩商订单
|
/// </summary>
|
/// <param name="message"></param>
|
[Subscribe(RedisMessageQueueKey.DistributionAchievementOder)]
|
public async void DistributionAchievementOder(string message)
|
{
|
try
|
{
|
var Param = JsonConvert.DeserializeObject<CreateDAOrderInParam>(message);
|
if (await _dbService.CreateDistributionAchievementOrder(Param))
|
return;
|
else
|
{
|
NLogUtil.WriteAll(NLog.LogLevel.Fatal, LogType.RedisMessageQueue, "经销商处理经销商业绩单失败", $"CreateDistributionAchievementOrder 返回失败, 参数:{message}");
|
return;
|
}
|
}
|
catch (Exception e)
|
{
|
NLogUtil.WriteAll(NLog.LogLevel.Fatal, LogType.RedisMessageQueue, "经销商处理经销商业绩单失败", $" 错误提示,{e.Message}, 输入参数:{message}");
|
throw;
|
}
|
|
|
|
|
|
}
|
|
|
|
}
|
}
|