后台数据表建立

This commit is contained in:
路 范
2022-03-30 19:34:37 +08:00
parent 904bdd16cd
commit 8a57806a29
37 changed files with 50474 additions and 431 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ewide.Core.Util
{
public class RandomHelper
{
private const string BASECODE = "ABCDEFGHJKLMNPQRSTUVWXYZ0123456789";
/// <summary>
///生成指定位数的随机码(数字)
/// </summary>
/// <param name="length"></param>
/// <returns></returns>
public static string GenerateRandomCode(int length)
{
var result = new StringBuilder();
for (var i = 0; i < length; i++)
{
var r = new Random(Guid.NewGuid().GetHashCode());
result.Append(BASECODE[r.Next(BASECODE.Length)]);
}
return result.ToString();
}
}
}