Exemple #1
0
        /// <summary>
        /// 查询总数用户报表统计
        /// </summary>
        /// <param name="stime"></param>
        /// <param name="etime"></param>
        /// <param name="searchType"></param>
        /// <param name="searchname"></param>
        /// <returns></returns>
        public JMP.MDL.jmp_statistics modelCoutn(string stime, string etime)
        {
            string strSql = string.Format(" select sum(s_count) as s_count  from   jmp_statistics  where 1=1 ");

            if (!string.IsNullOrEmpty(stime))
            {
                strSql += "  and convert(varchar(10),s_time,120)>='" + stime + "' ";
            }
            if (!string.IsNullOrEmpty(etime))
            {
                strSql += "  and convert(varchar(10),s_time,120)<='" + etime + "' ";
            }
            DataTable dt = DbHelperSQLTotal.Query(strSql.ToString()).Tables[0];

            return(DbHelperSQLTotal.ToModel <JMP.MDL.jmp_statistics>(dt));
        }
Exemple #2
0
        /// <summary>
        /// 获得数据列表用于图标统计
        /// </summary>
        public JMP.MDL.jmp_operatingsystem ModelTjCount(string stime, string etime)
        {
            string strSql = string.Format(" select sum(o_count)as o_count  from  jmp_operatingsystem  where 1=1  ");

            if (!string.IsNullOrEmpty(stime))
            {
                strSql += "  and convert(varchar(10),o_time,120)>='" + stime + "' ";
            }
            if (!string.IsNullOrEmpty(etime))
            {
                strSql += "  and convert(varchar(10),o_time,120)<='" + etime + "' ";
            }
            DataTable dt = DbHelperSQLTotal.Query(strSql.ToString()).Tables[0];

            return(DbHelperSQLTotal.ToModel <JMP.MDL.jmp_operatingsystem>(dt));
        }
        /// <summary>
        /// 开发者首页根据开发者查询数据(昨天,本月,上月)
        /// </summary>
        /// <param name="id">开发者ID</param>
        /// <param name="date">日期</param>
        /// <param name="start">状态</param>
        /// <returns></returns>
        public JMP.MDL.CoSettlementDeveloperAppDetails GetModelKFZ_total(int id, string date, int start)
        {
            StringBuilder strsql = new StringBuilder();

            strsql.Append("select ISNULL(SUM(OrderCount),0) as OrderCount,(isnull(SUM(TotalAmount), 0) - isnull(SUM(ChannelRefundAmount), 0)) as TotalAmount,(ISNULL(SUM(TotalAmount),0)-ISNULL(SUM(ServiceFee),0)-ISNULL(SUM(PortFee),0)-ISNULL(SUM(ChannelRefundAmount),0)) as KFZIncome");
            strsql.Append(" from dx_total.[dbo].[CoSettlementDeveloperAppDetails] a, dx_base.dbo.jmp_user b ");
            strsql.Append(" where a.DeveloperId=b.u_id and b.u_id='" + id + "'");
            if (start == 0)
            {
                strsql.Append(" and a.SettlementDay='" + date + "'");
            }
            else
            {
                strsql.Append(" and CONVERT(varchar(7),SettlementDay,120)='" + date + "'");
            }

            DataTable dt = DbHelperSQLTotal.Query(strsql.ToString()).Tables[0];

            return(DbHelperSQLTotal.ToModel <JMP.MDL.CoSettlementDeveloperAppDetails>(dt));
        }
Exemple #4
0
        /// <summary>
        /// 根据用户ID查询交易金额和交易笔数(开发者首页)
        /// </summary>
        /// <param name="t_time">日期</param>
        /// <param name="u_id">用户ID</param>
        /// <param name="start">状态</param>
        /// <returns></returns>
        public JMP.MDL.jmp_appcount DataAppcountAdy(string t_time, int u_id, int start)
        {
            string sql = string.Format("select isnull(SUM(a_curr),0) as a_curr,FLOOR(isnull(SUM(a_success),0)) as a_success from dbo.jmp_appcount");

            sql += "  where a_uerid= " + u_id + "";

            switch (start)
            {
            case 0:
                sql += " and a_datetime>='" + t_time + " 00:00:00' and a_datetime<='" + t_time + " 23:59:59'";
                break;

            case 1:
                sql += " and CONVERT(varchar(7),a_datetime,120)='" + t_time + "'";
                break;
            }

            DataTable dt = DbHelperSQLTotal.Query(sql).Tables[0];

            return(DbHelperSQLTotal.ToModel <JMP.MDL.jmp_appcount>(dt));
        }