提交代码

This commit is contained in:
zpc 2024-11-17 00:35:38 +08:00
parent 9adf757aec
commit c114ac5054
34 changed files with 608 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@ -0,0 +1,152 @@
/// <summary>
/// 实名认证
/// </summary>
/// <returns></returns>
public async Task<bool> RealAuthentication(string userName, string idCard, string deviceNumber)
{
if (string.IsNullOrEmpty(userName))
{
throw MessageBox.Show(ResonseCode.ParamError, "用户名为空");
}
if (string.IsNullOrEmpty(idCard))
{
throw MessageBox.Show(ResonseCode.ParamError, "身份证号为空");
}
var isVali = OtherExtensions.ValidateIDCard(idCard);
if (!isVali)
{
throw MessageBox.Show(ResonseCode.ParamError, "身份证号错误");
}
//判断用户是否实名认证过,并且不等于未成年人
if (UserInfo.IsRealName && !UserInfo.IsJuveniles)
{
throw MessageBox.Show(0, "此账号已实名认证成功,无需重复验证");
}
if (UserInfo.RealNameDateTimeLast != null && DateTime.Now.Subtract((UserInfo.RealNameDateTimeLast ?? DateTime.MinValue)).TotalSeconds < 10)
{
throw MessageBox.Show(ResonseCode.Error, "两次绑定身份证号时间间隔太短,请稍后再绑定~");
}
if (UserInfo.IsJuveniles && UserInfo.IdCard == idCard)
{
throw MessageBox.Show(0, "此账号已实名认证成功,无需重复验证");
}
if (UserInfo.RealAuthentCount > 10)
{
throw MessageBox.Show(0, "此账号今日实名认证次数已到达上限");
}
var (verify, age, sex, birthday) = OtherExtensions.GetIDCardBirthdayAgeSex(idCard);
var user = await Dao.DaoUser.Context.T_User.FirstOrDefaultAsync(it => it.Id == _UserId);
if (user == null)
{
throw MessageBox.Show(ResonseCode.NotFoundRecord, "用户不存在");
}
IIdCardVerify idCardVerify = this.GetIdCardVerify();
var isIdCardVerify = await idCardVerify.IdCardVerify(userName, idCard);
if (!isIdCardVerify)
{
//实名认证错误
T_User_RealAuthentication_Log t_User_RealAuthentication_Log1 = new T_User_RealAuthentication_Log()
{
CreateTime = DateTime.Now,
DeviceNumber = deviceNumber,
IdCard = idCard,
UserId = _UserId,
UserName = userName,
IsRewards = false,
RealResults = "认证失败",
Message = "认证失败"
};
await Dao.DaoExt.Context.T_User_RealAuthentication_Log.AddAsync(t_User_RealAuthentication_Log1);
await Dao.DaoExt.Context.SaveChangesAsync();
UserInfo.RealNameDateTimeLast = DateTime.Now;
UserInfo.RealAuthentCount++;
//保存用户信息缓存
await this.SaveUserInfoCacheChangesAsync();
throw MessageBox.Show(ResonseCode.NotFoundRecord, "身份证号错误");
}
//已经实名认证过了,但是认证的是未成年人
user.UserName = userName;
user.IDCard = idCard;
UserInfo.IsJuveniles = false;
if (verify)
{
if (age >= 18)
{
user.UserRealNameStatus = 1;
}
else
{
UserInfo.IsJuveniles = true;
user.UserRealNameStatus = 2;
}
}
await Dao.DaoUser.Context.SaveChangesAsync();
if (string.IsNullOrEmpty(deviceNumber))
{
deviceNumber = UserInfo.DeviceNumber;
}
var limitActionLogCount = await Dao.DaoUser.Context.T_User_LimitActionLog.CountAsync(it => it.UserId == _UserId && it.ActionType == (int)UserActionTypeEnum.ActionType.实名认证);
bool IsRewards = false;
string mes = "";
//如果之前用户未实名认证过,发放奖励
if (limitActionLogCount == 0)
{
//检查设备有没有发放过
var limitActionLogDeviceNumberCount = await Dao.DaoUser.Context.T_User_LimitActionLog.CountAsync(it => it.ActionType == (int)UserActionTypeEnum.ActionType.实名认证 && it.DeviceNumber == deviceNumber);
if (limitActionLogDeviceNumberCount == 0)
{
IsRewards = true;
var ip = HttpContextAccessor.HttpContext.GetClientIpAddress();
var day = int.Parse(DateTime.Now.ToString("yyyyMMdd"));
//发放奖励
var limitActionLog = new T_User_LimitActionLog()
{
CreateTime = DateTime.Now,
CreateTimeDay = day,
ActionId = "",
ActionType = (int)UserActionTypeEnum.ActionType.实名认证,
DeviceNumber = deviceNumber,
Extend1 = "",
UserId = _UserId,
Ip = ip
};
await Dao.DaoUser.Context.T_User_LimitActionLog.AddAsync(limitActionLog);
await Dao.DaoUser.Context.SaveChangesAsync();
mes = $"奖励已经发送,钻石*10";
}
else
{
mes = $"用户设备号重复,不发放奖励";
}
}
else
{
mes = $"用户已经领取过奖励,不再发放奖励";
}
T_User_RealAuthentication_Log t_User_RealAuthentication_Log = new T_User_RealAuthentication_Log()
{
CreateTime = DateTime.Now,
DeviceNumber = deviceNumber,
IdCard = idCard,
UserId = _UserId,
UserName = userName,
IsRewards = IsRewards,
RealResults = "",
Message = mes
};
#region 保存缓存数据
UserInfo.UserName = userName;
UserInfo.IdCard = idCard;
UserInfo.IsRealName = true;
UserInfo.RealNameDateTimeLast = DateTime.Now;
UserInfo.RealAuthentCount++;
await this.SaveUserInfoCacheChangesAsync();
#endregion
await Dao.DaoExt.Context.T_User_RealAuthentication_Log.AddAsync(t_User_RealAuthentication_Log);
await Dao.DaoExt.Context.SaveChangesAsync();
return true;
}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -0,0 +1,288 @@
| 1.131 us | 0.0203 us | 0.0226 us | 0.2861 | - | 1.76 KB |
| ListToDictionaryOrListTest1 | 3.768 us | 0.0753 us | 0.0805 us | 0.9613 | 0.0153 | 5.91 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|------------------------------ |---------:|----------:|----------:|-------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1.169 us | 0.0233 us | 0.0383 us | 0.2861 | - | 1.76 KB |
| ListToDictionaryOrListTest1 | 1.945 us | 0.0282 us | 0.0235 us | 0.4921 | 0.0038 | 3.02 KB |
第一次测试
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |---------:|----------:|----------:|-------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1.172 us | 0.0233 us | 0.0239 us | 0.2861 | - | 1.76 KB |
| ListToDictionaryOrListTest1 | 2.140 us | 0.0427 us | 0.0626 us | 0.4921 | 0.0038 | 3.02 KB |
| ObjectToDictionaryOrListExtend1 | 1.226 us | 0.0244 us | 0.0366 us | 0.1984 | - | 1.23 KB |
| ListToDictionaryOrListExtend1 | 2.023 us | 0.0296 us | 0.0231 us | 0.3395 | - | 2.09 KB |
第二次测试
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |---------:|----------:|----------:|-------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1.327 us | 0.0263 us | 0.0453 us | 0.2861 | - | 1.76 KB |
| ListToDictionaryOrListTest1 | 2.188 us | 0.0435 us | 0.0566 us | 0.4921 | 0.0038 | 3.02 KB |
| ObjectToDictionaryOrListExtend1 | 1.226 us | 0.0246 us | 0.0437 us | 0.1984 | - | 1.23 KB |
| ListToDictionaryOrListExtend1 | 2.228 us | 0.0440 us | 0.1088 us | 0.3395 | - | 2.09 KB |
第三次测试,数据量大
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |----------:|----------:|----------:|-------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1.201 us | 0.0239 us | 0.0343 us | 0.2861 | - | 1.76 KB |
| ListToDictionaryOrListTest1 | 39.524 us | 0.7436 us | 0.8265 us | 9.5215 | 1.2817 | 58.45 KB |
| ObjectToDictionaryOrListExtend1 | 1.200 us | 0.0228 us | 0.0224 us | 0.1984 | - | 1.23 KB |
| ListToDictionaryOrListExtend1 | 45.911 us | 0.9075 us | 1.1145 us | 6.5308 | 0.8545 | 40.09 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |----------:|----------:|----------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListExtend1 | 1.271 us | 0.0253 us | 0.0371 us | 0.2346 | - | 1.45 KB |
| ListToDictionaryOrListExtend1 | 45.405 us | 0.6326 us | 0.5917 us | 8.3008 | 1.0376 | 51.16 KB |
| ObjectToDictionaryOrListTest1 | 1.184 us | 0.0231 us | 0.0366 us | 0.3223 | 0.0019 | 1.98 KB |
| ListToDictionaryOrListTest1 | 42.341 us | 0.7226 us | 0.6759 us | 11.2915 | 1.5869 | 69.51 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |------------:|----------:|----------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1,215.8 ns | 23.97 ns | 33.61 ns | 0.3223 | 0.0019 | 1.98 KB |
| ListToDictionaryOrListTest1 | 42,113.3 ns | 726.29 ns | 643.83 ns | 11.2915 | 1.5869 | 69.51 KB |
| ObjectToDictionaryOrListExtend1 | 1,227.7 ns | 20.73 ns | 18.38 ns | 0.2346 | - | 1.45 KB |
| ListToDictionaryOrListExtend1 | 42,461.6 ns | 553.59 ns | 490.74 ns | 8.3008 | 1.0376 | 51.16 KB |
| ObjectToDictionaryOrListExtend3 | 723.2 ns | 14.35 ns | 17.09 ns | 0.2394 | 0.0010 | 1.47 KB |
| ListToDictionaryOrListExtend3 | 28,963.9 ns | 523.36 ns | 661.88 ns | 8.4534 | 1.2207 | 51.85 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |------------:|----------:|------------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1,220.2 ns | 24.42 ns | 35.03 ns | 0.3223 | 0.0019 | 1.98 KB |
| ListToDictionaryOrListTest1 | 42,280.1 ns | 720.11 ns | 1,009.49 ns | 11.2915 | 1.5869 | 69.51 KB |
| ObjectToDictionaryOrListExtend1 | 1,289.6 ns | 24.98 ns | 27.76 ns | 0.2346 | - | 1.45 KB |
| ListToDictionaryOrListExtend1 | 43,295.8 ns | 822.61 ns | 807.91 ns | 8.3008 | 1.0376 | 51.16 KB |
| ObjectToDictionaryOrListExtend3 | 745.3 ns | 14.91 ns | 25.72 ns | 0.2394 | 0.0010 | 1.47 KB |
| ListToDictionaryOrListExtend3 | 27,586.5 ns | 536.32 ns | 896.08 ns | 8.4534 | 1.2207 | 51.85 KB |
| ObjectToDictionaryOrListExtend4 | 5,899.9 ns | 115.99 ns | 124.10 ns | 0.3204 | - | 1.98 KB |
| ListToDictionaryOrListExtend4 | 42,746.3 ns | 847.53 ns | 1,461.95 ns | 11.2915 | 1.5869 | 69.51 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |------------:|----------:|----------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1,215.0 ns | 24.08 ns | 40.23 ns | 0.3223 | 0.0019 | 1.98 KB |
| ListToDictionaryOrListTest1 | 41,476.2 ns | 791.85 ns | 777.70 ns | 11.2915 | 1.5869 | 69.51 KB |
| ObjectToDictionaryOrListExtend1 | 1,215.1 ns | 23.06 ns | 23.68 ns | 0.2346 | - | 1.45 KB |
| ListToDictionaryOrListExtend1 | 44,659.3 ns | 856.88 ns | 841.57 ns | 8.3008 | 1.0376 | 51.16 KB |
| ObjectToDictionaryOrListExtend3 | 721.1 ns | 14.48 ns | 19.33 ns | 0.2394 | 0.0010 | 1.47 KB |
| ListToDictionaryOrListExtend3 | 28,785.7 ns | 555.05 ns | 570.00 ns | 8.4534 | 1.2207 | 51.85 KB |
| ObjectToDictionaryOrListExtend4 | 6,104.1 ns | 113.58 ns | 159.22 ns | 0.3204 | - | 1.98 KB |
| ListToDictionaryOrListExtend4 | 41,442.8 ns | 788.73 ns | 938.93 ns | 11.2915 | 1.5869 | 69.51 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |-------------:|------------:|------------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1,222.0 ns | 24.31 ns | 39.26 ns | 0.3223 | 0.0019 | 1.98 KB |
| ListToDictionaryOrListTest1 | 43,385.7 ns | 660.87 ns | 585.85 ns | 11.2915 | 1.5869 | 69.51 KB |
| ObjectToDictionaryOrListExtend1 | 3,171.3 ns | 57.74 ns | 102.63 ns | 0.6981 | 0.0076 | 4.29 KB |
| ListToDictionaryOrListExtend1 | 118,681.7 ns | 2,320.88 ns | 2,383.38 ns | 25.8789 | 6.1035 | 159.75 KB |
| ObjectToDictionaryOrListExtend3 | 748.0 ns | 14.49 ns | 20.78 ns | 0.2394 | 0.0010 | 1.47 KB |
| ListToDictionaryOrListExtend3 | 27,158.4 ns | 517.39 ns | 432.04 ns | 8.4534 | 1.2207 | 51.85 KB |
| ObjectToDictionaryOrListExtend4 | 1,783.6 ns | 17.40 ns | 13.59 ns | 0.4845 | 0.0019 | 2.98 KB |
| ListToDictionaryOrListExtend4 | 52,614.9 ns | 971.95 ns | 909.17 ns | 11.2305 | 0.4272 | 68.97 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |-------------:|------------:|------------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1,119.5 ns | 21.99 ns | 19.50 ns | 0.3223 | 0.0019 | 1.98 KB |
| ListToDictionaryOrListTest1 | 39,978.8 ns | 271.22 ns | 240.43 ns | 11.2915 | 1.5869 | 69.51 KB |
| ObjectToDictionaryOrListExtend1 | 2,857.1 ns | 26.54 ns | 24.83 ns | 0.6981 | 0.0076 | 4.29 KB |
| ListToDictionaryOrListExtend1 | 116,483.4 ns | 2,270.77 ns | 3,467.71 ns | 26.0010 | 6.2256 | 159.75 KB |
| ObjectToDictionaryOrListExtend3 | 653.6 ns | 12.37 ns | 11.57 ns | 0.2394 | 0.0010 | 1.47 KB |
| ListToDictionaryOrListExtend3 | 25,429.8 ns | 316.63 ns | 296.18 ns | 8.4534 | 1.2207 | 51.85 KB |
| ObjectToDictionaryOrListExtend4 | 845.5 ns | 11.93 ns | 11.16 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend4 | 31,184.9 ns | 609.90 ns | 652.58 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend6 | 823.0 ns | 10.86 ns | 10.16 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend6 | 30,849.4 ns | 547.99 ns | 945.25 ns | 9.5825 | 1.4648 | 58.97 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |-------------:|------------:|------------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1,154.8 ns | 23.08 ns | 30.81 ns | 0.3223 | 0.0019 | 1.98 KB |
| ListToDictionaryOrListTest1 | 40,420.1 ns | 662.35 ns | 587.16 ns | 11.2915 | 1.5869 | 69.51 KB |
| ObjectToDictionaryOrListExtend1 | 3,017.3 ns | 41.87 ns | 39.17 ns | 0.6981 | 0.0076 | 4.29 KB |
| ListToDictionaryOrListExtend1 | 118,633.5 ns | 2,269.10 ns | 2,613.10 ns | 26.0010 | 6.2256 | 159.75 KB |
| ObjectToDictionaryOrListExtend3 | 670.7 ns | 13.01 ns | 17.36 ns | 0.2394 | 0.0010 | 1.47 KB |
| ListToDictionaryOrListExtend3 | 25,559.9 ns | 500.47 ns | 535.50 ns | 8.4534 | 1.2207 | 51.85 KB |
| ObjectToDictionaryOrListExtend4 | 850.7 ns | 7.91 ns | 7.40 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend4 | 32,581.6 ns | 636.04 ns | 594.95 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend6 | 860.2 ns | 12.51 ns | 11.09 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend6 | 32,749.6 ns | 626.24 ns | 670.07 ns | 9.5825 | 1.4648 | 58.97 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |-------------:|------------:|------------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1,142.3 ns | 14.38 ns | 13.45 ns | 0.3223 | 0.0019 | 1.98 KB |
| ListToDictionaryOrListTest1 | 41,393.6 ns | 738.81 ns | 986.29 ns | 11.2915 | 1.5869 | 69.51 KB |
| ObjectToDictionaryOrListExtend1 | 2,907.8 ns | 43.98 ns | 41.14 ns | 0.6981 | 0.0076 | 4.29 KB |
| ListToDictionaryOrListExtend1 | 115,034.6 ns | 2,116.03 ns | 1,979.34 ns | 26.0010 | 6.2256 | 159.75 KB |
| ObjectToDictionaryOrListExtend3 | 690.5 ns | 8.16 ns | 7.24 ns | 0.2394 | 0.0010 | 1.47 KB |
| ListToDictionaryOrListExtend3 | 25,062.3 ns | 443.73 ns | 561.17 ns | 8.4534 | 1.2207 | 51.85 KB |
| ObjectToDictionaryOrListExtend4 | 857.3 ns | 11.99 ns | 10.02 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend4 | 32,437.8 ns | 495.18 ns | 463.20 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend6 | 826.3 ns | 11.03 ns | 10.32 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend6 | 32,153.8 ns | 592.92 ns | 554.62 ns | 9.5825 | 1.4648 | 58.97 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |-------------:|------------:|------------:|--------:|-------:|----------:|
| ListToDictionaryOrListExtend1 | 116,128.1 ns | 1,486.53 ns | 1,390.50 ns | 26.0010 | 6.2256 | 159.75 KB |
| ObjectToDictionaryOrListExtend4 | 848.2 ns | 13.02 ns | 12.18 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend4 | 32,633.6 ns | 592.20 ns | 553.94 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend6 | 875.6 ns | 14.60 ns | 13.66 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend6 | 32,155.5 ns | 584.40 ns | 518.06 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend7 | 865.5 ns | 15.79 ns | 13.99 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend7 | 32,223.2 ns | 640.94 ns | 833.41 ns | 9.5825 | 1.4648 | 58.97 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |------------:|----------:|----------:|-------:|-------:|----------:|
| ObjectToDictionaryOrListExtend4 | 894.1 ns | 11.07 ns | 9.81 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend4 | 32,344.1 ns | 629.60 ns | 588.93 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend6 | 889.3 ns | 10.30 ns | 9.13 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend6 | 31,895.9 ns | 635.98 ns | 680.49 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend7 | 888.9 ns | 5.78 ns | 4.51 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend7 | 31,065.3 ns | 510.47 ns | 426.27 ns | 9.5825 | 1.4648 | 58.97 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |------------:|----------:|----------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListExtend4 | 885.3 ns | 14.24 ns | 13.32 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend4 | 32,187.6 ns | 616.44 ns | 685.17 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend6 | 849.6 ns | 7.48 ns | 6.63 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend6 | 31,935.4 ns | 618.09 ns | 578.16 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend7 | 857.4 ns | 10.68 ns | 9.47 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend7 | 32,940.2 ns | 607.15 ns | 927.18 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend8 | 931.2 ns | 12.56 ns | 11.74 ns | 0.2956 | 0.0019 | 1.81 KB |
| ListToDictionaryOrListExtend8 | 34,918.2 ns | 422.10 ns | 352.47 ns | 10.4370 | 1.6479 | 64.28 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |------------:|----------:|----------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListExtend4 | 872.8 ns | 13.02 ns | 10.87 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend4 | 32,255.8 ns | 459.85 ns | 384.00 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend6 | 884.6 ns | 13.15 ns | 11.66 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend6 | 32,844.8 ns | 646.78 ns | 885.33 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend7 | 855.6 ns | 10.06 ns | 8.91 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend7 | 31,293.3 ns | 453.63 ns | 424.33 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend8 | 904.4 ns | 10.86 ns | 10.16 ns | 0.2956 | 0.0019 | 1.81 KB |
| ListToDictionaryOrListExtend8 | 35,556.6 ns | 688.53 ns | 676.23 ns | 10.4370 | 1.6479 | 64.28 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|-------------------------------- |------------:|----------:|----------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListExtend4 | 858.2 ns | 14.76 ns | 13.80 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend4 | 31,927.2 ns | 429.54 ns | 401.79 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend6 | 850.7 ns | 13.93 ns | 12.35 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend6 | 32,822.4 ns | 507.56 ns | 474.77 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend7 | 869.1 ns | 6.26 ns | 5.55 ns | 0.2670 | - | 1.64 KB |
| ListToDictionaryOrListExtend7 | 32,892.7 ns | 642.36 ns | 600.86 ns | 9.5825 | 1.4648 | 58.97 KB |
| ObjectToDictionaryOrListExtend8 | 880.1 ns | 11.15 ns | 9.88 ns | 0.2956 | 0.0019 | 1.81 KB |
| ListToDictionaryOrListExtend8 | 32,944.3 ns | 476.51 ns | 422.41 ns | 10.4370 | 1.6479 | 64.28 KB |
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
|------------------------------ |----------:|----------:|----------:|--------:|-------:|----------:|
| ObjectToDictionaryOrListTest1 | 1.220 us | 0.0241 us | 0.0458 us | 0.4177 | 0.0019 | 2.57 KB |
| ListToDictionaryOrListTest1 | 50.944 us | 1.0162 us | 1.9087 us | 17.4561 | 3.1128 | 107.09 KB |
views/Apps/Game/T_Game_Lists/Index.vue
/apps/game/t_game_lists
views/Apps/Game/T_Game_Typess/Index.vue
/apps/game/t_game_typess
views/Apps/Game/T_Game_Tagss/Index.vue
/apps/game/t_game_tagss
views/Apps/Game/T_Game_ChildLists/Index.vue
/apps/game/t_game_childlists
游戏类型中游戏排序(需要修改) 按类型,进行游戏排序
views/Apps/App/T_Epg_CategoryCfgs/Index.vue
/apps/app/t_epg_categorycfgs
views/Apps/App/T_Epg_Cfgs/Index.vue
/apps/app/t_epg_cfgs
登录接口 设备号登录
获取用户信息
必玩-热血-游戏详情-推荐
热门
方块
(主页-体育竞技)-搜索logo
游戏详情页的logo
游戏库logo
必须图 ——
中等LOGO首页体育竞技 = 搜索
小LOGO首页最近推出 = 游玩历史 = 游戏详情页logo ImageIconId
大LOGO首页爆款热门 有
长方形,首页蘑菇必玩 = 首页热血格斗 = 游戏详情页游戏推荐 (有) ImageId_TJ
大方块首页GTA系列 (有) ImageId_FK
中方块,游戏库 有 (有) ImageId_YXK
banner游戏详情页
必备图 ——
小LOGO首页最近推出 = 游玩历史 = 游戏详情页logo。图片命名logo_1 ImageIconId
ImageId_ShouSuo
大LOGO首页爆款热门。图片命名logo_3 ImageId_RM
中方块游戏库。图片命名youxiku ImageId_YXK
竖形图,首页蘑菇必玩 = 首页热血格斗 = 游戏详情页游戏推荐。图片命名biwan ImageId_TJ
大方块首页GTA系列。图片命名xilie ImageId_FK
banner游戏详情页。图片命名banner
https://bajiapi.onelight.vip/static/web/static/common/logo.png
https://bajiapi.onelight.vip//ueditor/php/upload/image/20241023/1729688411444414.jpg
https://bajiapi.onelight.vip/storage/topic/20241017/e86c64a2751bffc31dce863700ba132b.jpg
![alt text](20241109221023.png)
@楷枋@闪光大帕鲁
必备图 ——
小LOGO首页最近推出 = 游玩历史 = 游戏详情页logo。图片命名logo_1
中等LOGO首页体育竞技 = 搜索。图片命名logo_2
大LOGO首页爆款热门。图片命名logo_3
竖形图,首页蘑菇必玩 = 首页热血格斗 = 游戏详情页游戏推荐。图片命名biwan
大方块首页GTA系列。图片命名xilie
中方块游戏库。图片命名youxiku
banner游戏详情页。图片命名banner
非必备图 ——
横图,首页超值活动
首页banner
docker build -t cg-admin:dev-0.0.3 -f CloudGaming.Api.Admin/Dockerfile .
docker build -t cg-admin:dev-0.0.2 -f CloudGaming.Api.Admin/Dockerfile .
docker save -o I:/docker/ubuntu/cg-admin-0.02.tar cg-admin:dev-0.0.2
string6fba9c210de54734a91ef4961684d3d1
352ed4aee503a3bf5a66042775eedb07
352ed4aee503a3bf5a66042775eedb07

