コード例 #1
0
        public JsonResult BatchDeleteCategory(string Ids)
        {
            int num;

            string[] strArrays = Ids.Split(new char[] { '|' });
            for (int i = 0; i < strArrays.Length; i++)
            {
                string str = strArrays[i];
                if (!string.IsNullOrWhiteSpace(str) && int.TryParse(str, out num))
                {
                    ServiceHelper.Create <ICategoryService>().DeleteCategory(num);
                    IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
                    LogInfo logInfo = new LogInfo()
                    {
                        Date        = DateTime.Now,
                        Description = string.Concat("删除平台分类,Id=", num),
                        IPAddress   = base.Request.UserHostAddress,
                        PageUrl     = string.Concat("/Category/BatchDeleteCategory/", num),
                        UserName    = base.CurrentManager.UserName,
                        ShopId      = 0
                    };
                    operationLogService.AddPlatformOperationLog(logInfo);
                }
            }
            return(Json(new { Successful = true }, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public JsonResult DeleteType(long Id)
        {
            Result result = new Result();

            try
            {
                ServiceHelper.Create <ITypeService>().DeleteType(Id);
                IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
                LogInfo logInfo = new LogInfo()
                {
                    Date        = DateTime.Now,
                    Description = string.Concat("删除平台类目,Id=", Id),
                    IPAddress   = base.Request.UserHostAddress,
                    PageUrl     = "/ProductType/DeleteTyp",
                    UserName    = base.CurrentManager.UserName,
                    ShopId      = 0
                };
                operationLogService.AddPlatformOperationLog(logInfo);
                result.success = true;
            }
            catch (HimallException himallException)
            {
                result.msg = himallException.Message;
            }
            catch (Exception exception)
            {
                Log.Error("删除平台类目失败", exception);
                result.msg = "删除平台类目失败";
            }
            return(Json(result));
        }
コード例 #3
0
        public EntitySession(OperationContext context, EntitySessionOptions options = EntitySessionOptions.Default)
        {
            Context         = context;
            this.Options    = options;
            IsSecureSession = this is Vita.Entities.Authorization.SecureSession;
            _appEvents      = Context.App.AppEvents;
            this.LocalLog   = Context.LocalLog;
            // Multithreaded sessions must be readonly
            var isConcurrent = Options.IsSet(EntitySessionOptions.Concurrent);

            IsReadOnly    = Options.IsSet(EntitySessionOptions.ReadOnly) || isConcurrent;
            _timeService  = Context.App.GetService <ITimeService>();
            _operationLog = Context.App.GetService <IOperationLogService>();
            RecordsLoaded = new EntityRecordWeakRefTable(isConcurrent);
            // These two lists are not used in Readonly sessions
            if (!IsReadOnly)
            {
                RecordsChanged      = new List <EntityRecord>();
                ListsChanged        = new List <IPropertyBoundList>();
                RecordsToClearLists = new HashSet <EntityRecord>();
                ScheduledCommands   = new List <ScheduledLinqCommand>();
            }
            _appEvents.OnNewSession(this);
            //These might be reset in SaveChanges
            NextTransactionId   = Guid.NewGuid();
            TransactionDateTime = _timeService.UtcNow;
            TransactionStart    = _timeService.ElapsedMilliseconds;
        }
コード例 #4
0
        public JsonResult Auditing(long Id, int status, string comment = "")
        {
            //更新实地认证状态
            ServiceHelper.Create <ICertification>().UpdateStatus(Id, (FieldCertification.CertificationStatus)status, DateTime.Now, comment);

            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Format("实地认证审核页面,供应商Id={0},状态为:{1}, 说明是:{2}", Id, (FieldCertification.CertificationStatus)status, comment),
                IPAddress   = base.Request.UserHostAddress,
                PageUrl     = string.Concat("/FieldCertification/Auditing/", Id),
                UserName    = base.CurrentManager.UserName,
                Id          = 0
            };

            operationLogService.AddPlatformOperationLog(logInfo);
            ManagerInfo Info = ServiceHelper.Create <ICertification>().GetManager(Id);

            if (Info != null)
            {
                UserMemberInfo userInfo = ServiceHelper.Create <IMemberService>().GetMemberByName(Info.UserName);
                //ServiceHelper.Create<ISiteMessagesService>().SendCertificationResultMessage(userInfo.Id, base.CurrentManager.UserName);
            }
            //更新供应商认证状态
            ServiceHelper.Create <IShopService>().UpdateShopGrade(Info.ShopId, (FieldCertification.CertificationStatus)status);
            return(Json(new { Successful = true }));
        }
コード例 #5
0
        public JsonResult CreateCategory(string name, long pId)
        {
            if (string.IsNullOrWhiteSpace(name) || name.Length > 5)
            {
                throw new Exception();
            }
            ShopCategoryInfo shopCategoryInfo = new ShopCategoryInfo()
            {
                Name             = name,
                ParentCategoryId = pId,
                IsShow           = true,
                DisplaySequence  = ServiceHelper.Create <IShopCategoryService>().GetCategoryByParentId(pId).Count() + 1,
                ShopId           = base.CurrentSellerManager.ShopId
            };

            ServiceHelper.Create <IShopCategoryService>().AddCategory(shopCategoryInfo);
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Concat("创建供应商分类,父Id=", pId),
                IPAddress   = base.Request.UserHostAddress,
                PageUrl     = "/Category/CreateCategory",
                UserName    = base.CurrentSellerManager.UserName,
                ShopId      = base.CurrentSellerManager.ShopId
            };

            operationLogService.AddSellerOperationLog(logInfo);
            return(Json(new { successful = true }, JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
 public ProductTypeController(ITypeService iTypeService,
                              IOperationLogService iOperationLogService,
                              IBrandService iBrandService)
 {
     _iTypeService         = iTypeService;
     _iOperationLogService = iOperationLogService;
     _iBrandService        = iBrandService;
 }
コード例 #7
0
ファイル: TimerService.cs プロジェクト: yuanfei05/vita
 public void Init(EntityApp app)
 {
     _timerContext = app.CreateSystemContext();
       _logService = app.GetService<IOperationLogService>();
       _timer = new Timer(100);
       _timer.Elapsed += Timer_Elapsed;
       app.AppEvents.Initializing += Events_Initializing;
 }
コード例 #8
0
ファイル: LogFileWriter.cs プロジェクト: kouweizhong/vita
 public LogFileWriter(EntityApp app, string logPath)
 {
     _app                 = app;
     LogPath              = logPath;
     _logService          = app.GetService <IOperationLogService>();
     _saveService         = app.GetService <IBackgroundSaveService>();
     _saveService.Saving += SaveService_Saving;
 }
コード例 #9
0
 public CapitalController(IMemberCapitalService iMemberCapitalService,
                          IMemberService iMemberService,
                          IOperationLogService iOperationLogService)
 {
     _iMemberCapitalService = iMemberCapitalService;
     _iMemberService        = iMemberService;
     _iOperationLogService  = iOperationLogService;
 }
コード例 #10
0
 public void Init(EntityApp app)
 {
     _app          = app;
     _errorLog     = _app.GetService <IErrorLogService>();
     _operationLog = _app.GetService <IOperationLogService>();
     _timerService = _app.GetService <ITimerService>();
     _timerService.Elapsed1Second  += TimerService_Elapsed1Second;
     _app.AppEvents.FlushRequested += Events_FlushRequested;
 }
コード例 #11
0
ファイル: LogFileWriter.cs プロジェクト: yuanfei05/vita
 public LogFileWriter(EntityApp app, string logPath)
 {
     _app = app;
       LogPath = logPath;
       _logService = app.GetService<IOperationLogService>();
       Util.Check(_logService != null, "OperationLog service not registered, cannot attach LogFileWriter.");
       if (_logService != null)
     _logService.Saving += logService_Saving;
 }
コード例 #12
0
 public void Init(EntityApp app)
 {
     _app = app;
       _errorLog = _app.GetService<IErrorLogService>();
       _operationLog = _app.GetService<IOperationLogService>();
       _timerService = _app.GetService<ITimerService>();
       _timerService.Elapsed1Second += TimerService_Elapsed1Second;
       _app.AppEvents.FlushRequested += Events_FlushRequested;
 }
コード例 #13
0
ファイル: LoggingEntityApp.cs プロジェクト: kouweizhong/vita
        public LoggingEntityApp(string schema = "log", LogModules includeModules = LogModules.All,
                                UserSessionSettings sessionSettings = null) : base("LoggingApp", CurrentVersion)
        {
            var area = base.AddArea(schema);

            ActiveModules = includeModules;
            // DbInfo module is not shared with main app, it is local for the database
            var dbInfo = new DbInfoModule(area);

            // ErrorLog is property in EntityApp, will be set there automatically
            if (ActiveModules.IsSet(LogModules.ErrorLog))
            {
                var errLog = new ErrorLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.OperationLog))
            {
                OperationLog = new OperationLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.IncidentLog))
            {
                IncidentLog = new IncidentLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.TransactionLog))
            {
                TransactionLog = new TransactionLogModule(area, trackHostApp: false); //do not track changes for LoggingApp itself
            }
            if (ActiveModules.IsSet(LogModules.NotificationLog))
            {
                NotificationLog = new NotificationLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.LoginLog))
            {
                LoginLog = new LoginLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.DbUpgradeLog))
            {
                DbUpgradeLog = new DbUpgradeLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.UserSession))
            {
                SessionService = new UserSessionModule(area, sessionSettings);
            }
            if (ActiveModules.IsSet(LogModules.EventLog))
            {
                EventLogService = new EventLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.WebCallLog))
            {
                WebCallLog = new WebCallLogModule(area);
            }
            if (ActiveModules.IsSet(LogModules.WebClientLog))
            {
                WebClientLogService = new WebClientLogModule(area);
            }
        }
