补扣接口

master
wanghaomei 9 months ago
parent de0f14767c
commit fc871b0988

@ -77,8 +77,8 @@ namespace Myshipping.Application.Event
//var feeUserId = sysCfg.FirstOrDefault(x => x.Code == "djyFeeApiUserId"); //var feeUserId = sysCfg.FirstOrDefault(x => x.Code == "djyFeeApiUserId");
//var feeKey = sysCfg.FirstOrDefault(x => x.Code == "djyFeeApiKey"); //var feeKey = sysCfg.FirstOrDefault(x => x.Code == "djyFeeApiKey");
if (feeUrl == null || string.IsNullOrEmpty(feeUrl.Value)) if (feeUrl == null || string.IsNullOrEmpty(feeUrl.Value))
//|| feeUserId == null || string.IsNullOrEmpty(feeUserId.Value) //|| feeUserId == null || string.IsNullOrEmpty(feeUserId.Value)
//|| feeKey == null || string.IsNullOrEmpty(feeKey.Value)) //|| feeKey == null || string.IsNullOrEmpty(feeKey.Value))
{ {
var errMsg = "大简云扣费URL未配置"; var errMsg = "大简云扣费URL未配置";
_logger.LogError(errMsg); _logger.LogError(errMsg);
@ -89,6 +89,14 @@ namespace Myshipping.Application.Event
foreach (var id in idToDo) foreach (var id in idToDo)
{ {
var order = await repoBooking.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == id); var order = await repoBooking.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == id);
if (order == null)
{
var errMsg = $"未找到id为 {id} 的订舱数据,扣费失败提醒";
_logger.LogError(errMsg);
DingTalkGroupHelper.SendDingTalkGroupMessage("bookingFeeNotify", "扣费失败提醒", errMsg);
continue;
}
var iptId = string.IsNullOrEmpty(order.OPID) ? order.CreatedUserId.Value : Convert.ToInt64(order.OPID); var iptId = string.IsNullOrEmpty(order.OPID) ? order.CreatedUserId.Value : Convert.ToInt64(order.OPID);
var user = await repoUser.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == iptId); var user = await repoUser.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == iptId);
var keyList = await repoTenantParamValue.AsQueryable() var keyList = await repoTenantParamValue.AsQueryable()

@ -10290,8 +10290,8 @@ namespace Myshipping.Application
/// 临时补扣费用 /// 临时补扣费用
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpGet("/BookingOrder/FeeById"), AllowAnonymous] [HttpPost("/BookingOrder/FeeById"), AllowAnonymous]
public async Task FeeById(List<long> idList, int bsType = 28, int sendtype = 0) public async Task FeeById([FromBody] List<long> idList, int bsType = 28, int sendtype = 0)
{ {
await _publisher.PublishAsync(new ChannelEventSource($"Booking:DoFeeRecord", new { bsType = bsType, sendtype = sendtype, idList = idList })); await _publisher.PublishAsync(new ChannelEventSource($"Booking:DoFeeRecord", new { bsType = bsType, sendtype = sendtype, idList = idList }));
} }

Loading…
Cancel
Save