/// <summary> /// 填充MKT账号当前可用积分值 /// </summary> /// <param name="pmAccountList"></param> private static void FillAvailablePointForPMAccountList(List <PMAccountEntity> pmAccountList) { List <CustomerPointInfoEntity> queryResult = SendMKTPointEmailDA.GetPMPointInfoEntityList(pmAccountList.Select(x => x.Account).ToList()); var result = (from x in pmAccountList join q in queryResult on x.Account equals q.CustomerID select new PMAccountEntity() { Account = x.Account, PointAvailable = q.ValidScore, PointLowerLimit = x.PointLowerLimit, RecvMailList = x.RecvMailList, Status = x.Status } ).ToList <PMAccountEntity>(); pmAccountList.Clear(); pmAccountList.AddRange(result.ToArray()); }
/// <summary> /// 填充MKT账号在过去几天内的积分使用总值,以及当前可用积分值 /// </summary> /// <param name="mktAccountList"></param> private static void FillAvailablePointForMKTAccountList(List <MKTAccountEntity> mktAccountList) { List <CustomerPointInfoEntity> queryResult = SendMKTPointEmailDA.GetPMPointInfoEntityList(mktAccountList.Select(x => x.Account).ToList()); List <CustomerPointInfoEntity> queryResult4PassDays = SendMKTPointEmailDA.GetMKTPointInfoEntityList(mktAccountList.Select(x => x.Account).ToList(), JobConfig.MKTAccountPassDays); var result = (from x in mktAccountList join q in queryResult on x.Account equals q.CustomerID join p in queryResult4PassDays on x.Account equals p.CustomerID select new MKTAccountEntity() { Account = x.Account, PointAvailable = q.ValidScore, PointLowerLimit = p.PointLowerLimit, RecvMailList = x.RecvMailList, Status = x.Status } ).ToList(); mktAccountList.Clear(); mktAccountList.AddRange(result.ToArray()); }