12121
This commit is contained in:
@@ -168,7 +168,9 @@ public class GameMonsterService(ISqlSugarClient DbClient, IRedisCache redis) : I
|
|||||||
{
|
{
|
||||||
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_monster>();
|
var db = DbClient.AsTenant().GetConnectionWithAttr<unit_user_monster>();
|
||||||
return await db.Queryable<unit_user_monster>()
|
return await db.Queryable<unit_user_monster>()
|
||||||
.Where(it => it.userId == userId && it.monsterId == monsterId && it.state == state).CountAsync();
|
.Where(it => it.userId == userId && it.monsterId == monsterId)
|
||||||
|
.WhereIF(state != -1, it => it.state == state)
|
||||||
|
.CountAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ public class GameTaskService(ISqlSugarClient DbClient, IRedisCache redis) : IGam
|
|||||||
if (!string.IsNullOrEmpty(item.mapId) && !string.IsNullOrEmpty(item.parameter))
|
if (!string.IsNullOrEmpty(item.mapId) && !string.IsNullOrEmpty(item.parameter))
|
||||||
{
|
{
|
||||||
int opCount = 0;
|
int opCount = 0;
|
||||||
int count = await monsterService.GetUserMonsterCount(userId, item.parameter, 0);
|
int count = await monsterService.GetUserMonsterCount(userId, item.parameter, -1);
|
||||||
if (count < item.count)
|
if (count < item.count)
|
||||||
{
|
{
|
||||||
opCount = (int)item.count - count;
|
opCount = (int)item.count - count;
|
||||||
|
|||||||
Reference in New Issue
Block a user