Web/App/Android/GetOrderListByUserId.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Text;

using WMPT.Model;
using WMPT.SQLServerDAL;
using WMPT.Common;

/// <summary>
/// 获取用户的订单列表
/// </summary>
public partial class AndroidAPI_GetOrderListByUserId_2 : APIPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();

        Custorder dal = new Custorder();

        int pagesize = HjNetHelper.GetPostParam("pagesize", 4);
        int pageindex = HjNetHelper.GetPostParam("pageindex", 1);
        int pagecount = 1;

        int userid = HjNetHelper.GetPostParam("userid", 0);
        string phone = HjNetHelper.GetQueryString("phone");
        string today = Request["today"];

        StringBuilder shoplistjson = new StringBuilder();

        IList<CustorderInfo> list = new List<CustorderInfo>();

        string SqlWhere = " 1=1 ";
        if (userid > 0)
        {
            SqlWhere += " and  UserId = " + userid;
        }
        if (phone != null && phone != "" && phone != "0")
        {
            SqlWhere += " and  OrderComm = '" + phone + "'";
        }

        //今日订单 不分状态
        if (today == "1")
        {
            SqlWhere += " and  DATEDIFF(day,ordertime,GETDATE()) =0 ";
        }

        int count = dal.GetCount(SqlWhere);
        list = dal.GetList(pagesize, pageindex, SqlWhere, "unid", 1);

        if (count % pagesize == 0)//整数倍
        {
            pagecount = count / pagesize;
        }
        else
后面还有 34 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。