Exemplo n.º 1
0
        /// <summary>
        /// 发送广告成单的消息
        /// </summary>
        public void SendOrderMessage(int advertisingId)
        {
            MessageBll bll     = new MessageBll();
            string     msgBody = advertisingId + ",0,1";

            bll.PublishMessage(MessageChannel.ADVERTISING_CHANNEL, MessageTypeEnum.广告线索, msgBody);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 发送学生的课时完成消息
        /// </summary>
        public void PublishLessonFinishMessage(int studentId, int progressId)
        {
            MessageBll bll     = new MessageBll();
            string     msgBody = studentId + "," + progressId;

            bll.PublishMessage(MessageChannel.LESSONTASK_CHANNEL, MessageTypeEnum.课时学习结束, msgBody);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 发送学生的课后练习消息(进行数据统计)
        /// </summary>
        public void PublishStudyPractiseMessage(int courseId, int lessonId, int studentId, int studySeconds, int subjectCount, int getCoins)
        {
            MessageBll bll = new MessageBll();

            CourseStudyPractiseMessage msg = new CourseStudyPractiseMessage();

            msg.AsOfDate     = DateTime.Now.Date;
            msg.CourseId     = courseId;
            msg.LessonId     = lessonId;
            msg.StudentId    = studentId;
            msg.StudySeconds = studySeconds;
            msg.SubjectCount = subjectCount;
            msg.GetCoins     = getCoins;
            string msgBody = JsonConvert.SerializeObject(msg);

            bll.PublishMessage(MessageChannel.REPORT_CHANNEL, MessageTypeEnum.课后练习, msgBody);
        }