diff --git a/Service/Application.Domain.Entity/game/game/game_trade.cs b/Service/Application.Domain.Entity/game/game/game_trade.cs new file mode 100644 index 0000000..c00579b --- /dev/null +++ b/Service/Application.Domain.Entity/game/game/game_trade.cs @@ -0,0 +1,63 @@ +using SqlSugar; +using System; + +namespace Application.Domain.Entity +{ + [Tenant("Kg.SeaTime.Game")] + public class game_trade + { + /// + /// tradeId + /// + [SugarColumn(IsPrimaryKey = true, Length = 50)] + public string tradeId { get; set; } + + /// + /// userId + /// + [SugarColumn(Length = 50, IsNullable = true)] + public string? userId { get; set; } + + /// + /// code + /// + [SugarColumn(Length = 50, IsNullable = true)] + public string? code { get; set; } + + /// + /// propId + /// + [SugarColumn(Length = 50, IsNullable = true)] + public string? propId { get; set; } + + /// + /// name + /// + [SugarColumn(Length = 50, IsNullable = true)] + public string? name { get; set; } + + /// + /// count + /// + [SugarColumn(IsNullable = true)] + public int? count { get; set; } + + /// + /// price + /// + [SugarColumn(IsNullable = true)] + public long? price { get; set; } + + /// + /// content + /// + [SugarColumn(IsNullable = true)] + public string? content { get; set; } + + /// + /// addTime + /// + [SugarColumn(IsNullable = true)] + public DateTime? addTime { get; set; } + } +} \ No newline at end of file diff --git a/Service/Application.Domain/Enum/GoodsEnum.cs b/Service/Application.Domain/Enum/GoodsEnum.cs index 189eb13..34be1c5 100644 --- a/Service/Application.Domain/Enum/GoodsEnum.cs +++ b/Service/Application.Domain/Enum/GoodsEnum.cs @@ -17,6 +17,7 @@ public static class GoodsEnum ChoicePack,//选择宝箱 Weight,//负重 Gift,//礼物道具 + Tease,//整蛊道具 Exp,//经验 State,//状态物品 Ship,//船只 diff --git a/Service/Application.Domain/Services/Interface/Equ/IGameEquService.cs b/Service/Application.Domain/Services/Interface/Equ/IGameEquService.cs index 30c993f..d51638b 100644 --- a/Service/Application.Domain/Services/Interface/Equ/IGameEquService.cs +++ b/Service/Application.Domain/Services/Interface/Equ/IGameEquService.cs @@ -14,6 +14,8 @@ public interface IGameEquService Task> GetUserEquData(string userId, int type, string equName, int PageIndex, int PageSize, RefAsync Total, bool isRemOn = false, bool isRemLock = false); + Task> GetUserEquData(string userId, int type, string equName, int PageIndex, + int PageSize, RefAsync Total,int DealType); Task> GetUserEquData(string userId, string query); Task> GetUserEquData(string userId, int equId); Task> GetUserEquData(string userId, string code, List noUeId); diff --git a/Service/Application.Domain/Services/Interface/Goods/IGameGoodsService.cs b/Service/Application.Domain/Services/Interface/Goods/IGameGoodsService.cs index fd37e06..339b961 100644 --- a/Service/Application.Domain/Services/Interface/Goods/IGameGoodsService.cs +++ b/Service/Application.Domain/Services/Interface/Goods/IGameGoodsService.cs @@ -17,6 +17,9 @@ public interface IGameGoodsService Task> GetUserGoodsData(string userId, List code, List noCode, string search, int page, int limit, RefAsync total); + + Task> GetUserGoodsData(string userId, List code, List noCode, string search, int page, + int limit, RefAsync total,int DealType); Task> GetUserGoodsData(string userId, string code); Task UpdateUserGoods(string userId, int op, int goodsId, int count, string remark = ""); diff --git a/Service/Application.Domain/Services/Interface/Pub/ITradeService.cs b/Service/Application.Domain/Services/Interface/Pub/ITradeService.cs new file mode 100644 index 0000000..f32a027 --- /dev/null +++ b/Service/Application.Domain/Services/Interface/Pub/ITradeService.cs @@ -0,0 +1,7 @@ +namespace Application.Domain; + +public interface ITradeService +{ + Task AddTrade(string userId, string code,string name, string propId, int count, long price,string content); + Task GetUserTradeCount(string userId); +} \ No newline at end of file diff --git a/Service/Application.Domain/Services/Service/Chat/GameChatService.cs b/Service/Application.Domain/Services/Service/Chat/GameChatService.cs index 80646a7..5935c6d 100644 --- a/Service/Application.Domain/Services/Service/Chat/GameChatService.cs +++ b/Service/Application.Domain/Services/Service/Chat/GameChatService.cs @@ -137,7 +137,7 @@ public class GameChatService : IGameChatService, ITransient chat.delTime = TimeExtend.GetTimeStampBySeconds(DateTime.Now.AddHours(6)); break; case "Notice": - chat.delTime = TimeExtend.GetTimeStampBySeconds(DateTime.Now.AddDays(1)); + chat.delTime = TimeExtend.GetTimeStampBySeconds(DateTime.Now.AddDays(7)); chat.code = nameof(GameChatEnum.Code.System); break; case "Group": diff --git a/Service/Application.Domain/Services/Service/Equ/GameEquService.cs b/Service/Application.Domain/Services/Service/Equ/GameEquService.cs index 6ec3985..e991b5e 100644 --- a/Service/Application.Domain/Services/Service/Equ/GameEquService.cs +++ b/Service/Application.Domain/Services/Service/Equ/GameEquService.cs @@ -55,14 +55,32 @@ public class GameEquService(ISqlSugarClient DbClient, IRedisCache redis) : IGame .OrderByDescending(it => it.lev) .OrderByDescending(it => it.ueId).ToPageListAsync(PageIndex, PageSize, Total); } - public async Task> GetUserEquData(string userId,string query) + + public async Task> GetUserEquData(string userId, int type, string equName, int PageIndex, + int PageSize, RefAsync Total,int DealType) + { + long onTime = TimeExtend.GetTimeStampSeconds; + var db = DbClient.AsTenant().GetConnectionWithAttr(); + return await db.Queryable().Where(it => + it.userId == userId && it.isOn == 0 && it.isLock == 0 && + it.useEndTime > onTime) + .WhereIF(DealType == 0, it => it.isDeal == 1) + .WhereIF(DealType == 1, it => it.isDeal == 1 && it.isGive == 1) + .WhereIF(!string.IsNullOrEmpty(equName), + it => it.equName.Contains(equName) || it.unitEquName.Contains(equName)) + .OrderByDescending(it => it.isOn) + .OrderByDescending(it => it.lev) + .OrderByDescending(it => it.ueId).ToPageListAsync(PageIndex, PageSize, Total); + } + + public async Task> GetUserEquData(string userId, string query) { long onTime = TimeExtend.GetTimeStampSeconds; var db = DbClient.AsTenant().GetConnectionWithAttr(); return await db.Queryable().Where(it => it.userId == userId) .WhereIF(!string.IsNullOrEmpty(query), it => it.equName.Contains(query) || it.unitEquName.Contains(query)) - .ToListAsync(); + .ToListAsync(); } public async Task> GetUserEquData(string userId, int equId) @@ -857,8 +875,8 @@ public class GameEquService(ISqlSugarClient DbClient, IRedisCache redis) : IGame await EquOnOrDown(item, 0); } } - } + #endregion #region 耐久 diff --git a/Service/Application.Domain/Services/Service/Goods/GameGoodsService.cs b/Service/Application.Domain/Services/Service/Goods/GameGoodsService.cs index 5e9d4ee..8485291 100644 --- a/Service/Application.Domain/Services/Service/Goods/GameGoodsService.cs +++ b/Service/Application.Domain/Services/Service/Goods/GameGoodsService.cs @@ -70,6 +70,23 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa .ToPageListAsync(page, limit, total); } + public async Task> GetUserGoodsData(string userId, List code, List noCode, + string search, int page, + int limit, RefAsync total, int DealType) + { + var db = DbClient.AsTenant().GetConnectionWithAttr(); + return await db.Queryable().Where(it => + it.userId == userId && it.count > 0) + .WhereIF(DealType == 0, it => it.isDeal == 1) + .WhereIF(DealType == 1, it => it.isDeal == 1 && it.isGive == 1) + .WhereIF(code.Count > 0, it => code.Contains(it.code)) + .WhereIF(noCode.Count > 0, it => !noCode.Contains(it.code)) + .WhereIF(!string.IsNullOrEmpty(search), it => it.goodsName.Contains(search)) + .OrderBy(it => it.lev, OrderByType.Desc) + .OrderBy(it => it.count, OrderByType.Desc) + .ToPageListAsync(page, limit, total); + } + public async Task> GetUserGoodsData(string userId, string code) { var db = DbClient.AsTenant().GetConnectionWithAttr(); @@ -263,7 +280,7 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa { result = "您已经使用过该药品啦!"; } - + if (!string.IsNullOrEmpty(scene)) { //要判断使用个数 @@ -282,14 +299,16 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa return result; } - public async Task CheckUseDrug(string userId, int goodsId,string scene = "") + + public async Task CheckUseDrug(string userId, int goodsId, string scene = "") { string result = string.Empty; var goodsInfo = await GetGoodsContent(goodsId); if (!string.IsNullOrEmpty(goodsInfo)) { - result = await CheckUseDrug(userId,goodsId, goodsInfo, scene); + result = await CheckUseDrug(userId, goodsId, goodsInfo, scene); } + return result; } @@ -320,7 +339,8 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa } else if (_drugConfig.cls == nameof(GoodsEnum.DrugCls.BloodStock)) { - result = await attrService.AddUserStock(userId, goodsId.ToString(), Convert.ToString(_drugConfig.name),Convert.ToString(_drugConfig.type), + result = await attrService.AddUserStock(userId, goodsId.ToString(), Convert.ToString(_drugConfig.name), + Convert.ToString(_drugConfig.type), Convert.ToString(_drugConfig.code), Convert.ToInt64(_drugConfig.num), Convert.ToString(_drugConfig.par), Convert.ToInt32(_drugConfig.minute)); @@ -332,13 +352,14 @@ public class GameGoodsService(ISqlSugarClient DbClient, IRedisCache redis) : IGa return result; } + public async Task UseDrug(string userId, int goodsId, string scene = "") { bool result = false; var goodsInfo = await GetGoodsContent(goodsId); if (!string.IsNullOrEmpty(goodsInfo)) { - result = await UseDrug(userId,goodsId, goodsInfo, scene); + result = await UseDrug(userId, goodsId, goodsInfo, scene); } return result; diff --git a/Service/Application.Domain/Services/Service/Pub/TradeService.cs b/Service/Application.Domain/Services/Service/Pub/TradeService.cs new file mode 100644 index 0000000..81633bf --- /dev/null +++ b/Service/Application.Domain/Services/Service/Pub/TradeService.cs @@ -0,0 +1,28 @@ +namespace Application.Domain; + +public class TradeService(ISqlSugarClient DbClient, IRedisCache redis) : ITradeService, ITransient +{ + public async Task AddTrade(string userId, string code,string name, string propId, int count,long price, string content) + { + game_trade trade = new game_trade() + { + tradeId = StringAssist.NewGuid, + userId = userId, + code = code, + name = name, + propId = propId, + count = count, + price = price, + content = content, + addTime = DateTime.Now + }; + var db = DbClient.AsTenant().GetConnectionWithAttr(); + return await db.Insertable(trade).ExecuteCommandAsync() > 0; + } + + public async Task GetUserTradeCount(string userId) + { + var db = DbClient.AsTenant().GetConnectionWithAttr(); + return await db.Queryable().Where(it => it.userId == userId).CountAsync(); + } +} \ No newline at end of file diff --git a/Service/Application.Web/Controllers/Pub/TradeController.cs b/Service/Application.Web/Controllers/Pub/TradeController.cs new file mode 100644 index 0000000..afbc12b --- /dev/null +++ b/Service/Application.Web/Controllers/Pub/TradeController.cs @@ -0,0 +1,148 @@ +using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json; + +namespace Application.Web.Controllers.Pub; + +[Route("[controller]/[action]")] +[ApiController] +[Authorize] +public class TradeController : ControllerBase +{ + private readonly IGameGoodsService _goodsService; + private readonly IGameEquService _equService; + private readonly IUnitUserWeight _weightService; + private readonly IUnitUserService _userService; + private readonly IGameChatService _chatService; + private readonly IUnitUserAttrService _attrService; + private readonly ITradeService _tradeService; + + public TradeController(IGameGoodsService goodsService, IGameEquService equService, IUnitUserWeight weightService, + IUnitUserService userService, IGameChatService chatService, + IUnitUserAttrService attrService, ITradeService tradeService) + { + _goodsService = goodsService; + _equService = equService; + _weightService = weightService; + _userService = userService; + _chatService = chatService; + _attrService = attrService; + _tradeService = tradeService; + } + + /// + /// 寄售物品 + /// + /// + /// + /// + /// + [HttpGet] + public async Task Trade(int type, string prop, long price, int count) + { + count = count < 1 ? 1 : count; + string userId = StateHelper.userId; + int lev = await _attrService.GetUserLev(userId); + if (lev < 60) + { + return PoAction.Message("60级后才可以寄售物品哦!"); + } + + var tradeCount = await _tradeService.GetUserTradeCount(userId); + if (tradeCount >= 5) + { + return PoAction.Message("玩家最多同时寄售5件物品哦!"); + } + + if (type == 0) //装备 + { + var equInfo = await _equService.GetUserEquInfo(prop); + if (equInfo == null) + { + return PoAction.Message("装备不存在!"); + } + + if (equInfo.userId != userId || equInfo.isOn == 1 || equInfo.isLock == 1 || equInfo.isDeal == 0) + { + return PoAction.Message("该装备无法寄售!"); + } + + long minPrice = (int)equInfo.lev * 100; + if (price < minPrice) + { + return PoAction.Message($"该装备最低寄售价格{minPrice}铜贝!"); + } + + if (await _equService.DeductUserEqu(userId, [equInfo], "寄售装备")) + { + string data = JsonConvert.SerializeObject(equInfo); + if (await _tradeService.AddTrade(userId, nameof(GameEnum.PropCode.Equ), equInfo.unitEquName, + equInfo.ueId, 1, price, data)) + { + return PoAction.Ok(true); + } + else + { + await _equService.AddUserEqu(equInfo, "寄售失败返还!"); + return PoAction.Message("寄售失败,请稍后尝试!"); + } + } + else + { + return PoAction.Message("寄售失败,请稍后尝试!"); + } + } + else if (type == 1) //物品 + { + if (count > 99) + { + return PoAction.Message("单次寄售数量最多为99个!"); + } + + int goodsId = Convert.ToInt32(prop); + var MyGoods = await _goodsService.GetUserGoodsInfo(userId, goodsId); + if (MyGoods == null) + { + return PoAction.Message("物品数量不足!"); + } + + if (MyGoods.count < count) + { + return PoAction.Message("物品数量不足!"); + } + + if (MyGoods.isDeal == 0) + { + return PoAction.Message("该物品无法寄售!"); + } + + long minPrice = (int)MyGoods.lev * 100; + if (price < minPrice) + { + return PoAction.Message($"该物品最低寄售价格{minPrice}铜贝!"); + } + + if (await _goodsService.UpdateUserGoods(userId, 0, goodsId, count, "寄售物品")) + { + if (await _tradeService.AddTrade(userId, nameof(GameEnum.PropCode.Goods), MyGoods.goodsName, prop, + count, price, + "")) + { + return PoAction.Ok(true); + } + else + { + await _goodsService.UpdateUserGoods(userId, 1, goodsId, count, "寄售失败返还!"); + return PoAction.Message("寄售失败,请稍后尝试!"); + } + } + else + { + return PoAction.Message("寄售失败,请稍后尝试!"); + } + } + else + { + return PoAction.Message("该物品不允许寄售!"); + } + } +} \ No newline at end of file diff --git a/Service/Application.Web/Controllers/User/GiveController.cs b/Service/Application.Web/Controllers/User/GiveController.cs index a5383b3..bf793d1 100644 --- a/Service/Application.Web/Controllers/User/GiveController.cs +++ b/Service/Application.Web/Controllers/User/GiveController.cs @@ -19,10 +19,11 @@ public class GiveController : ControllerBase private readonly IUnitUserService _userService; private readonly IGameChatService _chatService; private readonly IMessageService _messageService; + private readonly IUnitUserAttrService _attrService; public GiveController(IGameGoodsService goodsService, IGameEquService equService, IUnitUserWeight weightService, IUnitUserRelationService relationService, IUnitUserService userService, IGameChatService chatService, - IMessageService messageService) + IMessageService messageService,IUnitUserAttrService attrService) { _goodsService = goodsService; _equService = equService; @@ -31,6 +32,7 @@ public class GiveController : ControllerBase _userService = userService; _chatService = chatService; _messageService = messageService; + _attrService = attrService; } /// @@ -159,4 +161,286 @@ public class GiveController : ControllerBase return PoAction.Ok(new { data, total = total.Value }); } + /// + /// 获取赠送物品列表 + /// + /// + /// + /// + /// + /// + [HttpGet] + public async Task GetGoodsData(string no, int type, string? query, int page) + { + var fromInfo = await _userService.GetUserInfoByUserNo(no); + if (fromInfo == null) + { + return PoAction.Message("玩家不存在!"); + } + + string userId = StateHelper.userId; + int areaId = StateHelper.areaId; + if (areaId != fromInfo.areaId) + { + return PoAction.Message("玩家不存在!"); + } + + RefAsync total = 0; + if (type == 0) + { + var data = await _equService.GetUserEquData(userId, 0, query, page, 10, total, 1); + return PoAction.Ok(new + { + userNo = fromInfo.userNo, + nick = fromInfo.nick, data, total = total.Value + }); + } + else if (type == 1) + { + List code = new List() { nameof(GoodsEnum.Code.Drug) }; + var data = await _goodsService.GetUserGoodsData(userId, code, new List(), query, page, 10, total, + 1); + return PoAction.Ok(new + { + userNo = fromInfo.userNo, + nick = fromInfo.nick, data, total = total.Value + }); + } + else if (type == 2) + { + List code = new List(); + List noCode = new List() { nameof(GoodsEnum.Code.Drug) }; + var data = await _goodsService.GetUserGoodsData(userId, code, noCode, query, page, 10, total, 1); + return PoAction.Ok(new + { + userNo = fromInfo.userNo, + nick = fromInfo.nick, data, total = total.Value + }); + } + else + { + return PoAction.Ok(new + { + userNo = fromInfo.userNo, + nick = fromInfo.nick, data = new List(), total = total.Value + }); + } + } + + /// + /// 赠送物品 + /// + /// + /// + /// + /// + /// + [HttpGet] + public async Task GiveGoods(string no, int type, string propId, int count) + { + string userId = StateHelper.userId; + int myLev = await _attrService.GetUserLev(userId); + if (myLev < 60) + { + return PoAction.Message("等级达到60级才可以赠送哦!"); + } + + count = count < 1 ? 1 : count; + var fromInfo = await _userService.GetUserInfoByUserNo(no); + if (fromInfo == null) + { + return PoAction.Message("玩家不存在!"); + } + + int areaId = StateHelper.areaId; + if (areaId != fromInfo.areaId) + { + return PoAction.Message("玩家不存在!"); + } + + if (type == 0) + { + var equInfo = await _equService.GetUserEquInfo(propId); + if (equInfo == null) + { + return PoAction.Message("装备不存在!"); + } + + if (equInfo.userId != userId || equInfo.isOn == 1 || equInfo.isLock == 1) + { + return PoAction.Message("该装备锁定或穿戴中!"); + } + + if (equInfo.isDeal == 0 || equInfo.isGive == 0) + { + return PoAction.Message("该装备无法交易或不可赠送!"); + } + + //验证负重 + if (await _weightService.CheckUserWeight(fromInfo.userId, (int)equInfo.weight) == false) + { + return PoAction.Message("对方负重不足!"); + } + + if (await _equService.DeductUserEqu(userId, [equInfo], $"赠送给玩家:{fromInfo.userId}")) + { + equInfo.userId = fromInfo.userId; + if (await _equService.AddUserEqu(equInfo, $"收到赠送,来源玩家:{userId}")) + { + var myInfo = await _userService.GetUserInfoByUserId(userId); + string msg = $"收到[{UbbTool.HomeUbb(myInfo.userNo, myInfo.nick)}]赠送的装备[{equInfo.equName}]"; + await _chatService.SendChat(fromInfo.userId, (int)fromInfo.areaId, nameof(GameChatEnum.Code.Notice), + msg); + return PoAction.Ok(true); + } + else + { + return PoAction.Message("赠送失败,请稍后尝试!"); + } + } + else + { + return PoAction.Message("赠送失败,请稍后尝试!"); + } + } + else if (type == 1 || type == 2) + { + int goodsId = Convert.ToInt32(propId); + var MyGoods = await _goodsService.GetUserGoodsInfo(userId, goodsId); + if (MyGoods == null) + { + return PoAction.Message("物品数量不足!"); + } + + if (MyGoods.count < count) + { + return PoAction.Message("物品数量不足!"); + } + + if (MyGoods.isDeal == 0 || MyGoods.isGive == 0) + { + return PoAction.Message("该无法无法交易或不可赠送!"); + } + + int useWeight = (int)MyGoods.weight * count; + if (await _weightService.CheckUserWeight(fromInfo.userId, useWeight) == false) + { + return PoAction.Message("对方负重不足!"); + } + + if (await _goodsService.UpdateUserGoods(userId, 0, goodsId, count, $"赠送给玩家:{fromInfo.userId}")) + { + if (await _goodsService.UpdateUserGoods(fromInfo.userId, 1, goodsId, count, $"收到赠送,来源玩家:{userId}")) + { + var myInfo = await _userService.GetUserInfoByUserId(userId); + string msg = $"收到[{UbbTool.HomeUbb(myInfo.userNo, myInfo.nick)}]赠送的物品[{MyGoods.goodsName}]×{count}"; + await _chatService.SendChat(fromInfo.userId, (int)fromInfo.areaId, nameof(GameChatEnum.Code.Notice), + msg); + return PoAction.Ok(true); + } + else + { + return PoAction.Message("赠送失败,请稍后尝试"); + } + } + else + { + return PoAction.Message("赠送失败,请稍后尝试"); + } + } + else + { + return PoAction.Message("赠送失败,请稍后尝试"); + } + } + + /// + /// 逗一下物品列表 + /// + /// + /// + [HttpGet] + public async Task GetUserDouGoods(string no) + { + var fromInfo = await _userService.GetUserInfoByUserNo(no); + if (fromInfo == null) + { + return PoAction.Message("玩家不存在!"); + } + + string userId = StateHelper.userId; + int areaId = StateHelper.areaId; + if (areaId != fromInfo.areaId) + { + return PoAction.Message("玩家不存在!"); + } + + var data = await _goodsService.GetUserGoodsData(userId, nameof(GoodsEnum.Code.Tease)); + return PoAction.Ok(new + { + userNo = fromInfo.userNo, + nick = fromInfo.nick, + data = data + }); + } + + /// + /// 使用逗物品 + /// + /// + /// + /// + /// + [HttpGet] + public async Task UseDou(string no,int goodsId, int count) + { + var fromInfo = await _userService.GetUserInfoByUserNo(no); + if (fromInfo == null) + { + return PoAction.Message("玩家不存在!"); + } + + string userId = StateHelper.userId; + int areaId = StateHelper.areaId; + if (areaId != fromInfo.areaId) + { + return PoAction.Message("玩家不存在!"); + } + + count = count < 1 ? 1 : count; + var myGoods = await _goodsService.GetUserGoodsInfo(userId, goodsId); + if (myGoods == null) + { + return PoAction.Message("您暂无该道具!"); + } + + if (myGoods.count < count) + { + return PoAction.Message("您的道具不足!"); + } + + if (myGoods.code != nameof(GoodsEnum.Code.Tease)) + { + return PoAction.Message("该道具无法使用!"); + } + + if (await _goodsService.UpdateUserGoods(userId, 0, goodsId, count, "使用道具")) + { + var goodsInfo = await _goodsService.GetGoodsInfo(goodsId); + UserStateModel stateConfig = JsonConvert.DeserializeObject(goodsInfo.content); + if(await _attrService.AddUserState(fromInfo.userId, goodsInfo.goodsId.ToString(), stateConfig.name, + stateConfig.scene, stateConfig.tips, stateConfig.attr, stateConfig.time, count)) + { + var myInfo = await _userService.GetUserInfoByUserId(userId); + string msg = $"[{UbbTool.HomeUbb(myInfo.userNo, myInfo.nick)}]对您使用了[{goodsInfo.goodsName}]×{count}"; + await _chatService.SendChat(fromInfo.userId, (int)fromInfo.areaId, nameof(GameChatEnum.Code.Notice), + msg); + } + return PoAction.Ok(true); + } + else + { + return PoAction.Message("使用失败,请稍后尝试!"); + } + } } \ No newline at end of file diff --git a/Web/src/pages/prop/equ.vue b/Web/src/pages/prop/equ.vue index 0aa88c2..eb5c683 100644 --- a/Web/src/pages/prop/equ.vue +++ b/Web/src/pages/prop/equ.vue @@ -71,7 +71,7 @@ 装备特性:{{ equAwaken[0].name }}({{ equAwaken[0].lev - }}级) + }}级)
附魔:{{ equMent.name }}
@@ -134,7 +134,7 @@ ◈{{ equData.isLock == 0 ? "绑定" : "解绑" }}
- ◈寄售
+ ◈寄售
+ +
+ 装备名称:
+ 寄售价格:铜贝 +
+
+ +
+
\ No newline at end of file diff --git a/Web/src/pages/prop/goods.vue b/Web/src/pages/prop/goods.vue index be500cc..048c890 100644 --- a/Web/src/pages/prop/goods.vue +++ b/Web/src/pages/prop/goods.vue @@ -3,7 +3,7 @@
- 名称:{{ data.goodsName }} 寄售
+ 名称:{{ data.goodsName }}
等级:{{ data.lev }}星
@@ -29,6 +29,9 @@
使用物品
+
+ 寄售 +
@@ -78,6 +81,18 @@ + + +
+ 物品名称:{{ data.goodsName }}
+ 物品数量:{{ count }}
+ 寄售价格:铜贝
+ 寄售数量: +
+
+ +
+
\ No newline at end of file diff --git a/Web/src/pages/user/bag/give.vue b/Web/src/pages/user/bag/give.vue index 41a40c8..8575e5a 100644 --- a/Web/src/pages/user/bag/give.vue +++ b/Web/src/pages/user/bag/give.vue @@ -1 +1,157 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/Web/src/pages/user/bag/index.vue b/Web/src/pages/user/bag/index.vue index 1887b6c..a1bfe40 100644 --- a/Web/src/pages/user/bag/index.vue +++ b/Web/src/pages/user/bag/index.vue @@ -5,9 +5,7 @@ 金贝:{{ bagInfo.cowry }}
负重:{{ bagInfo.onWeight }}/{{ bagInfo.maxWeight }} !
- {{ GameTool.FormatCopper(bagInfo.copper) }}
- 交易记录
- 赠送记录 + {{ GameTool.FormatCopper(bagInfo.copper) }}
diff --git a/Web/src/pages/user/interact/dou.vue b/Web/src/pages/user/interact/dou.vue index 41a40c8..c617444 100644 --- a/Web/src/pages/user/interact/dou.vue +++ b/Web/src/pages/user/interact/dou.vue @@ -1 +1,82 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/Web/src/pages/user/user.vue b/Web/src/pages/user/user.vue index 0a305e4..aa583b8 100644 --- a/Web/src/pages/user/user.vue +++ b/Web/src/pages/user/user.vue @@ -1,9 +1,9 @@