コード例 #14
0
ファイル: ShopController.cs プロジェクト: sky63886/Himall3.3
 public ShopController(IShopService iShopService,
                       IProductService iProductService,
                       IOperationLogService iOperationLogService,
                       IRegionService iRegionService,
                       ICategoryService iCategoryService,
                       ISearchProductService iSearchProductService)
 {
     _iShopService          = iShopService;
     _iProductService       = iProductService;
     _iOperationLogService  = iOperationLogService;
     _iRegionService        = iRegionService;
     _iCategoryService      = iCategoryService;
     _iSearchProductService = iSearchProductService;
     //获取当前店铺发布商品的数量
 }
コード例 #15
0
ファイル: EntityCache.cs プロジェクト: yuanfei05/vita
 public EntityCache(EntityApp app, CacheSettings settings, Database database)
 {
     _app = app;
       Settings = settings;
       _dataStore = database;
       _sparseCache = new SparseEntityCache(Settings);
       var dbIsCaseInsensitive = database.Settings.Driver.Features.IsSet(Data.Driver.DbFeatures.DefaultCaseInsensitive);
       var caseMode = dbIsCaseInsensitive ? StringCaseMode.CaseInsensitive : StringCaseMode.CaseSensitive;
       _fullSetCache = new FullSetEntityCache(_app, Settings, _dataStore, caseMode);
       _timeService = _app.GetService<ITimeService>();
       _logService = _app.GetService<IOperationLogService>();
       _errorLog = _app.GetService<IErrorLogService>();
       MarkCachedEntities();
       _app.AppEvents.SavedChanges += Events_SavedChanges;
 }
