基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Lskj.Push.Common
|
||||
{
|
||||
public class ServiceHelper
|
||||
{
|
||||
private const int MAX_BADGE_NUMBER = 99999;
|
||||
private const int MIN = 100000;
|
||||
private const int MAX = int.MaxValue;
|
||||
|
||||
public static int generateSendno()
|
||||
{
|
||||
Random random = new Random();
|
||||
return random.Next((MAX - MIN) + 1) + MIN;
|
||||
}
|
||||
public static bool isValidIntBadge(int intBadge)
|
||||
{
|
||||
if (intBadge >= 0 && intBadge <= MAX_BADGE_NUMBER)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user