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); }
public bool DownloadCount(SiteResourceEntity model) { ISiteResourceService service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>(); bool result = service.AccumulationDownloadCount(model); return(result); }
public SiteResourceEntity GetModel(SiteResourceQuery query) { ISiteResourceService service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>(); SiteResourceEntity model = service.GetSiteResourceModel(query); return(model); }
public IList <SiteResourceEntity> GetList(SiteResourceQuery query) { ISiteResourceService service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>(); IList <SiteResourceEntity> list = service.GetSiteResourceList(query); return(list); }
public Pager <SiteResourceEntity> GetPageList(SiteResourceQuery query) { ISiteResourceService service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>(); Pager <SiteResourceEntity> pager = service.GetSiteResourcePageList(query); return(pager); }
public ExecResult Save(SiteResourceEntity model) { ISiteResourceService service = ServiceContainer.Instance.Container.Resolve <ISiteResourceService>(); return(service.Save(model)); }