Commit cf8eda5e authored by 吴春's avatar 吴春
parents 638eed58 1c77f2e5
......@@ -1153,6 +1153,40 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
}
}
}
//更新推荐供应商返佣
try
{
var oiList = goods_OrderIntroductionRepository.GetList(new RB_Goods_OrderIntroduction_Extend() { TenantId = item.TenantId, MallBaseId = item.MallBaseId, OrderId = Order.OrderId });
if (oiList.Any())
{
foreach (var qitem in oiList)
{
//查询是否有申请退款
var afterSaleList = goods_OrderAfterSaleRepository.GetList(new RB_Goods_OrderAfterSale_Extend() { OrderDetialId = qitem.OrderDetailId, Type = 1, MallBaseId = item.MallBaseId, TenantId = item.TenantId });
if (!afterSaleList.Any())
{
//更新返佣状态
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{ nameof(RB_Goods_OrderIntroduction_Extend.CommissionState),2},
{ nameof(RB_Goods_OrderIntroduction_Extend.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_OrderIntroduction_Extend.Id),
FiledValue=qitem.Id,
OperatorEnum=OperatorEnum.Equal
}
};
goods_OrderIntroductionRepository.Update(keyValues1, wheres1);
}
}
}
}
catch (Exception)
{
Helper.LogHelper.Write("AutoAfterSaleOrderSendCommission:更新推荐供应商返佣失败");
}
}
}
else
......@@ -1212,6 +1246,40 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
}
}
}
//更新推荐供应商返佣
try
{
var oiList = goods_OrderIntroductionRepository.GetList(new RB_Goods_OrderIntroduction_Extend() { TenantId = item.TenantId, MallBaseId = item.MallBaseId, OrderId = Order.OrderId });
if (oiList.Any())
{
foreach (var qitem in oiList)
{
//查询是否有申请退款
var afterSaleList = goods_OrderAfterSaleRepository.GetList(new RB_Goods_OrderAfterSale_Extend() { OrderDetialId = qitem.OrderDetailId, Type = 1, MallBaseId = item.MallBaseId, TenantId = item.TenantId });
if (!afterSaleList.Any())
{
//更新返佣状态
Dictionary<string, object> keyValues1 = new Dictionary<string, object>() {
{ nameof(RB_Goods_OrderIntroduction_Extend.CommissionState),2},
{ nameof(RB_Goods_OrderIntroduction_Extend.UpdateDate),DateTime.Now},
};
List<WhereHelper> wheres1 = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_Goods_OrderIntroduction_Extend.Id),
FiledValue=qitem.Id,
OperatorEnum=OperatorEnum.Equal
}
};
goods_OrderIntroductionRepository.Update(keyValues1, wheres1);
}
}
}
}
catch (Exception)
{
Helper.LogHelper.Write("AutoAfterSaleOrderSendCommission:更新推荐供应商返佣失败");
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment