1212
This commit is contained in:
@@ -209,7 +209,7 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa
|
|||||||
private async Task<long> GetUserDrugLockTime(string userId, int goodsId)
|
private async Task<long> GetUserDrugLockTime(string userId, int goodsId)
|
||||||
{
|
{
|
||||||
long result = 0;
|
long result = 0;
|
||||||
string key = string.Format(UserCache.BaseCacheKey, "UserDrug", $"Lock:{userId}_{goodsId}");
|
string key = string.Format(UserCache.BaseCacheKeys, "UserDrug", $"Lock:{userId}_{goodsId}");
|
||||||
if (await redis.ExistsAsync(key))
|
if (await redis.ExistsAsync(key))
|
||||||
{
|
{
|
||||||
long end = await redis.GetAsync<long>(key);
|
long end = await redis.GetAsync<long>(key);
|
||||||
@@ -225,7 +225,7 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa
|
|||||||
if (time > 0)
|
if (time > 0)
|
||||||
{
|
{
|
||||||
long end = TimeExtend.GetTimeStampSeconds + time;
|
long end = TimeExtend.GetTimeStampSeconds + time;
|
||||||
string key = string.Format(UserCache.BaseCacheKey, "UserDrug", $"Lock:{userId}_{goodsId}");
|
string key = string.Format(UserCache.BaseCacheKeys, "UserDrug", $"Lock:{userId}_{goodsId}");
|
||||||
await redis.SetAsync(key, end, time);
|
await redis.SetAsync(key, end, time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,7 +235,8 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa
|
|||||||
int result = 0;
|
int result = 0;
|
||||||
if (!string.IsNullOrEmpty(scene))
|
if (!string.IsNullOrEmpty(scene))
|
||||||
{
|
{
|
||||||
string key = string.Format(UserCache.BaseCacheKey, "UserDrug", $"Count:{scene}:{userId}_{goodsId}");
|
string maiId = $"Count:{scene}:{userId}_{goodsId}";
|
||||||
|
string key = string.Format(UserCache.BaseCacheKeys, "UserDrug", maiId);
|
||||||
if (await redis.ExistsAsync(key))
|
if (await redis.ExistsAsync(key))
|
||||||
{
|
{
|
||||||
result = await redis.GetAsync<int>(key);
|
result = await redis.GetAsync<int>(key);
|
||||||
@@ -251,7 +252,8 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa
|
|||||||
{
|
{
|
||||||
var count = await GetUserDrugLockCount(userId, goodsId, scene);
|
var count = await GetUserDrugLockCount(userId, goodsId, scene);
|
||||||
count += 1;
|
count += 1;
|
||||||
string key = string.Format(UserCache.BaseCacheKey, "UserDrug", $"Count:{scene}:{userId}_{goodsId}");
|
string maiId = $"Count:{scene}:{userId}_{goodsId}";
|
||||||
|
string key = string.Format(UserCache.BaseCacheKeys, "UserDrug",maiId);
|
||||||
await redis.SetAsync(key, count, 43200);
|
await redis.SetAsync(key, count, 43200);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<div class="timeService">
|
<div class="timeService">
|
||||||
小G报时({{ timeTips }})
|
小G报时({{ timeTips }})
|
||||||
</div>
|
</div>
|
||||||
<p style="font-weight:bold;font-size:14px">官方QQ群:931835791</p>
|
<p style="font-weight:bold;font-size:14px">官方QQ群:238938639</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|||||||
Reference in New Issue
Block a user