Esempio n. 1
0
 /// <summary>
 /// 设置资讯置顶状态
 /// </summary>
 /// <param name="articleId"></param>
 /// <param name="enable"></param>
 /// <returns></returns>
 public static bool SetArticleEnableTop(int articleId, bool enable)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.SetArticleEnableTop(articleId, enable));
     }
 }
Esempio n. 2
0
 /// <summary>
 /// 获取资讯列表
 /// </summary>
 /// <param name="AuthorIdentity">作者身份类型,0集团,1总店,2分店  3盟主 4盟友</param>
 /// <param name="pageindex">The pageindex.</param>
 /// <param name="pageSize">Size of the page.</param>
 /// <param name="userId">The user identifier.</param>
 /// <returns>ResultPageModel.</returns>
 public static ResultPageModel GetAppArticleList(int AuthorIdentity, int pageindex, int pageSize, int userId)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetAppArticleList(AuthorIdentity, pageindex, pageSize, userId));
     }
 }
Esempio n. 3
0
 public static int AddArticle(ArticleModel model)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.AddArticle(model));
     }
 }
Esempio n. 4
0
 /// <summary>
 /// 获取置顶资讯数据
 /// </summary>
 /// <param name="AuthorIdentity">The author identity.</param>
 /// <returns>List&lt;ArticleBaseModel&gt;.</returns>
 public static List <ArticleBaseModel> GetAppTopArticleList(int AuthorIdentity)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetAppTopArticleList(AuthorIdentity));
     }
 }
Esempio n. 5
0
 /// <summary>
 /// 更新资讯浏览量
 /// </summary>
 /// <param name="articleId">The article identifier.</param>
 /// <returns>true if XXXX, false otherwise.</returns>
 public static bool UpdateArticleAmount(int articleId)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.UpdateArticleAmount(articleId));
     }
 }
Esempio n. 6
0
 /// <summary>
 /// 获取资讯列表
 /// </summary>
 /// <param name="AuthorId"></param>
 /// <param name="AuthorIdentity">作者身份类型,0集团,1总店,2分店  3盟主 4盟友</param>
 /// <param name="model"></param>
 /// <returns></returns>
 public static ResultPageModel GetArticleList(int AuthorId, int AuthorIdentity, SearchModel model)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetArticleList(AuthorId, AuthorIdentity, model));
     }
 }
Esempio n. 7
0
 /// <summary>
 /// 获取资讯信息
 /// </summary>
 /// <param name="articleId"></param>
 /// <returns></returns>
 public static ArticleModel GetModel(int articleId)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetModel(articleId));
     }
 }
Esempio n. 8
0
 /// <summary>
 /// 设置资讯审核状态
 /// </summary>
 /// <param name="articleId">The article identifier.</param>
 /// <param name="status">-1 审核失败 1审核成功</param>
 /// <param name="remark">The remark.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public static bool SetArticleStatus(int articleId, int status, string remark)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.SetArticleStatus(articleId, status, remark));
     }
 }
Esempio n. 9
0
 /// <summary>
 /// 获取评论列表
 /// </summary>
 /// <param name="mailId">The mail identifier.</param>
 /// <param name="pageindex">The pageindex.</param>
 /// <param name="pageSize">Size of the page.</param>
 /// <returns>ResultPageModel.</returns>
 public static ResultPageModel GetReplyMailList(int mailId, int pageindex, int pageSize)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetReplyMailList(mailId, pageindex, pageSize));
     }
 }
Esempio n. 10
0
 /// <summary>
 /// 删除资讯
 /// </summary>
 /// <param name="articleId"></param>
 /// <returns></returns>
 public static bool DeleteArticle(int articleId)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.DeleteArticle(articleId));
     }
 }
Esempio n. 11
0
 /// <summary>
 /// 获取留言列表
 /// </summary>
 /// <param name="model">The model.</param>
 /// <returns>ResultPageModel.</returns>
 public static ResultPageModel GetMailList(SearchModel model)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetMailList(model));
     }
 }
Esempio n. 12
0
 /// <summary>
 /// 获取站内消息
 /// </summary>
 /// <param name="AuthorIdentity">类型 1盟主和盟友,2系统反馈消息</param>
 /// <param name="pageindex">The pageindex.</param>
 /// <param name="pageSize">Size of the page.</param>
 /// <param name="userId">The user identifier.</param>
 /// <param name="isPush">是否获取推送的消息</param>
 /// <returns>ResultPageModel.</returns>
 public static ResultPageModel GetAppMailList(int AuthorIdentity, int pageindex, int pageSize, int userId, bool isPush, bool isAll = false)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetAppMailList(AuthorIdentity, pageindex, pageSize, userId, isPush, isAll));
     }
 }
Esempio n. 13
0
 /// <summary>
 /// 获取未读消息数量
 /// </summary>
 /// <param name="userId">The user identifier.</param>
 /// <param name="sendType">0我发的消息 1 我接收的消息,2我的留言</param>
 /// <returns>System.Int32.</returns>
 public static int GetNotReadMessageCount(int userId, int sendType)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetNotReadMessageCount(userId, sendType));
     }
 }
Esempio n. 14
0
 /// <summary>
 /// 获取信息实体
 /// </summary>
 /// <param name="mailId">The mail identifier.</param>
 /// <returns>MailModel.</returns>
 public static MailModel GetMailModel(int mailId)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.GetMailModel(mailId));
     }
 }
Esempio n. 15
0
 /// <summary>
 /// 添加站内信息
 /// </summary>
 /// <param name="model">The model.</param>
 /// <returns>System.Int32.</returns>
 public static int AddMailInfo(MailModel model)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         return(dal.AddMailInfo(model));
     }
 }
Esempio n. 16
0
 /// <summary>
 /// 编辑资讯信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static bool EditArticle(ArticleModel model)
 {
     using (var dal = FactoryDispatcher.ArticleFactory())
     {
         if (model.ArticleId > 0)
         {
             return(dal.UpdateArticle(model));
         }
         else
         {
             return(dal.AddArticle(model) > 0);
         }
     }
 }