Open songhuiqing88 opened 7 years ago
/** * 课程主题,课程学习完成则发布<br> * Map<String, String> noticeMap = new HashMap<String, String>();<br> * noticeMap.put("courseId", 课程ID); <br> * noticeMap.put("courseName", 课程名称); <br> * noticeMap.put("courseType", 课程类型); course_required:必须 course_elective:选修<br> * noticeMap.put("userId",用户ID);<br> * noticeMap.put("validIncreaseTime", 有效学习时长);<br> * noticeMap.put("score", 学时); <br> * noticeMap.put("courseCheckState", 课程通过状态);1:通过,2:没通过<br> * courseSubject.notifyListeners(noticeMap); * * @author yannis */ @Component("org.gtiles.components.courseinfo.observable.CourseSubject") public class CourseSubject extends AbstractSubjectImpl { }
定义观察者,观察“org.gtiles.components.courseinfo.observable.CourseSubject”,在update方法中获取发布内容。 public class UserCoursePassObservable implements Observer { public boolean update(Object obj) { //业务操作 } }
定义观察者,观察“org.gtiles.components.courseinfo.observable.CourseSubject”,在update方法中获取发布内容。
public class UserCoursePassObservable implements Observer { public boolean update(Object obj) { //业务操作 } }
产品事件发布
项目扩展