Example #1
0
        public ActionResult DayBonusRecord()
        {
            ProfitRecordParamter param = GetRequestParamter <ProfitRecordParamter>();

            ActionResult ar = AnalysisToken(param, out bool isret, out tMembersEntity member);

            if (isret)
            {
                return(ar);
            }

            Pagination pg = new Pagination
            {
                page = param.page,
                rows = param.size,
                sidx = "settleTime",
                sord = "desc"
            };

            pg.AddWhere("mbId", member.mbId);
            if (param.sdate.IsDateString())
            {
                pg.AddWhere("settleTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 00:00:00", param.sdate)), SqlDbType.BigInt, CompareSymbolEnum.MoreThanEqual);
            }
            if (param.edate.IsDateString())
            {
                pg.AddWhere("settleTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 23:59:59", param.edate)), SqlDbType.BigInt, CompareSymbolEnum.LessThanEqual);
            }
            List <tUserDayBonusRecordEntity> list = tUserDayBonusRecordBLL.Instance.GetList(pg);

            return(RetJsonResult(ApiResponseCodeEnum.Success, "",
                                 new
            {
                list = list.Select(r => new
                {
                    r.recordId,
                    date = r.settleDate.ToString("yyyy-MM-dd"),
                    time = DateHelper.IntToDateTime(r.settleTime).ToString("yyyy-MM-dd HH:mm:ss"),
                    ratio = string.Format("{0}%", r.settleRatio.ToDecimal() / 10000),
                    amount = r.settleAmount.ToDecimal() / 10000,
                    desc = "每日分红",
                    detail = new
                    {
                        no = r.investNo,
                        amount = r.investAmount,
                        time = DateHelper.IntToDateTime(r.investTime).ToString("yyyy-MM-dd HH:mm:ss"),
                        level = r.mbpkLevelName,
                        state = ((InvestStopStateEnum)r.stopState).GetDescription(),
                        stime = DateHelper.IntToDateTime(r.stopTime).ToString("yyyy-MM-dd HH:mm:ss")
                    }
                }),
                total = pg.records,
                pages = pg.total
            }));
        }
Example #2
0
        //各钱包账务明细
        public ActionResult WalletRecord()
        {
            WalletRecordParamter param = GetRequestParamter <WalletRecordParamter>();

            ActionResult ar = AnalysisToken(param, out bool isret, out tMembersEntity member);

            if (isret)
            {
                return(ar);
            }

            Pagination pg = new Pagination
            {
                page = param.page,
                rows = param.size,
                sidx = "happendTime",
                sord = "desc"
            };

            pg.AddWhere("wallet", param.wallet <= 0 ? 1 : param.wallet);
            pg.AddWhere("mbId", member.mbId);
            if (param.sdate.IsDateString())
            {
                pg.AddWhere("happendTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 00:00:00", param.sdate)), SqlDbType.BigInt, CompareSymbolEnum.MoreThanEqual);
            }
            if (param.edate.IsDateString())
            {
                pg.AddWhere("happendTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 23:59:59", param.edate)), SqlDbType.BigInt, CompareSymbolEnum.LessThanEqual);
            }
            List <tUserAccountRecordEntity> list = tUserAccountRecordBLL.Instance.GetList(pg);

            return(RetJsonResult(ApiResponseCodeEnum.Success, "", new
            {
                list = list.Select(r => new
                {
                    r.recordId,
                    time = DateHelper.IntToDateTime(r.happendTime).ToString("yyyy-MM-dd HH:mm:ss"),
                    amount = r.realAmount.ToDecimal() / 10000,
                    desc = r.operaDesc,
                    detail = new
                    {
                        userNo = r.mbUserNo,
                        userName = r.mbUserName,
                        realName = r.mbRealName,
                        direction = ((AccountDirectionEnum)r.direction).GetDescription(),
                        ioType = ((AccountIOTypeEnum)r.ioType).GetDescription(),
                        wallet = ((WalletCateEnum)r.Wallet).GetDescription(),
                        balance = r.WalletBalance.ToDecimal() / 10000
                    }
                }),
                total = pg.records,
                pages = pg.total
            }));
        }
