/// <summary> /// 用户点数校验 /// </summary> /// <param name="iUserID"></param> /// <returns></returns> public static bool UPointCheck(int iUserID) { bool bRes = false; if (iUserID < 1000) { return(bRes); } int iUserPoints = UserPointsBLL.UPointSel(iUserID); if (iUserPoints == 0) { bRes = true; return(bRes); } int iPoints = URealPointsSel(iUserID);//用户实际点数 if (iPoints == -1) { return(bRes); } if (iUserPoints != -1 && iPoints != -1) { if (iUserPoints > iPoints) { if (iPoints < 0) { iPoints = 0; } int iRes = UserPointsDAL.UPointUpdate(iUserID, iPoints); if (iRes > 0) { bRes = true; } } else { bRes = true; } } return(bRes); }
public static int UPointUpdate(int iUserID, int iUserPoints) { return(UserPointsDAL.UPointUpdate(iUserID, iUserPoints)); }