コード例 #16
0
ファイル: EntityCache.cs プロジェクト: kouweizhong/vita
        public EntityCache(EntityApp app, CacheSettings settings, Database database)
        {
            _app         = app;
            Settings     = settings;
            _dataStore   = database;
            _sparseCache = new SparseEntityCache(Settings);
            var dbIsCaseInsensitive = database.Settings.Driver.Features.IsSet(Data.Driver.DbFeatures.DefaultCaseInsensitive);
            var caseMode            = dbIsCaseInsensitive ? StringCaseMode.CaseInsensitive : StringCaseMode.CaseSensitive;

            _fullSetCache = new FullSetEntityCache(_app, Settings, _dataStore, caseMode);
            _timeService  = _app.GetService <ITimeService>();
            _logService   = _app.GetService <IOperationLogService>();
            _errorLog     = _app.GetService <IErrorLogService>();
            MarkCachedEntities();
            _app.AppEvents.SavedChanges += Events_SavedChanges;
        }
コード例 #17
0
ファイル: LoggingEntityApp.cs プロジェクト: yuanfei05/vita
 public LoggingEntityApp(string schema = "log", UserSessionSettings sessionSettings = null)
     : base("LoggingApp", CurrentVersion)
 {
     var area = base.AddArea(schema);
       var errorLog = new ErrorLogModule(area);
       OperationLog = new OperationLogModule(area);
       IncidentLog = new IncidentLogModule(area);
       TransactionLog = _transactionLogModule = new TransactionLogModule(area);
       WebCallLog = new WebCallLogModule(area);
       NotificationLog = new NotificationLogModule(area);
       LoginLog = new LoginLogModule(area);
       DbModelChangeLog = new DbUpgradeLogModule(area);
       SessionService = new UserSessionModule(area, sessionSettings);
       DbInfoService = new DbInfoModule(area);
       EventLogService = new EventLogModule(area);
 }
