<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JhPrize.Core
{
    public interface IUpdatable<T>
    {
        void Update(T other);
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace JhPrize.Core
{
    public class PrizePool : INotifyPropertyChanged, IUpdatable<PrizePool>
    {
        public class Comparer : EqualityComparer<PrizePool>
        {
            public override bool Equals(PrizePool x, PrizePool y)
            {
                return x.Title == y.Title;
            }

            public override int GetHashCode(PrizePool obj)
            {
                return obj.Title.GetHashCode();
            }
        }

        private string title;
        private ObservableCollection<Prize> prizes = new ObservableCollection<Prize>();
        private int acceptCount;
        private int count;
        private int capacity;

        public int AcceptCount
        {
            get => acceptCount; set
            {
                acceptCount = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(AcceptCount)));
            }
        }

        public int Count
        {
            get => count; set
            {
                count = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count)));
            }
        }

        public int Capacity
        {
            get => capacity; set
            {
                capacity = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Capacity)));
            }
        }



        public PrizePool()
        {
            this.Prizes.CollectionChanged += Prizes_CollectionChanged;
        }

        private void Prizes_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            this.AcceptCount = (from item in Prizes select item.AcceptCount).Sum();
            this.Count = (from item in Prizes select item.Count).Sum();
            this.Capacity = (from item in Prizes select item.Capacity).Sum();
        }

        public void Update(PrizePool other)
        {
            this.Title = other.title;
            Extensions.UpdateCollection<Prize>(Prizes, other.Prizes,new Prize.Comparer());
        }

        public PrizePool(string title, params Prize[] prizes) : this()
        {
            this.Title = title;
            foreach (var item in prizes)
            {
                this.Prizes.Add(item);
            }
        }

        public string Title
        {
            get => title; set
            {
                title = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Title)));
            }
        }

        public ObservableCollection<Prize> Prizes
        {
            get => prizes; set
            {
                prizes = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Prizes)));


            }
        }


        public event PropertyChangedEventHandler PropertyChanged;
    }
}
<file_sep>﻿using JhPrize.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

//https://go.microsoft.com/fwlink/?LinkId=234236 上介绍了“用户控件”项模板

namespace JhPrize.Widget
{
    public sealed partial class PrizeCard : UserControl
    {

        public Prize Prize
        {
            get { return (Prize)GetValue(PrizeProperty); }
            set { SetValue(PrizeProperty, value); }
        }

        public static readonly DependencyProperty PrizeProperty =
            DependencyProperty.Register("Prize", typeof(Prize), typeof(PrizeCard), new PropertyMetadata(new Prize()));

        public PrizeCard()
        {
            this.InitializeComponent();
            this.Prize.PropertyChanged += Prize_PropertyChanged;
        }

