master
wanghaomei 9 months ago
parent c6dcba7199
commit 3d1c0d242a

@ -87,9 +87,9 @@ namespace Myshipping.Application.Event
foreach (var id in idToDo)
{
var order = await repoBooking.AsQueryable().FirstAsync(x => x.Id == id);
var order = await repoBooking.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == id);
var iptId = string.IsNullOrEmpty(order.OPID) ? order.CreatedUserId.Value : Convert.ToInt64(order.OPID);
var user = await repoUser.AsQueryable().FirstAsync(x => x.Id == iptId);
var user = await repoUser.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == iptId);
if (user == null || string.IsNullOrEmpty(user.DjyUserId))
{
var errMsg = $"未找到{order.MBLNO}({id})的用户信息,无法调用扣费";
@ -100,7 +100,7 @@ namespace Myshipping.Application.Event
var seconds = DateTime.Now.ToTimeStamp();
var runId = Guid.NewGuid().ToString();
var srcBeforMD5 = $"{runId}{feeKey.Value}expend{bsType}0{id}{order.MBLNO}{seconds}{feeKey.Value}";
var srcBeforMD5 = $"{runId}{feeUserId.Value}expend{bsType}{sendType}{id}{order.MBLNO}{seconds}{feeKey.Value}";
var postObj = new
{
runId,
@ -135,7 +135,7 @@ namespace Myshipping.Application.Event
.SendAsStringAsync();
_logger.LogInformation($"调用扣费返回:{apiRtn}");
var jobjApiRtn = JObject.Parse(apiRtn);
var code = Convert.ToInt32(jobjApiRtn.GetValue("code").ToString());
var code = jobjApiRtn.GetIntValue("code");
var jobjApiRtnData = jobjApiRtn.GetValue("data") as JObject;
if (code == 200 || code == 450)
{
@ -154,7 +154,7 @@ namespace Myshipping.Application.Event
}
else
{
var errMsg = jobjApiRtnData.GetValue("message").ToString();
var errMsg = jobjApiRtn.GetValue("message").ToString();
_logger.LogError($"扣费失败:{errMsg}");
DingTalkGroupHelper.SendDingTalkGroupMessage("bookingFeeNotify", "扣费失败提醒", errMsg);
}

@ -1821,7 +1821,7 @@ namespace Myshipping.Application
&& x.VOYNO == item.Voyno).ToListAsync();
//当前租户配置为实际开船后扣费
var paraVal = _tenantParamValue.AsQueryable().First(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "BOOKING_FEE_METHOD");
var paraVal = _tenantParamValue.AsQueryable().Filter(null, true).First(x => x.TenantId == UserManager.TENANT_ID && x.ParaCode == "BOOKING_FEE_METHOD");
//有实际开船,扣费
if (paraVal != null && paraVal.ItemCode == "ATD" && item.ATD.HasValue)
{

@ -120,8 +120,8 @@ public static class SqlSugarSetup
Console.ForegroundColor = ConsoleColor.Blue;
}
//Console.WriteLine("Sql:" + "\r\n\r\n" + UtilMethods.GetSqlString(c.DbType, sql, pars));
App.PrintToMiniProfiler("SqlSugar", "Info", UtilMethods.GetSqlString(c.DbType, sql, pars));
$"DB:{c.ConfigId}, Sql:\r\n\r\n { UtilMethods.GetSqlString(c.DbType, sql, pars)}".LogInformation();
//App.PrintToMiniProfiler("SqlSugar", "Info", UtilMethods.GetSqlString(c.DbType, sql, pars));
//$"DB:{c.ConfigId}, Sql:\r\n\r\n { UtilMethods.GetSqlString(c.DbType, sql, pars)}".LogInformation();
};

Loading…
Cancel
Save