コード例 #18
0
        public JsonResult DeleteShop(long Id)
        {
            ServiceHelper.Create <IShopService>().DeleteShop(Id);
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Concat("删除店铺,Id=", Id),
                IPAddress   = base.Request.UserHostAddress,
                PageUrl     = string.Concat("/Shop/Edit/", Id),
                UserName    = base.CurrentManager.UserName,
                ShopId      = 0
            };

            operationLogService.AddPlatformOperationLog(logInfo);
            return(Json(new { Successful = true }));
        }
コード例 #19
0
        public JsonResult Auditing(long shopId, int status, string comment = "")
        {
            ServiceHelper.Create <IShopService>().UpdateShopStatus(shopId, (ShopInfo.ShopAuditStatus)status, comment);
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Format("开店审核页面,店铺Id={0},状态为:{1}, 说明是:{2}", shopId, (ShopInfo.ShopAuditStatus)status, comment),
                IPAddress   = base.Request.UserHostAddress,
                PageUrl     = string.Concat("/Shop/Auditing/", shopId),
                UserName    = base.CurrentManager.UserName,
                ShopId      = 0
            };

            operationLogService.AddPlatformOperationLog(logInfo);
            return(Json(new { Successful = true }));
        }
コード例 #20
0
        public JsonResult DeleteCategoryById(long id)
        {
            ServiceHelper.Create <ICategoryService>().DeleteCategory(id);
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Concat("删除平台分类,Id=", id),
                IPAddress   = base.Request.UserHostAddress,
                PageUrl     = string.Concat("/Category/DeleteCategoryById/", id),
                UserName    = base.CurrentManager.UserName,
                ShopId      = 0
            };

            operationLogService.AddPlatformOperationLog(logInfo);
            return(Json(new { Successful = true }, JsonRequestBehavior.AllowGet));
        }
コード例 #21
0
        public JsonResult UpdateName(string name, long id)
        {
            ServiceHelper.Create <IShopCategoryService>().UpdateCategoryName(id, name);
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date = DateTime.Now
            };

            object[] objArray = new object[] { "修改供应商分类名称,Id=", id, ",名称=", name };
            logInfo.Description = string.Concat(objArray);
            logInfo.IPAddress   = base.Request.UserHostAddress;
            logInfo.PageUrl     = "/Category/UpdateName";
            logInfo.UserName    = base.CurrentSellerManager.UserName;
            logInfo.ShopId      = base.CurrentSellerManager.ShopId;
            operationLogService.AddSellerOperationLog(logInfo);
            return(Json(new { Successful = true }, JsonRequestBehavior.AllowGet));
        }
