Beispiel #1
0
 public bool UpdateUserPointValue(int userID, T2 actionType, int nodeID, int value, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(PointActionManager.UpdateUserPointValue <T2>(userID, Type, actionType, nodeID, value, beforeUpdate));
 }
Beispiel #2
0
 /// <summary>
 /// 更新用户积分
 /// <para>可能抛出的错误:</para>
 /// <para>UserPointOverMaxValueError 积分超出上限</para>
 /// <para>UserPointOverMinValueError 积分超出下限</para>
 /// </summary>
 /// <param name="userID"></param>
 /// <param name="actionType">动作枚举</param>
 /// <param name="beforeUpdate"></param>
 /// <returns></returns>
 public bool UpdateUserPoint(int userID, T1 actionType, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(UpdateUserPoint(userID, actionType, 1, beforeUpdate));
 }
Beispiel #3
0
 /// <summary>
 /// 更新多个用户的多个动作 积分  (针对不同的用户)
 /// </summary>
 /// <param name="userActions">key:userID value:动作</param>
 /// <param name="count">更新倍数</param>
 /// <param name="beforeUpdate"></param>
 /// <returns></returns>
 public bool UpdateUsersPointWithNoTrans(Dictionary <int, T1> userActions, int count, int nodeID, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(PointActionManager.UpdateUsersPoint <T1>(userActions, Type, count, nodeID, beforeUpdate));
 }
Beispiel #4
0
 /// <summary>
 /// 更新用户积分
 /// <para>可能抛出的错误:</para>
 /// <para>UserPointOverMaxValueError 积分超出上限</para>
 /// <para>UserPointOverMinValueError 积分超出下限</para>
 /// <para>UserPointTradeMinValueError 积分超出本次交易允许的最小值</para>
 /// <para>UserPointTradeMaxValueError 积分超出本次交易允许的最大值</para>
 /// <para>UserPointTradeRemainingError 交易后积分剩余值小于该积分允许的最小值</para>
 /// </summary>
 /// <param name="userID"></param>
 /// <param name="actionType">动作枚举</param>
 /// <param name="value">要更新的值 正数为加积分 负数为减积分</param>
 /// <param name="beforeUpdate"></param>
 /// <returns></returns>
 public bool UpdateUserPointValue(int userID, T2 actionType, int value, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(UpdateUserPointValue(userID, actionType, 0, value, beforeUpdate));
 }
Beispiel #5
0
 /// <summary>
 /// 对同一个用户的不同动作 操作积分
 /// </summary>
 /// <param name="userID">操作该用户的积分</param>
 /// <param name="noNeedValueActions">(key:动作类型 value:操作倍数) 不需要用户填值的积分动作类型 如果没有用null</param>
 /// <param name="needValueActions">(key:动作类型 value:积分值) 需要用户填值的积分动作类型 如果没有用null</param>
 /// <param name="nodeID"></param>
 /// <param name="beforeUpdate"></param>
 /// <returns></returns>
 public bool UpdateUserPoints(int userID, Dictionary <T1, int> noNeedValueActions, Dictionary <T2, int> needValueActions, int nodeID, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(PointActionManager.UpdateUserPoints <T1, T2>(userID, noNeedValueActions, needValueActions, Type, nodeID, beforeUpdate));
 }
Beispiel #6
0
 /// <summary>
 /// 更新用户积分
 /// <para>可能抛出的错误:</para>
 /// <para>UserPointOverMaxValueError 积分超出上限</para>
 /// <para>UserPointOverMinValueError 积分超出下限</para>
 /// </summary>
 /// <param name="userID"></param>
 /// <param name="actionType">动作枚举</param>
 /// <param name="count">更新次数 如:批量删除了3篇日志,这里应该为3</param>
 /// <param name="isNormal">如果为false则取积分的相反值(通常发生在类似帖子由正常变成未审核,此时为false)</param>
 /// <param name="beforeUpdate"></param>
 /// <returns></returns>
 internal bool UpdateUserPoint(int userID, T1 actionType, int count, bool isNormal, int nodeID, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(PointActionManager.UpdateUserPoint <T1>(userID, Type, actionType, count, isNormal, nodeID, beforeUpdate));
 }
Beispiel #7
0
 /// <summary>
 /// 更新用户积分
 /// <para>可能抛出的错误:</para>
 /// <para>UserPointOverMaxValueError 积分超出上限</para>
 /// <para>UserPointOverMinValueError 积分超出下限</para>
 /// </summary>
 /// <param name="userID"></param>
 /// <param name="actionType">动作枚举</param>
 /// <param name="count">更新次数 如:批量删除了3篇日志,这里应该为3</param>
 /// <param name="beforeUpdate"></param>
 /// <returns></returns>
 public bool UpdateUserPoint(int userID, T1 actionType, int count, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(PointActionManager.UpdateUserPoint <T1>(userID, Type, actionType, count, true, 0, beforeUpdate));
 }
Beispiel #8
0
 /// <summary>
 /// 批量更新用户的积分
 /// <para>可能抛出的错误:</para>
 /// <para>UserPointOverMaxValueError 积分超出上限</para>
 /// <para>UserPointOverMinValueError 积分超出下限</para>
 /// </summary>
 /// <param name="userIDs">key:用户ID;value:更新倍数</param>
 /// <param name="actionType"></param>
 /// <param name="isNormal">如果为false则取积分的相反值(通常发生在类似帖子由正常变成未审核,此时为false)</param>
 /// <param name="beforeUpdate"></param>
 /// <returns></returns>
 public bool UpdateUsersPoint(Dictionary <int, int> userIDs, T1 actionType, bool isNormal, int nodeId, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(PointActionManager.UpdateUserPoint <T1>(userIDs, Type, actionType, isNormal, nodeId, beforeUpdate));
 }
Beispiel #9
0
 /// <summary>
 /// 批量更新用户的积分
 /// <para>可能抛出的错误:</para>
 /// <para>UserPointOverMaxValueError 积分超出上限</para>
 /// <para>UserPointOverMinValueError 积分超出下限</para>
 /// </summary>
 /// <param name="userIDs">key:用户ID;value:更新倍数</param>
 /// <param name="actionType"></param>
 /// <param name="beforeUpdate"></param>
 /// <returns></returns>
 public bool UpdateUsersPoint(Dictionary <int, int> userIDs, T1 actionType, PointActionManager.TryUpdateUserPointCallback beforeUpdate)
 {
     return(PointActionManager.UpdateUserPoint <T1>(userIDs, Type, actionType, true, 0, beforeUpdate));
 }