This commit is contained in:
Putoo
2026-06-25 18:39:45 +08:00
parent 9cf2c50298
commit c374f27d16
13 changed files with 571 additions and 16 deletions

View File

@@ -50,6 +50,7 @@ public class StoreController : ControllerBase
{
return PoAction.Message("Npc不存在!");
}
if (!npcInfo.bus.Any(it => it.code == nameof(GameEnum.NpcBusCode.Store)))
{
return PoAction.Message("业务不可用!");
@@ -88,6 +89,7 @@ public class StoreController : ControllerBase
{
return PoAction.Message("Npc不存在!");
}
if (!npcInfo.bus.Any(it => it.code == nameof(GameEnum.NpcBusCode.Store)))
{
return PoAction.Message("业务不可用!");
@@ -165,10 +167,12 @@ public class StoreController : ControllerBase
{
return PoAction.Message("Npc不存在!");
}
if (!npcInfo.bus.Any(it => it.code == nameof(GameEnum.NpcBusCode.Store)))
{
return PoAction.Message("业务不可用!");
}
var onMap = await _mapService.GetUserOnMapId(userId);
if (npcInfo.mapId != onMap)
{
@@ -179,25 +183,25 @@ public class StoreController : ControllerBase
if (type == 0)
{
var data = await _equService.GetUserEquData(userId, 0, query, page, 10, total, true);
return PoAction.Ok(new { data, total.Value });
var data = await _equService.GetUserEquData(userId, 0, query, page, 10, total, true, true);
return PoAction.Ok(new { data, total = total.Value });
}
else if (type == 1)
{
List<string> code = new List<string>() { nameof(GoodsEnum.Code.Drug) };
var data = await _goodsService.GetUserGoodsData(userId, code, new List<string>(), query, page, 10, total);
return PoAction.Ok(new { data, total.Value });
return PoAction.Ok(new { data, total = total.Value });
}
else if (type == 2)
{
List<string> code = new List<string>();
List<string> noCode = new List<string>() { nameof(GoodsEnum.Code.Drug) };
var data = await _goodsService.GetUserGoodsData(userId, code, noCode, query, page, 10, total);
return PoAction.Ok(new { data, total.Value });
return PoAction.Ok(new { data, total = total.Value });
}
else
{
return PoAction.Ok(new { data = new List<string>(), total.Value });
return PoAction.Ok(new { data = new List<string>(), total = total.Value });
}
}
@@ -229,7 +233,7 @@ public class StoreController : ControllerBase
return PoAction.Message("Npc不存在!");
}
if (parms.type == 0)//装备
if (parms.type == 0) //装备
{
var equInfo = await _equService.GetUserEquInfo(parms.id);
if (equInfo == null)
@@ -259,7 +263,7 @@ public class StoreController : ControllerBase
}
else
{
return PoAction.Message("出售失败,请稍后尝试!");
return PoAction.Message("出售失败,请稍后尝试!");
}
}
else //物品
@@ -288,7 +292,7 @@ public class StoreController : ControllerBase
}
else
{
return PoAction.Message("出售失败,请稍后尝试!");
return PoAction.Message("出售失败,请稍后尝试!");
}
}
}