コード例 #22
0
        public JsonResult Receing(long Id, int status, string comment = "")
        {
            /*状态*/
            ServiceHelper.Create <ICertification>().UpdateStatus(Id, (FieldCertification.CertificationStatus)status, DateTime.Now, comment);

            /*日志*/
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Format("实地认证接收页面,供应商Id={0},状态为:{1}, 说明是:{2}", Id, (FieldCertification.CertificationStatus)status, comment),
                IPAddress   = base.Request.UserHostAddress,
                PageUrl     = string.Concat("/FieldCertification/Receing/", Id),
                UserName    = base.CurrentManager.UserName,
                Id          = 0
            };

            operationLogService.AddPlatformOperationLog(logInfo);

            return(Json(new { Successful = true }));
        }
コード例 #23
0
 public ActionResult Edit(CategoryModel category)
 {
     if (base.ModelState.IsValid)
     {
         ICategoryService categoryService = ServiceHelper.Create <ICategoryService>();
         ProcessingIcon(category, categoryService);
         categoryService.UpdateCategory(category);
         IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
         LogInfo logInfo = new LogInfo()
         {
             Date        = DateTime.Now,
             Description = string.Concat("修改平台分类,Id=", category.Id),
             IPAddress   = base.Request.UserHostAddress,
             PageUrl     = string.Concat("/Category/Edit/", category.Id),
             UserName    = base.CurrentManager.UserName,
             ShopId      = 0
         };
         operationLogService.AddPlatformOperationLog(logInfo);
         return(RedirectToAction("Management"));
     }
     ViewBag.Types = GetTypesList(category.TypeId);
     ViewBag.Depth = category.Depth;
     return(View(category));
 }
コード例 #24
0
        public JsonResult SaveBusinessCategory(long shopId = 0L, string bcategory = "")
        {
            Dictionary <long, decimal> nums = new Dictionary <long, decimal>();

            string[] strArrays = bcategory.Split(new char[] { ',' });
            for (int i = 0; i < strArrays.Length; i++)
            {
                string str = strArrays[i];
                if (!string.IsNullOrWhiteSpace(str))
                {
                    char[] chrArray = new char[] { '|' };
                    if (!nums.ContainsKey(int.Parse(str.Split(chrArray)[0])))
                    {
                        char[] chrArray1 = new char[] { '|' };
                        long   num       = int.Parse(str.Split(chrArray1)[0]);
                        char[] chrArray2 = new char[] { '|' };
                        nums.Add(num, decimal.Parse(str.Split(chrArray2)[1]));
                    }
                }
            }
            ServiceHelper.Create <IShopService>().SaveBusinessCategory(shopId, nums);
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Concat("修改店铺经营类目,店铺Id=", shopId),
                IPAddress   = base.Request.UserHostAddress
            };

            object[] objArray = new object[] { "/Shop/SaveBusinessCategory?shopId=", shopId, "&bcategory=", bcategory };
            logInfo.PageUrl  = string.Concat(objArray);
            logInfo.UserName = base.CurrentManager.UserName;
            logInfo.ShopId   = 0;
            operationLogService.AddPlatformOperationLog(logInfo);
            return(Json(new { Successful = true }));
        }
コード例 #25
0
        public ActionResult SaveModel(TypeInfoModel type)
        {
            if (0 != type.Id)
            {
                ServiceHelper.Create <ITypeService>().UpdateType(type);
            }
            else if (0 == type.Id)
            {
                ServiceHelper.Create <ITypeService>().AddType(type);
            }
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Concat("修改平台类目,Id=", type.Id),
                IPAddress   = base.Request.UserHostAddress,
                PageUrl     = "/ProductType/SaveModel",
                UserName    = base.CurrentManager.UserName,
                ShopId      = 0
            };

            operationLogService.AddPlatformOperationLog(logInfo);
            return(RedirectToAction("Management"));
        }