View File

@ -0,0 +1,13 @@
docker build -t cg-admin:dev-0.0.2 -f CloudGaming.Api.Admin/Dockerfile .
docker save -o I:/docker/ubuntu/cg-admin-0.03.tar cg-admin:dev-0.0.3
docker load -i cg-admin-0.03.tar
docker run -d -p 91:80 cg-admin:dev-0.0.3
docker build -t cloudgaming:dev-0.0.4 -f Api/CloudGaming.Api/Dockerfile .
docker save -o I:/docker/ubuntu/cloudgaming-0.0.3.tar cloudgaming:dev-0.0.3
eyJhbGciOiJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNobWFjLXNoYTI1NiIsInR5cCI6IkpXVCJ9.eyJOaWNrTmFtZSI6IuiSuOaxveS6kea4uDE0NTYiLCJVc2VySWQiOiIyIiwiZXhwIjoxNzMyMTg4MDg3LCJpc3MiOiJzdGVhbWNsb3VkLmNvIiwiYXVkIjoic3RlYW1jbG91ZC5jbyJ9.2CikkM3vn1PmzW4kkIKChq6QNexNzfvmSTEB7DB8mOU

View File

@ -0,0 +1,3 @@
{
"api.App.GetConfig1.Message":"天才"
}

View File

