Browse Source

修复PJZS发送消息AppCode错误的问题

批量采购更新SKU标记为供应链
master
shanji 1 year ago
parent
commit
c13628a576
  1. 10
      BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs
  2. 4
      BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
  3. 5
      BBWY.Server.Model/Db/Product/ProductSku.cs

10
BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs

@ -734,7 +734,7 @@ namespace BBWY.Server.Business
try try
{ {
qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PJZS", shop.ShopName, "任务列表无后续任务,为避免空档请及时设置后续任务", "NOTASK", "PZJS API", string.Empty); qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PJZS", shop.ShopName, "任务列表无后续任务,为避免空档请及时设置后续任务", "NOTASK", "PJZS API", string.Empty);
} }
catch { } catch { }
} }
@ -1101,7 +1101,7 @@ namespace BBWY.Server.Business
if (httpResult.StatusCode != System.Net.HttpStatusCode.OK) if (httpResult.StatusCode != System.Net.HttpStatusCode.OK)
{ {
//dingDingBusiness.SendDingDingBotMessage(shop.PJZSDingDingKey, shop.PJZSDingDingWebHook, $"任务[{promotionTask.ActivityName}]删除任务失败,{httpResult.Content}"); //dingDingBusiness.SendDingDingBotMessage(shop.PJZSDingDingKey, shop.PJZSDingDingWebHook, $"任务[{promotionTask.ActivityName}]删除任务失败,{httpResult.Content}");
qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PZJS", shop.ShopName, $"任务[{promotionTask.ActivityName}]删除任务失败,{httpResult.Content}", "PJZS API", string.Empty); qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PJZS", shop.ShopName, $"任务[{promotionTask.ActivityName}]删除任务失败,{httpResult.Content}", "PJZS API", string.Empty);
} }
else else
{ {
@ -1109,7 +1109,7 @@ namespace BBWY.Server.Business
if (!res.Success) if (!res.Success)
{ {
//dingDingBusiness.SendDingDingBotMessage(shop.PJZSDingDingKey, shop.PJZSDingDingWebHook, $"任务[{promotionTask.ActivityName}]删除任务失败,{res.Msg}"); //dingDingBusiness.SendDingDingBotMessage(shop.PJZSDingDingKey, shop.PJZSDingDingWebHook, $"任务[{promotionTask.ActivityName}]删除任务失败,{res.Msg}");
qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PZJS", shop.ShopName, $"任务[{promotionTask.ActivityName}]删除任务失败,{res.Msg}", "PJZS API", string.Empty); qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PJZS", shop.ShopName, $"任务[{promotionTask.ActivityName}]删除任务失败,{res.Msg}", "PJZS API", string.Empty);
} }
} }
@ -1200,7 +1200,7 @@ namespace BBWY.Server.Business
try try
{ {
//dingDingBusiness.SendDingDingBotMessage(shop.PJZSDingDingKey, shop.PJZSDingDingWebHook, $"任务[{jobDoneTask.ActivityName}]已结束"); //dingDingBusiness.SendDingDingBotMessage(shop.PJZSDingDingKey, shop.PJZSDingDingWebHook, $"任务[{jobDoneTask.ActivityName}]已结束");
qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PZJS", shop.ShopName, $"任务[{jobDoneTask.ActivityName}]已结束", "PJZS API", string.Empty); qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PJZS", shop.ShopName, $"任务[{jobDoneTask.ActivityName}]已结束", "PJZS API", string.Empty);
} }
catch { } catch { }
} }
@ -1228,7 +1228,7 @@ namespace BBWY.Server.Business
{ {
//dingDingBusiness.SendDingDingBotMessage(shop.PJZSDingDingKey, shop.PJZSDingDingWebHook, $"评价助手\n店铺:{shop.ShopName}\n任务全部执行完成,请及时设置后续任务!!"); //dingDingBusiness.SendDingDingBotMessage(shop.PJZSDingDingKey, shop.PJZSDingDingWebHook, $"评价助手\n店铺:{shop.ShopName}\n任务全部执行完成,请及时设置后续任务!!");
qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PZJS", shop.ShopName, "任务全部执行完成,请及时设置后续任务", "NOTASK", "PJZS API", string.Empty); qyMessageCenterBusiness.SendMessage(shop.TeamId, shop.TeamId, shop.ShopId, "PJZS", shop.ShopName, "任务全部执行完成,请及时设置后续任务", "NOTASK", "PJZS API", string.Empty);
} }
catch { } catch { }
} }

4
BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs

@ -616,6 +616,7 @@ namespace BBWY.Server.Business
foreach (var purchaseGroup in request.CargoParamGroupList) foreach (var purchaseGroup in request.CargoParamGroupList)
{ {
var belongSkuGroups = purchaseGroup.CargoParamList.GroupBy(p => p.BelongSkuId); var belongSkuGroups = purchaseGroup.CargoParamList.GroupBy(p => p.BelongSkuId);
var belongSkuIds = belongSkuGroups.Select(x => x.Key).ToList();
var belongSkuBasicInfoList = productBusiness.GetProductSkuList(new SearchProductSkuRequest() var belongSkuBasicInfoList = productBusiness.GetProductSkuList(new SearchProductSkuRequest()
{ {
@ -623,7 +624,7 @@ namespace BBWY.Server.Business
AppSecret = shop.AppSecret, AppSecret = shop.AppSecret,
AppToken = shop.AppToken, AppToken = shop.AppToken,
Platform = (Enums.Platform)shop.PlatformId, Platform = (Enums.Platform)shop.PlatformId,
Sku = string.Join(",", belongSkuGroups.Select(x => x.Key)), Sku = string.Join(",", belongSkuIds),
}); });
try try
@ -779,6 +780,7 @@ namespace BBWY.Server.Business
//fsql.Insert(purchaseOrderSku).ExecuteAffrows(); //fsql.Insert(purchaseOrderSku).ExecuteAffrows();
fsql.Insert(insertPurchaseOrderSkuList).ExecuteAffrows(); fsql.Insert(insertPurchaseOrderSkuList).ExecuteAffrows();
fsql.Update<PurchaseScheme>(updatePurchaseTimeSchemeIdList).Set(p => p.LastPurchaseTime, DateTime.Now).ExecuteAffrows(); fsql.Update<PurchaseScheme>(updatePurchaseTimeSchemeIdList).Set(p => p.LastPurchaseTime, DateTime.Now).ExecuteAffrows();
fsql.Update<ProductSku>(belongSkuIds).Set(ps => ps.Purchaser, 1).ExecuteAffrows(); //设置SKU为供应链
}); });
successSkuIdList.AddRange(belongSkuGroups.Select(g => g.Key)); successSkuIdList.AddRange(belongSkuGroups.Select(g => g.Key));

5
BBWY.Server.Model/Db/Product/ProductSku.cs

@ -52,6 +52,11 @@ namespace BBWY.Server.Model.Db
public int? CategoryId { get; set; } public int? CategoryId { get; set; }
public string CategoryName { get; set; } public string CategoryName { get; set; }
/// <summary>
/// 1:业务团队 2:供应链
/// </summary>
public int? Purchaser { get; set; }
} }
} }

Loading…
Cancel
Save