コード例 #26
0
        public Task Invoke(HttpContext httpContext)
        {
            User user = httpContext.Session.Get <User>("user");

            if (user != null)
            {
                OperationLog log = new OperationLog();
                log.Method = httpContext.Request.Method;
                log.Ip     = httpContext.GetUserIp();
                log.Path   = httpContext.Request.Path;

                if (httpContext.Request.Form != null)
                {
                    Dictionary <string, string> form = httpContext.Request.Form.ToDictionary(x => x.Key, x => x.Value.ToString());
                    log.Input = JsonConvert.SerializeObject(form);
                }
                log.Username = user.Username;
                log.CreateAt = new DateTime();
                IOperationLogService operationLogService = (IOperationLogService)httpContext.RequestServices.GetService(typeof(IOperationLogService));
                operationLogService.Record(log);
            }

            return(_next(httpContext));
        }
コード例 #27
0
 public OperationLogController(IOperationLogService operationLogService)
 {
     this.operationLogService = operationLogService;
 }
コード例 #28
0
 public OperationLogController(IOperationLogService iOperationLogService, IManagerService iManagerService)
 {
     _iOperationLogService = iOperationLogService;
     _iManagerService      = iManagerService;
 }
コード例 #29
0
        public JsonResult Edit(ShopModel shop)
        {
            IShopService shopService = ServiceHelper.Create <IShopService>();
            ShopInfo     companyName = shopService.GetShop(shop.Id, false);

            if (!CheckShopGrade(shop.Id, Convert.ToInt64(shop.ShopGrade)))
            {
                throw new HimallException("该店铺已使用空间数或已添加商品数大于该套餐");
            }
            if (shopService.ExistShop(companyName.ShopName, shop.Id))
            {
                throw new HimallException("该店铺已存在");
            }
            if (!base.ModelState.IsValid)
            {
                List <string> strs = new List <string>();
                foreach (string list in base.ModelState.Keys.ToList())
                {
                    foreach (ModelError modelError in base.ModelState[list].Errors.ToList())
                    {
                        strs.Add(modelError.ErrorMessage);
                    }
                }
                Result result = new Result()
                {
                    success = false,
                    msg     = strs[0].ToString()
                };
                return(Json(result));
            }
            companyName.CompanyName              = shop.CompanyName;
            companyName.CompanyAddress           = shop.CompanyAddress;
            companyName.CompanyPhone             = shop.CompanyPhone;
            companyName.CompanyEmployeeCount     = shop.CompanyEmployeeCount;
            companyName.CompanyRegisteredCapital = shop.CompanyRegisteredCapital;
            companyName.ContactsName             = shop.ContactsName;
            companyName.ContactsEmail            = shop.ContactsEmail;
            companyName.ContactsPhone            = shop.ContactsPhone;
            companyName.BankAccountName          = shop.BankAccountName;
            companyName.BankAccountNumber        = shop.BankAccountNumber;
            companyName.BankCode        = shop.BankCode;
            companyName.BankName        = shop.BankName;
            companyName.BankPhoto       = shop.BankPhoto;
            companyName.ShopName        = shop.Name;
            companyName.GradeId         = Convert.ToInt64(shop.ShopGrade);
            companyName.EndDate         = new DateTime?(Convert.ToDateTime(shop.EndDate));
            companyName.CompanyRegionId = shop.NewCompanyRegionId;
            companyName.BankRegionId    = shop.NewBankRegionId;
            companyName.ShopStatus      = (ShopInfo.ShopAuditStatus)Convert.ToInt32(shop.Status);
            ServiceHelper.Create <IShopService>().UpdateShop(companyName);
            IOperationLogService operationLogService = ServiceHelper.Create <IOperationLogService>();
            LogInfo logInfo = new LogInfo()
            {
                Date        = DateTime.Now,
                Description = string.Concat("修改店铺信息,Id=", shop.Id),
                IPAddress   = base.Request.UserHostAddress,
                PageUrl     = string.Concat("/Shop/Edit/", shop.Id),
                UserName    = base.CurrentManager.UserName,
                ShopId      = 0
            };

            operationLogService.AddPlatformOperationLog(logInfo);
            Result result1 = new Result()
            {
                success = true,
                msg     = "保存成功!"
            };

            return(Json(result1));
        }
コード例 #30
0
 public SystemLogController()
 {
     _operationLogService = new OperationLogService();
 }