|
|
@@ -110,6 +110,7 @@ namespace MySystem
|
|
|
{
|
|
|
function.WriteLog("分润:" + BrandId + ":" + dt.Rows.Count, "同步分润数据");
|
|
|
int index = 0;
|
|
|
+ List<int> UserIds = new List<int>();
|
|
|
foreach (DataRow dr in dt.Rows)
|
|
|
{
|
|
|
index += 1;
|
|
|
@@ -154,6 +155,10 @@ namespace MySystem
|
|
|
Remark = DirectFlag == 1 ? "直拓商户分润" : "品牌推广服务费",
|
|
|
}).Entity;
|
|
|
db.SaveChanges();
|
|
|
+ if(!UserIds.Contains(UserId))
|
|
|
+ {
|
|
|
+ UserIds.Add(UserId);
|
|
|
+ }
|
|
|
tran.Commit();
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -164,6 +169,10 @@ namespace MySystem
|
|
|
startid = int.Parse(dr["Id"].ToString());
|
|
|
function.WriteLog(index.ToString(), "同步分润数据");
|
|
|
}
|
|
|
+ foreach(int UserId in UserIds)
|
|
|
+ {
|
|
|
+ RedisDbconn.Instance.AddList("UserMonthFeeQueue", UserId.ToString());
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|