def push_put_back_form_message(cls, form_model): """ 发送问卷打回的消息 :param form_model: :return: """ tmpl = '问卷 课程{lesson_name}, 级别:{lesson_level}, 教师: {lesson_teacher} ,于{created_at} 被打回, 评价者{guider}, 督导小组{group}.' NoticeService.push_new_message( username=form_model.get('meta', {}).get('guider'), notice={ 'title': '问卷打回', 'body': tmpl.format(lesson_name=form_model.get('meta', {}).get( 'lesson', {}).get('lesson_name', ''), created_at=form_model.get('meta', {}).get('created_at'), created_by=form_model.get('meta', {}).get('created_by'), guider=form_model.get('meta', {}).get('guider_name'), group=form_model.get('meta', {}).get('guider_group'), lesson_level=form_model.get('meta', {}).get( 'lesson', {}).get('lesson_level', ''), lesson_teacher=form_model.get('meta', {}).get( 'lesson', {}).get('lesson_teacher_name', '')) })
def get_notices_num(cls, user): """ 获取未读消息数量 :param user: :return: """ return NoticeService.get_notices_num(user)
def get_newest_notices(cls, user): """ 获取最新 :param user: :return: """ return NoticeService.get_newest_notices(user)