Web/App/Android/SubmitOrder.aspx.cs

(开头部分) 9KB

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

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

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

using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.Web.Script.Serialization;

/// <summary>
/// 提交订单
/// </summary>
public partial class AndroidAPI_SubmitOrderv : APIPageBase
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.Clear();
        string ret = "{\"orderid\":\"2011111512000135001\",\"orderstate\":\"1\"}";
        string jsonstring = Request["ordermodel"];
        Custorder dal = new Custorder();

        WMPT.Common.HJlog.toLog("订单提交数据:" + jsonstring);

        IList<EAddressInfo> orderlist = new System.Web.Script.Serialization.JavaScriptSerializer().Deserialize<IList<EAddressInfo>>(jsonstring);
        if (orderlist.Count > 0)
        {
            EAddressInfo info = orderlist[0];
            if (info.CustomerName == null)
            {
                info.CustomerName = "";
            }

            if (info.UserID > 0 && new ECustomer().GetCount("dataid = " + info.UserID + "") == 0)
            {
                ret = "{\"orderid\":\"\",\"orderstate\":\"-1\",\"totalprice\":\"0\",\"msg\":\"此用户已经删除或者已经加入黑名单,不能在线下订单\"}";
                Response.Write(ret);
                Response.End();
                return;
            }
            if (info.UserID > 0 && info.isuercard == 1) //使用了券,要判断券号是否正常
            {
                string cardckey = info.shopcardjson;// 网站里这个表示是券的json,这里为了app方便,只传券号,这里转成json,再提交 JJ 
                ShopCard card = new ShopCard();
                ShopCardInfo cardinfo = card.GetModelByCPwd(cardckey);
                string msg = "";
                if (cardinfo != null)
                {
                    if (cardinfo.Inve2 == "0")
                    {
                        msg = "此券未激活,不能使用";
                    }
                    else {
                        if (cardinfo.isused == 1)
后面还有 171 行代码,购买后查看完整代码

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

AI 解读 AI

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

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