示例#1
0
        public List <CommodityInfoQueryModelGet> QueryCommodityInfo(CommodityInfoQueryModelSend commodityInfoQueryModelSend)
        {
            HeadModelGet <List <CommodityInfoQueryModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <CommodityInfoQueryModelGet> > > .PostMsg(
                ApiAddress.QueryCommodityInfo, commodityInfoQueryModelSend);

            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
示例#2
0
        /// <summary>
        /// 检查矿机运行状态
        /// </summary>
        /// <param name="runCloudMinerModelSend"></param>
        /// <returns>返回启动结果:0 未运行 1 矿机运行中   2 正常结束  其他 错误异常信息 </returns>
        public string CheckCloudMiner(RunCloudMinerModelSend runCloudMinerModelSend)
        {
            HeadModelGet <UserCloudMinerModelGet> headModelGet = BwHttpApiAccess <HeadModelGet <UserCloudMinerModelGet> > .PostMsg(
                ApiAddress.CheckCloudMiner, runCloudMinerModelSend);

            return(headModelGet.Messages);
        }
示例#3
0
        /// <summary>
        /// 运行矿机
        /// </summary>
        /// <param name="runCloudMinerModelSend"></param>
        /// <returns>返回启动结果:0 正常启动  非0 错误异常信息 </returns>
        public string RunCloudMiner(RunCloudMinerModelSend runCloudMinerModelSend)
        {
            HeadModelGet <List <UserCloudMinerModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <UserCloudMinerModelGet> > > .PostMsg(
                ApiAddress.RunCloudMiner, runCloudMinerModelSend);

            return(headModelGet.Code == 0 ? "0" : headModelGet.Messages);
        }
        public List <CurrencyPriceRecordModelGet> QueryCurrencyPriceRecord(CurrencyPriceRecordModelSend currencyPriceRecordModel, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <CurrencyPriceRecordModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <CurrencyPriceRecordModelGet> > > .PostMsg(
                ApiAddress.QueryCurrencyPriceRecord, currencyPriceRecordModel);

            dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet();
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
        public List <SystemMaintenanceModelGet> QuerySystemMaintenanceRecord(SystemMaintenanceModelSend systemMaintenanceModelSend, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <SystemMaintenanceModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <SystemMaintenanceModelGet> > > .PostMsg(
                ApiAddress.QuerySystemMaintenanceRecord, systemMaintenanceModelSend);

            dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet();
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
示例#6
0
        public List <UserInfoQueryModelGet> QueryUserInfo(UserInfoQueryModelSend userInfoQueryModelSend, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <UserInfoQueryModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <UserInfoQueryModelGet> > > .PostMsg(
                ApiAddress.QueryUser, userInfoQueryModelSend);

            dataPagingModelGet = headModelGet.DataPagingResult;
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
        public List <UserCloudMinerProductionModelGet> QueryUserCloudMinerProductionRecord(UserCloudMinerProductionModelSend userCloudMinerProductionModelSend, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <UserCloudMinerProductionModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <UserCloudMinerProductionModelGet> > > .PostMsg(
                ApiAddress.QueryUserCloudMinerProductionRecord, userCloudMinerProductionModelSend);

            dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet();
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
示例#8
0
        public bool CreateGaveCommodityStoreOrder(CreateGaveCommodityStoreOrderModelSend gaveCommodityStoreOrderModelSend, out string messages)
        {
            HeadModelGet <CreateGaveCommodityStoreOrderModelGet> headModelGet = BwHttpApiAccess <HeadModelGet <CreateGaveCommodityStoreOrderModelGet> > .PostMsg(
                ApiAddress.GaveCommodityStoreOrder, gaveCommodityStoreOrderModelSend);

            messages = headModelGet.Messages;
            return(headModelGet.Code == 0);
        }
示例#9
0
        public List <StoreOrderQueryModelGet> QueryStoreOrder(StoreOrderQueryModelSend storeOrderQueryModelSend, out DataPagingModelGet dataPagingModelGet)
        {
            HeadModelGet <List <StoreOrderQueryModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <StoreOrderQueryModelGet> > > .PostMsg(
                ApiAddress.QueryStoreOrder, storeOrderQueryModelSend);

            dataPagingModelGet = headModelGet.DataPagingResult ?? new DataPagingModelGet();
            return(headModelGet.Code == 0 ? headModelGet.Data : null);
        }
示例#10
0
        public List <QueryWalletInfoModelGet> QueryUserWallet(QueryWalletInfoModelSend queryWalletInfoModelSend, out DataPagingModelGet dataPagingModel)
        {
            HeadModelGet <List <QueryWalletInfoModelGet> > headModelGet = BwHttpApiAccess <HeadModelGet <List <QueryWalletInfoModelGet> > > .PostMsg(
                ApiAddress.QueryUserWallet, queryWalletInfoModelSend);

            dataPagingModel = headModelGet.DataPagingResult;
            return(headModelGet.Data ?? new List <QueryWalletInfoModelGet>());
        }
示例#11
0
        public LoginModelGet Login(LoginModelSend loginModelSend)
        {
            loginModelSend.LoginPassword = Md5Helper.Md5Encrypt(Md5Helper.Md5Encrypt(loginModelSend.AccountId).ToUpper() +
                                                                Md5Helper.Md5Encrypt(loginModelSend.LoginPassword).ToUpper()).ToUpper();
            //BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptType = BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptDecryptType.Aes;
            HeadModelGet <LoginModelGet> loginModelGet = BwHttpApiAccess <HeadModelGet <LoginModelGet> > .PostMsg(
                ApiAddress.EmployeeLogin, loginModelSend);

            if (loginModelGet.Code == 0)
            {
                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .ClearCookie();

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("Token", loginModelGet.Data.Token), ApiAddress.ApiUrlRoot);

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("UserId", loginModelGet.Data.Id.ToString()), ApiAddress.ApiUrlRoot);

                BwHttpApiAccess <HeadModelGet <LoginModelGet> > .AddCookie(new Cookie("Type", "0"), ApiAddress.ApiUrlRoot);
            }
            //BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptType = BwHttpApiAccess<HeadModelGet<LoginModelGet>>.EncryptDecryptType.Aes;
            return(loginModelGet.Code == 0 ? loginModelGet.Data : null);
        }