mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 16:03:25 +08:00
【修复】修复推荐商品随机数计算异常的问题。
This commit is contained in:
@@ -906,6 +906,11 @@ namespace CoreCms.Net.Repository
|
||||
var dbIds = new List<int>();
|
||||
if (!ids.Any()) return list;
|
||||
{
|
||||
if (ids.Length < number)
|
||||
{
|
||||
number = ids.Length;
|
||||
}
|
||||
|
||||
for (int i = 0; i < number; i++)
|
||||
{
|
||||
var id = GetRandomNumber(ids);
|
||||
@@ -964,6 +969,11 @@ namespace CoreCms.Net.Repository
|
||||
var dbIds = new List<int>();
|
||||
if (!ids.Any()) return list;
|
||||
{
|
||||
if (ids.Length < number)
|
||||
{
|
||||
number = ids.Length;
|
||||
}
|
||||
|
||||
for (int i = 0; i < number; i++)
|
||||
{
|
||||
var id = GetRandomNumber(ids);
|
||||
|
||||
Reference in New Issue
Block a user