@@ -877,6 +877,8 @@ namespace MySystem
if((user.UserType >= 1 || user.LeaderLevel > 0) && Money > 0)
{
ChangeAccount(db, order, user.Id, Money, ChangeType);
+ //发送APP推送消息
+ Utils.Instance.PrizePush(user.Id, Money);
Money = 0;
}
@@ -97,6 +97,9 @@ namespace MySystem
QueryCount = PosId,
}).Entity;
db.SaveChanges();
+
+ Utils.Instance.PrizePush(OpId, ChangeAmount);
db.Dispose();
@@ -456,6 +456,9 @@ namespace MySystem
QueryCount = OrderId,
+ Utils.Instance.PrizePush(UserId, 100 * Count);
/// <summary>
@@ -663,6 +666,9 @@ namespace MySystem
Kind = Kind,
+ Utils.Instance.PrizePush(UserId, Money * Count);
@@ -856,6 +856,9 @@ namespace MySystem
QueryCount = pos.Id, //机具Id
+ Utils.Instance.PrizePush(GetUserId, ActPrize);
@@ -3323,6 +3326,9 @@ namespace MySystem
Kind = 3,
+ Utils.Instance.PrizePush(puser.Id, Prize);
#endregion
@@ -343,7 +343,20 @@ namespace MySystem
-
+ #region 推送奖励信息
+ public void PrizePush(int UserId, decimal Prize)
+ {
+ WebCMSEntities db = new WebCMSEntities();
+ Users user = db.Users.FirstOrDefault(m => m.Id == UserId) ?? new Users();
+ if(!string.IsNullOrEmpty(user.DeviceType))
+ RedisDbconn.Instance.AddList("AliyunPushQueue", "{\"Account\":\"" + user.Mobile + "\",\"Device\":\"" + user.DeviceType.ToUpper() + "\",\"Title\":\"客小爽创客版\",\"Body\":\"奖励到账" + Prize.ToString("f2") +"元,打开收支明细查看!\"}");
+ }
+ db.Dispose();
+ #endregion