QiFeng.ZWY.Api/Controllers/OrderController.cs

(开头部分) 70KB

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

using log4net;
using QiFeng.LMSD.Api.Models;
using QiFeng.LMSD.Bll;
using QiFeng.LMSD.Bll.BllExt;
using QiFeng.LMSD.Model;
using QiFeng.LMSD.Model.EnumModel;
using QiFeng.LMSD.Utility;
using QiFeng.LMSD.Utility.Files;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
using System.Web.Http;

namespace QiFeng.LMSD.Api.Controllers
{
    public class OrderController : BaseApiController
    {
        private readonly ILog logger = LogManager.GetLogger(typeof(ConsumerController));
        public static object orderCommentLocker = new object();

        #region 购物车

        /// <summary>
        /// 获取用户购物车
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        [HttpPost]
        public Result<string> GetShoppingCartList([FromBody]GetShoppingCartModel model)
        {
            Result<string> result = new Result<string>() { Status = false, StatusCode = (int)SysStatusCode.SystemError, Message = "系统错误" };
            try
            {
                var strSign = model.random + model.consumerId;
                if (!model.sign.Equals(EncryptionLibCbc.Encrypt(strSign)))
                    throw new FormatException("请求参数错误");

                var list = ShoppingCartBll.Instance.GetShoppingCartList(model.consumerId);
                if (list == null)
                {
                    result.Status = false;
                    result.StatusCode = (int)SysStatusCode.NullList;
                    result.Message = "获取失败";
                }
                else
                {
                    result.Status = true;
                    result.Message = "获取成功";
                    result.Data = EncryptionLibCbc.Encrypt(JsonTool.ObjToJsonAllInfo(list));
                }

            }
            catch (Exception ex)
            {
                result.Status = false;
后面还有 1723 行代码,解锁后查看完整代码

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

AI 解读 AI

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

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