Himall商城AppBaseApplication、AppMessageApplication

using Himall.Core;
using Himall.IServices;

namespace Himall.Application
{
    public class AppBaseApplication
    {
        static IAppBaseService _iAppBaseService = ObjectContainer.Current.Resolve();

        ///


        /// 通过appkey获取AppSecret
        ///

        ///
        ///
        public static string GetAppSecret(string appkey)
        {
            return _iAppBaseService.GetAppSecret(appkey);
        }
    }
}

using System;
using System.Collections.Generic;
using Himall.IServices;
using AutoMapper;
using Himall.Core;
using Himall.DTO;
using Himall.Core.Plugins.Message;
using Himall.Model;
using Himall.DTO.QueryModel;
using Himall.CommonModel;

namespace Himall.Application
{
    public class AppMessageApplication
    {
        private static IAppMessageService _appMessageService = ObjectContainer.Current.Resolve();

        ///


        /// 未读消息数(30天内)
        ///

        ///
        ///
        public static int GetShopNoReadMessageCount(long shopId)
        {
            return _appMessageService.GetShopNoReadMessageCount(shopId);
        }
        ///
        /// 未读消息数(30天内)
        ///

        ///
        ///
        public static int GetBranchNoReadMessageCount(long shopBranchId)
        {
            return _appMessageService.GetBranchNoReadMessageCount(shopBranchId);
        }

        ///


        /// 获取消息列表
        ///

        ///
        ///
        public static QueryPageModel GetMessages(AppMessageQuery query)
        {
            return _appMessageService.GetMessages(query);
        }
        ///
        /// 消息状态改己读
        ///

        ///
        public static void ReadMessage(long id)
        {
            _appMessageService.ReadMessage(id);
        }
        ///
        /// 新增消息
        ///

        ///
        public static void AddAppMessages(AppMessages appMessages)
        {
            AutoMapper.Mapper.CreateMap();
            var appMessagesInfo = AutoMapper.Mapper.Map(appMessages);
            _appMessageService.AddAppMessages(appMessagesInfo);
        }
    }
}

你可能感兴趣的:(servlet,c#,c++)