|
|
|
@ -84,22 +84,29 @@ namespace RoBot.Start.Cmd
|
|
|
|
|
|
|
|
|
|
|
|
string msg = "";
|
|
|
|
string msg = "";
|
|
|
|
decimal totalPrice = 0;
|
|
|
|
decimal totalPrice = 0;
|
|
|
|
|
|
|
|
decimal fee = 0;
|
|
|
|
// 打印结果
|
|
|
|
// 打印结果
|
|
|
|
foreach (var item in results)
|
|
|
|
foreach (var item in results)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var current = RedisHelper.Client.HGet<GoodsInfo>(RedisPrefix.GoodsKey, item.Name);
|
|
|
|
var current = RedisHelper.Client.HGet<GoodsInfo>(RedisPrefix.GoodsKey, item.Name);
|
|
|
|
if (current is not null)
|
|
|
|
if (current is not null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
int num = item.Num.Value > 10 ? 10 : item.Num.Value;
|
|
|
|
decimal nicePrice = current.Price - 100000;
|
|
|
|
decimal nicePrice = current.Price - 100000;
|
|
|
|
totalPrice += Convert.ToDecimal(nicePrice * item.Num);
|
|
|
|
totalPrice += Convert.ToDecimal(nicePrice * num);
|
|
|
|
msg += $"确认坊市上架{item.Name} {(int)current.Price - 100000} {item.Num}\n";
|
|
|
|
|
|
|
|
|
|
|
|
fee += Math.Round(Utils.CalculateFee(nicePrice) * num, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
msg += $"确认坊市上架{item.Name} {(int)current.Price - 100000} {num}\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (string.IsNullOrWhiteSpace(msg) is false)
|
|
|
|
if (string.IsNullOrWhiteSpace(msg) is false)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
msg += "\r\n";
|
|
|
|
msg += "\r\n";
|
|
|
|
msg += "使用前请先@小小查看坊市药材,过完一遍以获取最新价格\r\n当前价格为坊市价格-10w\r\n";
|
|
|
|
msg += "使用前请先@小小查看坊市药材,过完一遍以获取最新价格\r\n当前价格为坊市价格-10w\r\n";
|
|
|
|
msg += $"总价值约:{Utils.FormatNumberToChineseUnit(totalPrice)}";
|
|
|
|
msg += $"总价值约:{Utils.FormatNumberToChineseUnit(totalPrice)}\r\n";
|
|
|
|
|
|
|
|
msg += $"手续费约:{Utils.FormatNumberToChineseUnit(fee)}\r\n";
|
|
|
|
|
|
|
|
msg += $"到账约:{Utils.FormatNumberToChineseUnit(totalPrice - fee)}";
|
|
|
|
var systemConfig = GlobalConfig.ConfigSetting;
|
|
|
|
var systemConfig = GlobalConfig.ConfigSetting;
|
|
|
|
var bot = GlobalConfig.BotContext;
|
|
|
|
var bot = GlobalConfig.BotContext;
|
|
|
|
await bot.SendMsg((uint)systemConfig.GroupQQ, msg);
|
|
|
|
await bot.SendMsg((uint)systemConfig.GroupQQ, msg);
|
|
|
|
|