Example #3
0
        //投资理财记录
        public ActionResult FundsRecord()
        {
            FundsRecordParamter param = GetRequestParamter <FundsRecordParamter>();

            ActionResult ar = AnalysisToken(param, out bool isret, out tMembersEntity member);

            if (isret)
            {
                return(ar);
            }

            Pagination pg = new Pagination
            {
                page = param.page,
                rows = param.size,
                sidx = "buyTime",
                sord = "desc"
            };

            pg.AddWhere("mbId", member.mbId);
            if (param.sdate.IsDateString())
            {
                pg.AddWhere("buyTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 00:00:00", param.sdate)), SqlDbType.BigInt, CompareSymbolEnum.MoreThanEqual);
            }
            if (param.edate.IsDateString())
            {
                pg.AddWhere("buyTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 23:59:59", param.edate)), SqlDbType.BigInt, CompareSymbolEnum.LessThanEqual);
            }
            List <tUserBuyFundRecordEntity> list = tUserBuyFundRecordBLL.Instance.GetList(pg);

            return(RetJsonResult(ApiResponseCodeEnum.Success, "", new
            {
                list = list.Select(r => new
                {
                    r.recordId,
                    time = DateHelper.IntToDateTime(r.buyTime).ToString("yyyy-MM-dd HH:mm:ss"),
                    amount = ProcessAmountToPointFour(r.buyAmount),
                    ratio = string.Format("{0}%", ProcessAmountToPointFour(r.bonusRation, 2)),
                    state = ((YesNoEnum)r.settleState).GetDescription(),
                    detail = new
                    {
                        r.fundName,
                        r.fundEnName,
                        r.periodDays,
                        sAmount = ProcessAmountToPointFour(r.settleAmount),
                        stime = DateHelper.IntToDateTime(r.settleTime).ToString("yyyy-MM-dd HH:mm:ss")//结算时间
                    }
                }),
                total = pg.records,
                pages = pg.total
            }));
        }
Example #4
0
        //投资理财记录
        public ActionResult InvestRecord()
        {
            InvestRecordParamter param = GetRequestParamter <InvestRecordParamter>();

            ActionResult ar = AnalysisToken(param, out bool isret, out tMembersEntity member);

            if (isret)
            {
                return(ar);
            }

            Pagination pg = new Pagination
            {
                page = param.page,
                rows = param.size,
                sidx = "investTime",
                sord = "desc"
            };

            pg.AddWhere("mbId", member.mbId);
            if (param.sdate.IsDateString())
            {
                pg.AddWhere("investTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 00:00:00", param.sdate)), SqlDbType.BigInt, CompareSymbolEnum.MoreThanEqual);
            }
            if (param.edate.IsDateString())
            {
                pg.AddWhere("investTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 23:59:59", param.edate)), SqlDbType.BigInt, CompareSymbolEnum.LessThanEqual);
            }
            List <tUserInvestRecordEntity> list = tUserInvestRecordBLL.Instance.GetList(pg);

            return(RetJsonResult(ApiResponseCodeEnum.Success, "", new
            {
                list = list.Select(r => new
                {
                    r.recordId,
                    time = DateHelper.IntToDateTime(r.investTime).ToString("yyyy-MM-dd HH:mm:ss"),
                    amount = ProcessAmountToPointFour(r.investAmount),
                    state = ((InvestStopStateEnum)r.stopState).GetDescription(),
                    detail = new
                    {
                        level = r.pkName,                                                            //投资套餐级别
                        ssProfit = ProcessAmountToPointFour(r.stopStaticProfitAmount),               //分红出局静态收益额
                        sProfit = ProcessAmountToPointFour(r.stopProfitAmount.ToDecimal()),          //分红出局总收益额
                        stProfit = ProcessAmountToPointFour(r.staticProfitAmount.ToDecimal()),       //静态收益额
                        profit = ProcessAmountToPointFour(r.profitAmount.ToDecimal()),               //总收益额
                        stime = DateHelper.IntToDateTime(r.stopTime).ToString("yyyy-MM-dd HH:mm:ss") //出局时间
                    }
                }),
                total = pg.records,
                pages = pg.total
            }));
        }
