|
@@ -13,11 +13,16 @@ namespace CardCollector.DataBase.EntityDao
|
|
public static async Task<Dictionary<string, UserStickerRelationEntity>> GetListById(long userId)
|
|
public static async Task<Dictionary<string, UserStickerRelationEntity>> GetListById(long userId)
|
|
{
|
|
{
|
|
var result = await Table
|
|
var result = await Table
|
|
- .Where(i => i.UserId == userId)
|
|
|
|
|
|
+ .Where(i => i.UserId == userId && i.Count > 0)
|
|
.ToDictionaryAsync(p=> p.StickerId, p=> p);
|
|
.ToDictionaryAsync(p=> p.StickerId, p=> p);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public static async Task<UserStickerRelationEntity> GetByShortHash(string shortHash)
|
|
|
|
+ {
|
|
|
|
+ return await Table.FirstAsync(i => i.ShortHash == shortHash);
|
|
|
|
+ }
|
|
|
|
+
|
|
private static async Task<UserStickerRelationEntity> AddNew(long userId, string stickerId, int count)
|
|
private static async Task<UserStickerRelationEntity> AddNew(long userId, string stickerId, int count)
|
|
{
|
|
{
|
|
var cash = new UserStickerRelationEntity
|
|
var cash = new UserStickerRelationEntity
|