        private void Prize_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            Prize = Prize;
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;

namespace JhPrize.Core
{
    public static class Extensions
    {
        public static void UpdateCollection<T>(ICollection<T> collection, IEnumerable<T> other, EqualityComparer<T> equalityComparer) where T:IUpdatable<T>
        {
            List<T> otherCopy = other.ToList();
            List<T> sourceCopy = collection.ToList();
            foreach (var item in sourceCopy)
            {
                var take = other.TakeWhile((a) => equalityComparer.Equals(a, item));
                if (take.Any())
                {
                    item.Update(take.First());
                    foreach (var item2 in take)
                    {
                        otherCopy.Remove(item2);
                    }
                } else
                {
                    collection.Remove(item);
                }
            }
            foreach (var item in otherCopy)
            {
                collection.Add(item);
            }
        }

        
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JhPrize.Core
{
    public class PrizeModel
    {
        public int id;
        public string title;
        public string captain;
        public string content;
        public int capacity;
        public int count;
        public int accept_count;

        public Prize ToPrize()
        {
            return new Prize(
                this.captain, 
                this.content,
                this.accept_count,
                this.count,
                this.capacity
            );
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JhPrize.Core
{
    public static class ExampleData
    {
        public static PrizePool[] GeneratePrizePools()
        {
            return new PrizePool[] {
                new PrizePool("完成毅行",
                    new Prize("一等奖", "星星*10\n漆橙轰趴五折券*1", 0, 0, 1),
                    new Prize("二等奖", "星星*8\n健身卡一个月*1", 1, 4, 12),
                    new Prize("三等奖", "星星*7\n漆橙轰趴七折券*5", 2, 3, 8)
                    ),
                new PrizePool("未完成毅行",
                    new Prize("一等奖", "星星*5\nPokeman Go光碟*1",0,0,2),
                    new Prize("二等奖", "星星*2\n京东100元购物券*1",2,3,10),
                    new Prize("三等奖", "星星*1\n宝可梦Surface Go背部贴膜*1",0,8,40)
                    ) 
            };
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JhPrize.Core
{
    public class Prize : INotifyPropertyChanged, IUpdatable<Prize>
    {
        public class Comparer : EqualityComparer<Prize>
        {
            public override bool Equals(Prize x, Prize y)
            {
                return x.Title == y.Title;
            }

            public override int GetHashCode(Prize obj)
            {
                return obj.Title.GetHashCode();
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private string title;
        private string detail;
        private int acceptCount =10000;
        private int count =1000;
        private int capacity =1002131;

        public Prize()
        {
        }

        public Prize(string title, string detail, int acceptCount, int count, int capacity)
        {
            this.Title = title;
            this.Detail = detail;
            this.AcceptCount = acceptCount;
            this.Count = count;
            this.Capacity = capacity;
        }

        public string Title
        {
            get => title; set
            {
                title = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Title)));
            }
        }

        public string Detail
        {
            get => detail; set
            {
                detail = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Detail)));
            }
        }

        public int AcceptCount
        {
            get => acceptCount; set
            {
                acceptCount = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(AcceptCount)));
            }
        }

        public int Count
        {
            get => count; set
            {
                count = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Count)));
            }
        }

        public int Capacity
        {
            get => capacity; set
            {
                capacity = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Capacity)));
            }
        }

        public void Update(Prize other)
        {
            this.Title = other.Title;
            this.Detail = other.Detail;
            this.AcceptCount = other.AcceptCount;
            this.Count = other.Count;
            this.Capacity = other.Capacity;
        }
    }
}
<file_sep>﻿using JhPrize.Core;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// https://go.microsoft.com/fwlink/?LinkId=234238 上介绍了“空白页”项模板

namespace JhPrize
{
    /// <summary>
    /// 可用于自身或导航至 Frame 内部的空白页。
    /// </summary>
    public sealed partial class SettingsPage : Page
    {
        private SystemNavigationManager navManager;
        public SettingsPage()
        {
            this.InitializeComponent();
            navManager = SystemNavigationManager.GetForCurrentView();
            navManager.BackRequested += WorkPage_BackRequested;
            navManager.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            this.TextBoxDomain.Text = Api.Domain;
            this.PasswordBoxPass.Password = <PASSWORD>;
            this.TextBoxDomain.TextChanged += TextBoxDomain_TextChanged;
            this.PasswordBoxPass.PasswordChanged += PasswordBoxPass_PasswordChanged;
        }

        private void PasswordBoxPass_PasswordChanged(object sender, RoutedEventArgs e)
        {
            Api.Pass = <PASSWORD>;
        }

        private void TextBoxDomain_TextChanged(object sender, TextChangedEventArgs e)
        {
            Api.Domain = TextBoxDomain.Text;
        }