Example #5
0
        //提现记录
        public ActionResult WithdrawRecord()
        {
            WithdrawRecordParamter param = GetRequestParamter <WithdrawRecordParamter>();

            ActionResult ar = AnalysisToken(param, out bool isret, out tMembersEntity member);

            if (isret)
            {
                return(ar);
            }

            Pagination pg = new Pagination
            {
                page = param.page,
                rows = param.size,
                sidx = "withdrawTime",
                sord = "desc"
            };

            pg.AddWhere("mbId", member.mbId);
            if (param.sdate.IsDateString())
            {
                pg.AddWhere("withdrawTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 00:00:00", param.sdate)), SqlDbType.BigInt, CompareSymbolEnum.MoreThanEqual);
            }
            if (param.edate.IsDateString())
            {
                pg.AddWhere("withdrawTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 23:59:59", param.edate)), SqlDbType.BigInt, CompareSymbolEnum.LessThanEqual);
            }
            List <tUserWithdrawRecordEntity> list = tUserWithdrawRecordBLL.Instance.GetList(pg);

            return(RetJsonResult(ApiResponseCodeEnum.Success, "", new
            {
                list = list.Select(r => new
                {
                    r.recordId,
                    time = DateHelper.IntToDateTime(r.withdrawTime).ToString("yyyy-MM-dd HH:mm:ss"),
                    ratio = string.Format("{0}%", ProcessAmountToPointFour(r.exchangeRatio)),
                    amount = ProcessAmountToPointFour(r.withdrawAmount),
                    state = ((WithdrawStateEnum)r.withdrawState).GetDescription(),
                    detail = new
                    {
                        r.bankName,
                        r.bankCode,
                        fratio = string.Format("{0}%", r.feeRatio.ToDecimal() / 10000),
                        fee = string.Format("{0}%", r.fee.ToDecimal() / 10000),
                        atime = DateHelper.IntToDateTime(r.auditTime).ToString("yyyy-MM-dd HH:mm:ss")
                    }
                }),
                total = pg.records,
                pages = pg.total
            }));
        }
Example #6
0
        //投资理财记录
        public ActionResult StockRecord()
        {
            StockRecordParamter param = GetRequestParamter <StockRecordParamter>();

            ActionResult ar = AnalysisToken(param, out bool isret, out tMembersEntity member);

            if (isret)
            {
                return(ar);
            }

            Pagination pg = new Pagination
            {
                page = param.page,
                rows = param.size,
                sidx = "buyTime",
                sord = "desc"
            };

            pg.AddWhere("mbId", member.mbId);
            if (param.sdate.IsDateString())
            {
                pg.AddWhere("buyTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 00:00:00", param.sdate)), SqlDbType.BigInt, CompareSymbolEnum.MoreThanEqual);
            }
            if (param.edate.IsDateString())
            {
                pg.AddWhere("buyTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 23:59:59", param.edate)), SqlDbType.BigInt, CompareSymbolEnum.LessThanEqual);
            }
            List <tUserStockRightBuyRecordEntity> list = tUserStockRightBuyRecordBLL.Instance.GetList(pg);

            return(RetJsonResult(ApiResponseCodeEnum.Success, "", new
            {
                list = list.Select(r => new
                {
                    r.recordId,
                    time = DateHelper.IntToDateTime(r.buyTime).ToString("yyyy-MM-dd HH:mm:ss"),
                    price = ProcessAmountToPointFour(r.price),
                    shares = ProcessAmountToPointFour(r.shares),
                    amount = ProcessAmountToPointFour(r.total),
                    state = ((StockRightRecordState)r.recordState).GetDescription(),
                    detail = new
                    {
                        rprice = r.redeemPrice,
                        ramount = r.redeemTotal,
                        rtime = DateHelper.IntToDateTime(r.redeemTime).ToString("yyyy-MM-dd HH:mm:ss")//赎回时间
                    }
                }),
                total = pg.records,
                pages = pg.total
            }));
        }
Example #7
0
        public ActionResult TalkRecord()
        {
            TalkRecordParamter param = GetRequestParamter <TalkRecordParamter>();
            ActionResult       ar    = AnalysisToken(param, out bool isret, out tMembersEntity member);

            if (isret)
            {
                return(ar);
            }

            Pagination pg = new Pagination
            {
                page = param.page,
                rows = param.size,
                sidx = "sendTime",
                sord = "desc"
            };

            //发送人
            pg.AddWhere("sendMbId", member.mbId);
            //接收人
            pg.AddWhere("receiveMbId", param.toMbId);
            if (param.sdate.IsDateString())
            {
                pg.AddWhere("sendTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 00:00:00", param.sdate)), SqlDbType.BigInt, CompareSymbolEnum.MoreThanEqual);
            }
            if (param.edate.IsDateString())
            {
                pg.AddWhere("sendTime", DateHelper.GetTimeStamp_Seconds(string.Format("{0} 23:59:59", param.edate)), SqlDbType.BigInt, CompareSymbolEnum.LessThanEqual);
            }
            List <tTalkMsgEntity> list = tTalkMsgBLL.Instance.GetList(pg);

            return(RetJsonResult(ApiResponseCodeEnum.Success, "", new
            {
                list = list.Select(r => new
                {
                    r.msgId,
                    time = DateHelper.IntToDateTime(r.sendTime).ToString("yyyy-MM-dd HH:mm:ss"),
                    content = r.msgContent
                }),
                total = pg.records,
                pages = pg.total
            }));
        }