상점 목록 작업
This commit is contained in:
parent
1247c76f66
commit
9efddf4600
|
|
@ -0,0 +1,32 @@
|
|||
using Microsoft.EntityFrameworkCore;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Server.SQL
|
||||
{
|
||||
[Table("shop_item", Schema = "gamedb")]
|
||||
public class ShopItem
|
||||
{
|
||||
[JsonIgnore]
|
||||
public long user_id { get; set; }
|
||||
public long id { get; set; }
|
||||
public long shop_item_data_id { get; set; }
|
||||
public DateTime end_date { get; set; }
|
||||
}
|
||||
|
||||
public class ShopItemSQL : SQL<ShopItem>
|
||||
{
|
||||
public override DbSet<ShopItem> table { get; set; }
|
||||
|
||||
public void Update(ShopItem ShopItem)
|
||||
{
|
||||
table.Update(ShopItem);
|
||||
}
|
||||
|
||||
public override List<ShopItem> SelectUid(long user_id)
|
||||
{
|
||||
//현재 시간도 비교해서 이전날자가 들어가지 않게 하기
|
||||
return table.Where(data => data.user_id == user_id).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -92,7 +92,8 @@ namespace Server.Service
|
|||
#endregion
|
||||
}
|
||||
#endregion
|
||||
#region 리셋 상점 세팅
|
||||
#region 상점 세팅
|
||||
//리셋 상점
|
||||
List<ResetShopItem> resetShopItem = Statics.resetShopItemSQL.SelectUid(user.id);
|
||||
List<ResetShopItem> addItem = new List<ResetShopItem>();
|
||||
List<ResetShopItemData> shopItemData = null;
|
||||
|
|
@ -243,9 +244,11 @@ namespace Server.Service
|
|||
Statics.resetShopItemSQL.SaveChanges();
|
||||
resetShopItem.AddRange(addItem);
|
||||
}
|
||||
//상점 구매 목록
|
||||
List<ShopItem> shopItem = Statics.shopItemSQL.SelectUid(user.id);
|
||||
#endregion
|
||||
|
||||
return makeResp(user, dynamicDataList, deckInfoList, itemManager, newUser, resetShopItem);
|
||||
return makeResp(user, dynamicDataList, deckInfoList, itemManager, newUser, resetShopItem, shopItem);
|
||||
}
|
||||
|
||||
public override Protocol ProtocolValue() => Protocol.Login;
|
||||
|
|
@ -256,7 +259,7 @@ namespace Server.Service
|
|||
return req;
|
||||
}
|
||||
|
||||
private string makeResp(User user, List<DynamicData> dynamicData, List<DeckInfo> deckInfo, ItemManager itemManager, bool newUser, List<ResetShopItem> resetShopItem)
|
||||
private string makeResp(User user, List<DynamicData> dynamicData, List<DeckInfo> deckInfo, ItemManager itemManager, bool newUser, List<ResetShopItem> resetShopItem, List<ShopItem> shopItem)
|
||||
{
|
||||
LoginResp resp = new LoginResp();
|
||||
resp.nickname = user.nickname;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ namespace Server.System
|
|||
public static ConsumableItemSQL consumableItemSQL = new ConsumableItemSQL();
|
||||
public static EtcItemSQL etcItemSQL = new EtcItemSQL();
|
||||
public static ResetShopItemSQL resetShopItemSQL = new ResetShopItemSQL();
|
||||
public static ShopItemSQL shopItemSQL = new ShopItemSQL();
|
||||
|
||||
//DATA
|
||||
public static EquipmentDataExcel equipmentExcel = new EquipmentDataExcel();
|
||||
|
|
|
|||
Loading…
Reference in New Issue