Example #1
0
        public ExecResult Del(SiteResourceQuery query)
        {
            ExecResult           execResult = new ExecResult();
            ISiteResourceService service    = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>();

            Int64[] ResourceIDs = query.ResourceIDs;
            if (ResourceIDs == null)
            {
                execResult.result = EnumJsonResult.failure.ToString();
                execResult.msg    = "没有删除任何数据!";
                return(execResult);
            }
            string msg    = string.Empty;
            bool   result = service.BatchDeleteSiteResource(ResourceIDs);

            if (result)
            {
                execResult.result = EnumJsonResult.success.ToString();
                execResult.msg    = "删除资源文件成功!";
            }
            else
            {
                execResult.result = EnumJsonResult.failure.ToString();
                execResult.msg    = "删除资源文件失败!";
            }
            return(execResult);
        }
Example #2
0
        public bool DownloadCount(SiteResourceEntity model)
        {
            ISiteResourceService service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>();
            bool result = service.AccumulationDownloadCount(model);

            return(result);
        }
Example #3
0
        public SiteResourceEntity GetModel(SiteResourceQuery query)
        {
            ISiteResourceService service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>();
            SiteResourceEntity   model   = service.GetSiteResourceModel(query);

            return(model);
        }
Example #4
0
        public IList <SiteResourceEntity> GetList(SiteResourceQuery query)
        {
            ISiteResourceService       service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>();
            IList <SiteResourceEntity> list    = service.GetSiteResourceList(query);

            return(list);
        }
Example #5
0
        public Pager <SiteResourceEntity> GetPageList(SiteResourceQuery query)
        {
            ISiteResourceService       service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>();
            Pager <SiteResourceEntity> pager   = service.GetSiteResourcePageList(query);

            return(pager);
        }
Example #6
0
        public ExecResult Save(SiteResourceEntity model)
        {
            ISiteResourceService service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>();

            return(service.Save(model));
        }