        private void WorkPage_BackRequested(object sender, BackRequestedEventArgs e)
        {
            if (this.Frame.Content is SettingsPage)
            {
                if (this.Frame.CanGoBack && e.Handled == false)
                {
                    this.Frame.GoBack();
                    navManager.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
                }
            }

        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JhPrize.Core
{
    public enum WorkMode
    {
        AcceptPrize,
        Completed,
        NoCompleted
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using Windows.System;

using System.Collections.ObjectModel;
using JhPrize.Core;
using System.Threading.Tasks;

namespace JhPrize
{
    /// <summary>
    /// 可用于自身或导航至 Frame 内部的空白页。
    /// </summary>
    public sealed partial class WorkPage : Page
    {
        private SystemNavigationManager navManager;
        private WorkMode mode;

        public WorkPage()
        {
            this.InitializeComponent();
            this.Loaded += WorkPage_Loaded;
            navManager = SystemNavigationManager.GetForCurrentView();
            navManager.BackRequested += WorkPage_BackRequested;
            navManager.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
            ButtonTest.Click += ButtonTest_Click;
            ButtonSlideState.Click += ButtonSlideState_Click;
            TextBoxNo.KeyUp += TextBoxNo_KeyUp;
        }

        private void ButtonSlideState_Click(object sender, RoutedEventArgs e)
        {
            if (GridSlide.Visibility == Visibility.Collapsed)
            {
                GridSlide.Visibility = Visibility.Visible;
            }
            else
            {
                GridSlide.Visibility = Visibility.Collapsed;
            }
        }

        private async void TextBoxNo_KeyUp(object sender, KeyRoutedEventArgs e)
        {
            if (e.Key == VirtualKey.Enter)
            {
                if (TextBoxNo.Text != "")
                {

                    try
                    {
                        BorderErrorMsg.Visibility = Visibility.Collapsed;
                        TextBoxNo.IsEnabled = false;
                        var title = mode == WorkMode.Completed ? "完成" : "未完成";
                        var groupNo = TextBoxNo.Text;
                        ResponseModel<PrizeModel> result = null;
                        if (mode == WorkMode.AcceptPrize)
                        {
                            result = await Api.AcceptPrizeAsync(groupNo);
                        }
                        else
                        {
                            result = await Api.DrawPrizeAsync(title, groupNo);
                        }
                        TextBlockResult.Text = result.msg;
                        if (result.data != null)
                        {
                            StackPanelPrize.Visibility = Visibility.Visible;
                            TextBlockPrize.Text = result.data.captain;
                            TextBlockPrizeDetail.Text = result.data.content;
                            TextBlockGroup.Text = $"{result.data.title}-{groupNo}";
                        }
                        else
                        {
                            StackPanelPrize.Visibility = Visibility.Collapsed;
                        }
                    }
                    catch (Exception)
                    {
                        BorderErrorMsg.Visibility = Visibility.Visible;
                    }
                    finally
                    {
                        TextBoxNo.IsEnabled = true;
                        TextBoxNo.Text = "";
                    }


                }
                await UpdatePrizePool();

            }
        }

        private async void ButtonTest_Click(object sender, RoutedEventArgs e)
        {
             await UpdatePrizePool();
        }

        private async void WorkPage_Loaded(object sender, RoutedEventArgs e)
        {
            await UpdatePrizePool();
        }

        public async Task UpdatePrizePool()
        {
            try
            {
                ButtonTest.IsEnabled = false;
                TextBlockFresh.Text = "正在刷新";
                var data = await Api.GetDataAsync();
                this.PrizePools.Clear();
                foreach (var item in data)
                {
                    this.PrizePools.Add(item);
                }
                this.BorderErrorMsg.Visibility = Visibility.Collapsed;
            }
            catch (Exception)
            {
                this.BorderErrorMsg.Visibility = Visibility.Visible;
            }
            finally
            {
                ButtonTest.IsEnabled = true;
                TextBlockFresh.Text = "刷新";
            }

        }

        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (e.Parameter is WorkMode mode)
            {
                this.Mode = mode;
            }

            base.OnNavigatedTo(e);
        }
        private void WorkPage_BackRequested(object sender, BackRequestedEventArgs e)
        {
            if (this.Frame.Content is WorkPage)
            {
                if (this.Frame.CanGoBack && e.Handled == false)
                {
                    this.Frame.GoBack();
                    navManager.AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed;
                }
            }

        }

        public ObservableCollection<String> TestStr
        {
            get { return (ObservableCollection<String>)GetValue(TestStrProperty); }
            set { SetValue(TestStrProperty, value); }
        }

        public static readonly DependencyProperty TestStrProperty =
            DependencyProperty.Register("TestStr", typeof(ObservableCollection<String>), typeof(WorkPage), new PropertyMetadata(new ObservableCollection<String>()));



        public ObservableCollection<PrizePool> PrizePools
        {
            get { return (ObservableCollection<PrizePool>)GetValue(PrizePoolsProperty); }
            set { SetValue(PrizePoolsProperty, value); }
        }

        public WorkMode Mode
        {
            get => mode; set
            {
                mode = value;
                if (value == WorkMode.AcceptPrize)
                {
                    TextBlockTitle.Text = "领奖";
                }
                else if (value == WorkMode.Completed)
                {
                    TextBlockTitle.Text = "抽奖(完成)";
                }
                else if (value == WorkMode.NoCompleted)
                {
                    TextBlockTitle.Text = "抽奖(未完成)";
                }
            }
        }

        public static readonly DependencyProperty PrizePoolsProperty =
            DependencyProperty.Register("PrizePools", typeof(ObservableCollection<PrizePool>), typeof(WorkPage), new PropertyMetadata(new ObservableCollection<PrizePool>()));

    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Windows.Web.Http;

using Newtonsoft.Json;

namespace JhPrize.Core
{
    public enum ApiOption
    {
        GetData,
        Select,
        Verify
    };

    public class Api
    {
        private static Dictionary<ApiOption, string> dic = new Dictionary<ApiOption, string>()
        {
            { ApiOption.GetData, "prize/get_data" },
            { ApiOption.Select,"prize/select" },
            { ApiOption.Verify,"prize/verify" }
        };

        public static string Pass { get; set; } = "<PASSWORD>";
        public static string Domain { get; set; } = "http://localhost/";

        public static string GetUrl(ApiOption option)
        {
            return $"{Domain}{dic[option]}";
        }



        public async static Task<String> PostAsync(ApiOption option, params KeyValuePair<String,String>[] p)
        {
            var cts = new CancellationTokenSource();
            cts.CancelAfter(TimeSpan.FromSeconds(10));

            var httpClient = new HttpClient();
            var requestMessage = new HttpRequestMessage(HttpMethod.Post, new Uri( GetUrl(option)));
            
            var responseMessage = await httpClient.PostAsync(new Uri(GetUrl(option)),new HttpFormUrlEncodedContent(p));
            
            if(responseMessage.StatusCode == HttpStatusCode.Ok)
            {
                return await responseMessage.Content.ReadAsStringAsync();
            }
            else
            {
                return null;
            }
        }

        public async static Task<ResponseModel<PrizeModel>> DrawPrizeAsync(string title, string no)
        {
            ResponseModel<PrizeModel> model = JsonConvert.DeserializeObject<ResponseModel<PrizeModel>>(
                await PostAsync(ApiOption.Select, 
                    new KeyValuePair<string, string>("pass", Pass),
                    new KeyValuePair<string, string>("no", no),
                    new KeyValuePair<string,string>("title",title)
                ));

            return model;
        }

        public async static Task<ResponseModel<PrizeModel>> AcceptPrizeAsync(string no)
        {
            ResponseModel<PrizeModel> model = JsonConvert.DeserializeObject<ResponseModel<PrizeModel>>(
                await PostAsync(ApiOption.Verify,
                    new KeyValuePair<string, string>("pass", Pass),
                    new KeyValuePair<string, string>("no", no)
                ));

            return model;
        }


        public async static Task<IEnumerable<PrizePool>> GetDataAsync()
        {
            ResponseModel<PrizePoolModel[]> model = JsonConvert.DeserializeObject<ResponseModel<PrizePoolModel[]>>(
                await PostAsync(ApiOption.GetData, new KeyValuePair<string, string>("pass", Pass)));
            List<PrizePool> result = new List<PrizePool>();
            return model.data.Select((a) => a.ToPrizePool());
        }
    }

    
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;

using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

using JhPrize.Core;
// https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x804 上介绍了“空白页”项模板

namespace JhPrize
{
    /// <summary>
    /// 可用于自身或导航至 Frame 内部的空白页。
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            this.InitializeComponent();

            this.ButtonCompleted.Click += ButtonCompleted_Click;
            this.ButtonNoCompleted.Click += ButtonNoCompleted_Click;
            this.ButtonAcceptPrize.Click += ButtonAcceptPrize_Click;
            this.ButtonSettings.Click += ButtonSettings_Click;        
        }

        private void ButtonSettings_Click(object sender, RoutedEventArgs e)
        {
            this.Frame.Navigate(typeof(SettingsPage));
        }

        private void ButtonNoCompleted_Click(object sender, RoutedEventArgs e)
        {
            this.Frame.Navigate(typeof(WorkPage), WorkMode.NoCompleted);
        }

        private void ButtonCompleted_Click(object sender, RoutedEventArgs e)
        {
            this.Frame.Navigate(typeof(WorkPage), WorkMode.Completed);
        }

        private void ButtonAcceptPrize_Click(object sender, RoutedEventArgs e)
        {
            this.Frame.Navigate(typeof(WorkPage),WorkMode.AcceptPrize);
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

using JhPrize.Core;

//https://go.microsoft.com/fwlink/?LinkId=234236 上介绍了“用户控件”项模板

namespace JhPrize.Widget
{
    public sealed partial class PrizePoolCard : UserControl
    {
        public PrizePoolCard()
        {
            this.InitializeComponent();
        }


        public int AcceptCount
        {
            get { return (int)GetValue(AcceptCountProperty); }
            set { SetValue(AcceptCountProperty, value); }
        }

        public int Count
        {
            get { return (int)GetValue(CountProperty); }
            set { SetValue(CountProperty, value); }
        }

        public int Capacity
        {
            get { return (int)GetValue(CapacityProperty); }
            set { SetValue(CapacityProperty, value); }
        }

        public static readonly DependencyProperty AcceptCountProperty =
            DependencyProperty.Register("AcceptCount", typeof(int), typeof(PrizePoolCard), new PropertyMetadata(1));

        public static readonly DependencyProperty CountProperty =
            DependencyProperty.Register("Count", typeof(int), typeof(PrizePoolCard), new PropertyMetadata(2));

        public static readonly DependencyProperty CapacityProperty =
            DependencyProperty.Register("Capacity", typeof(int), typeof(PrizePoolCard), new PropertyMetadata(3));

        private void OnPrizePoolChanged()
        {
            AcceptCount =  (from item in PrizePool.Prizes select item.AcceptCount).Sum();
            Count = (from item in PrizePool.Prizes select item.Count).Sum();
            Capacity = (from item in PrizePool.Prizes select item.Capacity).Sum();
        }

        public PrizePool PrizePool
        {
            get { return (PrizePool)GetValue(PrizePoolProperty); }
            set { SetValue(PrizePoolProperty, value); }
        }

        public static readonly DependencyProperty PrizePoolProperty =
            DependencyProperty.Register("PrizePool", typeof(PrizePool), typeof(PrizePoolCard), new PropertyMetadata(new PrizePool(), PrizePoolChangedCallback));

        private static void PrizePoolChangedCallback(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ((PrizePoolCard)d).OnPrizePoolChanged();
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JhPrize.Core
{
    public class PrizePoolModel
    {
        public string title;
        public PrizeModel[] data;

        public PrizePool ToPrizePool()
        {
            return new PrizePool(
                this.title,
                this.data.Select((a) => a.ToPrize()).ToArray()
            );
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace JhPrize.Core
{
    public class ResponseModel<T>
    {
        public int code;
        public string msg;
        public T data;
    }
}