@ -1,3 +1,5 @@
## 游戏数据库名称 ## 游戏数据库名称
用户 1. 用户:CloudGamingUser
CloudGaming 2. 云游戏数据库:CloudGamingGame
3. 云游戏手机端配置:CloudGamingPhone
4. 云游戏扩展配置:CloudGamingCBT

View File

@ -0,0 +1,2 @@
AccessKey ID,AccessKey Secret
LTAI5tEMoHbcDC5d9CQWovJk,DgnYOJr0l9hTnl82vI4BxwVgtE1RdL
1 AccessKey ID AccessKey Secret
2 LTAI5tEMoHbcDC5d9CQWovJk DgnYOJr0l9hTnl82vI4BxwVgtE1RdL

View File

@ -0,0 +1,81 @@
### 项目进度存在的问题
![alt text](QQ_1728580466287.png)
1. 登录方式需要准备: 蘑菇使用的是mobpush
发送手机号用第三方哪一家的 SDK
一键登录使用那家的?
2. 实名认证 api
身份信息核验
腾讯云: 0.3 1000 300
阿里云:
第三方:
数脉 API 0.036 5000 180 [数脉 API](https://market.aliyun.com/apimarket/detail/cmapi026109?spm=5176.api_collection.collection-page.1.30d11d66865dHb#sku=yuncode2010900002)
### 项目难点
1. 多语言问题
2. 部分数据表不全
3. 云游戏核心(放后面)
### 11 号目标
1. 完成基础组件(已完成)、缓存(已完成)、redis 缓存(已完成)、日志组件(已完成)
### 12 号目标
1. 完成首页接口
2. 完成游戏分类接口
### 13 号目标
1. 完成后台管理技术难点
2. 实验多语言技术路径
### 14 号目标
1. 完成 AppConfig 接口
2. 完成手机号登录接口
### 后台管理技术
1. 采用 vue3
## 阿里云
氢荷健康
Hyhe2022
{"Token":"352ed4aee503a3bf5a66042775eedb07"}
{"UserName":"张三","PassWord":"312321"}
public class LoginToken{
public string Token{get;set;}
}
public class LoginUser{
public string UserName{get;set;}
public string PassWord{get;set;}
}
##
1. 七天签到
2. 任务中心
3. 游戏时长排行
4. 一键登录
5. 兑换码
6. 反馈中心
7. 我的收藏
8. 搜索页面推荐-热度
9. 头像框
10. 头像列表
11. 玩游戏
12. 游戏心跳设置

View File

@ -87,6 +87,24 @@ release the following port (8888|888|80|443|20|21) in the security group
## 请选择以下其中一种方式解决不安全提醒
1、下载证书地址https://dg2.bt.cn/ssl/baota_root.pfx 双击安装,密码【www.bt.cn】
2、点击【高级】-【继续访问】或【接受风险并继续】访问
教程https://www.bt.cn/bbs/thread-117246-1-1.html
mac用户请下载使用此证书https://dg2.bt.cn/ssl/baota_root.crt
========================面板账户登录信息==========================
【云服务器】请在安全组放行 34936 端口
外网面板地址: https://119.45.131.215:34936/7cf1f8cc
内网面板地址: https://10.206.0.8:34936/7cf1f8cc
username: cf3mthue
password: fc3f3005
xinglanmh_shequt
xinglanmh_shequt 9dG2b5E5cWkzkAya
### 一番赏抽奖规则修改 ### 一番赏抽奖规则修改
#### 原规则 #### 原规则
@ -169,3 +187,22 @@ ALTER TABLE `goods` ADD COLUMN `goods_describe` VARCHAR(300) COMMENT '描述'
3. 抽奖的时候增加抽中逻辑 3. 抽奖的时候增加抽中逻辑
4. 发放奖品添加新的发放逻辑 4. 发放奖品添加新的发放逻辑
5. 前端页面展示福袋和宝箱内的奖品列表 5. 前端页面展示福袋和宝箱内的奖品列表
wx3dcc897ef3f95446
5b6be87fd3df73d4f04e0a5f269b703d
【云服务器】请在安全组放行 8888 端口
外网面板地址: https://119.45.131.215:8888/bskjbt
内网面板地址: https://10.206.0.8:8888/bskjbt
username: bskjbt
password: 7415dc59
baji2024

View File

@ -62,7 +62,10 @@ docker node rm <old-node-id>
docker save -o miaoyu.tar miaoyu:dev-1.2.5 docker save -o miaoyu.tar miaoyu:dev-1.2.5
docker save -o I:/docker/ubuntu/ubuntu.22.04.tar ubuntu:22.04 docker save -o I:/docker/ubuntu/ubuntu.22.04.tar ubuntu:22.04
docker save -o I:/docker/ubuntu/cg-admin.tar cloudgaming.api.admin:dev-0.0.1
docker load -i <镜像文件名>.tar
docker save -o /disk/Public/miaoyu/Public/docker/miaoyu.tar miaoyu:dev-1.2.5 docker save -o /disk/Public/miaoyu/Public/docker/miaoyu.tar miaoyu:dev-1.2.5
# 修改镜像标签,先修改在推送到服务器 # 修改镜像标签,先修改在推送到服务器
docker tag miaoyuapi:dev-1.2.6 123.207.203.228:92/miaoyuapi:dev-1.2.6 docker tag miaoyuapi:dev-1.2.6 123.207.203.228:92/miaoyuapi:dev-1.2.6
@ -71,6 +74,11 @@ docker tag miaoyuapi:dev-1.2.6 123.207.203.228:92/miaoyuapi:dev-1.2.6
## 打包镜像 ## 打包镜像
docker build -t miaoyuapi:dev-1.2.6 -progress=plain --build-arg VERSION=1.2.6 --build-arg TARGET=dev -f src/2-api/HuanMeng.MiaoYu.WebApi/Dockerfile . docker build -t miaoyuapi:dev-1.2.6 -progress=plain --build-arg VERSION=1.2.6 --build-arg TARGET=dev -f src/2-api/HuanMeng.MiaoYu.WebApi/Dockerfile .
docker build -t cg-admin:dev-0.0.2 -f CloudGaming.Api.Admin/Dockerfile .
docker build -t cg-admin:dev-0.0.2 -f CloudGaming.Api.Admin/Dockerfile .
docker save -o I:/docker/ubuntu/cg-admin-0.02.tar cg-admin:dev-0.0.2
# 运行 # 运行
docker run -d -p 90:90 -v miaoyu-log:/app/output --name webapi miaoyu:dev-0.0.3 docker run -d -p 90:90 -v miaoyu-log:/app/output --name webapi miaoyu:dev-0.0.3

View File

@ -13,5 +13,5 @@ docker run --name mysql5.7 -e MYSQL_ROOT_PASSWORD=yourpassword -d mysql:5.7
## docker run --name mysql5.7 -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d mysql:5.7 ## docker run --name mysql5.7 -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d mysql:5.7
docker run --name my-mysql-container -e MYSQL_ROOT_PASSWORD=Dbt@com@123 -d -p 3306:3306 mysql:8.0.20
``` ```

View File

@ -0,0 +1,4 @@
docker run --restart=always -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Dbt@com@123" \
-p 1433:1433 --name sqlserver \
-v /disk/mssql:/var/opt/mssql \
-d mcr.microsoft.com/mssql/server:2022-latest

View File

@ -8,6 +8,7 @@ curl -s https://install.zerotier.com | sudo bash
sudo apt install zerotier-one sudo apt install zerotier-one
# 启动并加入网络 sudo zerotier-cli join <network-id> # 启动并加入网络 sudo zerotier-cli join <network-id>
sudo zerotier-cli join 48d6023c465446a4 sudo zerotier-cli join 48d6023c465446a4
48d6023c465446a4
# 检查连接状态 # 检查连接状态
sudo zerotier-cli listnetworks sudo zerotier-cli listnetworks
# 开机自启 # 开机自启

View File

@ -38,7 +38,7 @@ sudo ufw allow 3306/tcp
sudo mkdir /disk sudo mkdir /disk
# 获取权限 # 获取权限
sudo chmod -R 777 * sudo chmod -R 777 /www/wwwroot
sudo chmod 777 /disk sudo chmod 777 /disk
sudo chmod -R 750 /path/to/directory sudo chmod -R 750 /path/to/directory
sudo chown 755 -R www:www /www/wwwroot/shequtuangou sudo chown 755 -R www:www /www/wwwroot/shequtuangou
@ -117,6 +117,13 @@ ssh: 远程登录。
tar: 打包和解压文件。 tar: 打包和解压文件。
gzip 或 gunzip: 压缩和解压 gzip 格式的文件。 gzip 或 gunzip: 压缩和解压 gzip 格式的文件。
zip 或 unzip: 压缩和解压 zip 格式的文件。 zip 或 unzip: 压缩和解压 zip 格式的文件。
# 压缩文件 file1 和目录 dir2 到 test.tar.gz
tar -zcvf test.tar.gz file1 dir2
# 解压 test.tar.gz将 c 换成 x 即可)
tar -zxvf 101.43.1.207_20241106_141932.tar.gz
# 列出压缩文件的内容
tar -ztvf test.tar.gz
``` ```

View File

@ -12,6 +12,8 @@ ssh-copy-id -i ~/.ssh/id_rsa.pub ubuntu@123.207.203.228
ssh-copy-id -i ~/.ssh/id_rsa.pub ubuntu@123.207.203.228 ssh-copy-id -i ~/.ssh/id_rsa.pub ubuntu@123.207.203.228
ssh-copy-id -i ~/.ssh/id_rsa.pub root@123.207.203.228 ssh-copy-id -i ~/.ssh/id_rsa.pub root@123.207.203.228
ssh-copy-id -i ~/.ssh/id_rsa.pub root@110.42.231.54
ssh-copy-id -i ~/.ssh/id_rsa.pub root@119.45.131.215
``` ```
@ -28,6 +30,8 @@ ssh root@192.168.1.229 -i ~/.ssh/229_rsa
ssh-copy-id -i ~/.ssh/id_rsa.pub root@43.154.208.215 ssh-copy-id -i ~/.ssh/id_rsa.pub root@43.154.208.215
ssh root@43.154.208.215 -i ~/.ssh/25_rsa ssh root@43.154.208.215 -i ~/.ssh/25_rsa
ssh-keygen -R 119.45.131.215
``` ```
# linux ssh 创建 # linux ssh 创建

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 KiB

View File

@ -417,7 +417,7 @@ let mp_info = {
if (isZhanDou != null) { if (isZhanDou != null) {
// console.log('战斗中'); // console.log('战斗中');
} }
// console.log(p); console.log(p);
if (p != null) { if (p != null) {
console.log(p.x, p.y); console.log(p.x, p.y);
if (this.AutoFightInfo.isFengShou && (this.AutoFightInfo.currentRounds == 0 || this.AutoFightInfo.currentRounds == 2)) { if (this.AutoFightInfo.isFengShou && (this.AutoFightInfo.currentRounds == 0 || this.AutoFightInfo.currentRounds == 2)) {