| | |
| | | // String groupId = msg.getUserProperties("groupId"); |
| | | // String classId = msg.getUserProperties("classId"); |
| | | // String actionType = msg.getUserProperties("actionType"); |
| | | // 练习不再发系统通知 by cyq 20160823 |
| | | // 练习不再发系统通知 by cyq 20160823 |
| | | //sendSysNotice(groupId, classId, actionType); |
| | | |
| | | } catch (Exception e) { |
| | |
| | | ";groupId:" + msg.getUserProperties("groupId") + |
| | | ";actionType:" + msg.getUserProperties("actionType") ; |
| | | |
| | | log.error( businessId + " :更新练习系统消息发送失败:" + e , e); |
| | | log.error( businessId + " :更新练习系统消息发送失败:" + e , e); |
| | | onsExceptionLogService.doSaveExceptionLog(cfg.getConfigByEnv("ons-common-topic"), "SYS_EXER_SAVE", businessId , desp ); |
| | | |
| | | }*/ |
| | | } |
| | | |
| | | /** |
| | | * 发送消息 |
| | | * 发送消息 |
| | | * @param groupId |
| | | * @param classId |
| | | * @param actionType |
| | |
| | | extra.put("classId", classId); |
| | | extra.put("className", cls.getName()); |
| | | if ("new".equalsIgnoreCase(actionType)) { |
| | | extra.put("title", "有新的习题啦"); |
| | | content = cls.getName() + "班有新的习题哦,赶快去瞄瞄吧!"; |
| | | extra.put("title", "有新的习题啦"); |
| | | content = cls.getName() + "班有新的习题哦,赶快去瞄瞄吧!"; |
| | | } else if ("update".equalsIgnoreCase(actionType)) { |
| | | extra.put("title", "习题有更新啦"); |
| | | content = cls.getName() + "班习题有更新哦,赶快去瞄瞄吧!"; |
| | | extra.put("title", "习题有更新啦"); |
| | | content = cls.getName() + "班习题有更新哦,赶快去瞄瞄吧!"; |
| | | } |
| | | // add cyq |
| | | JSONObject androidParam = new JSONObject(); |
| | |
| | | if (group.getType() == ExerciseGroup.TYPE_HOMEWORK) { |
| | | |
| | | extra.put("type", SysNoticeConfigMetadata.TYPE_EXERCISE_HOMEWORK); |
| | | androidParam.put("key_exercise_type_name", "家庭作业"); |
| | | androidParam.put("key_exercise_type_name", "家庭作业"); |
| | | androidParam.put("key_exercise_list_url", "http://www.qxueyou.com/qxueyou/exercise/Exercise/homeWorkListNew"); |
| | | androidParam.put("key_exercise_type", "1"); |
| | | iOSParam.put("Titlename", "家庭作业"); |
| | | iOSParam.put("Titlename", "家庭作业"); |
| | | |
| | | } else if (group.getType() == ExerciseGroup.TYPE_MOCK_EXAM) { |
| | | |
| | | extra.put("type", SysNoticeConfigMetadata.TYPE_EXERCISE_ANALOGY); |
| | | androidParam.put("key_exercise_type_name", "模拟考试"); |
| | | androidParam.put("key_exercise_type_name", "模拟考试"); |
| | | androidParam.put("key_exercise_list_url", "http://www.qxueyou.com/qxueyou/exercise/Exercise/examsListNew"); |
| | | androidParam.put("key_exercise_type", "4"); |
| | | iOSParam.put("Titlename", "模拟考试"); |
| | | iOSParam.put("Titlename", "模拟考试"); |
| | | |
| | | } else if (group.getType() == ExerciseGroup.TYPE_CHAPTER_ITEM) { |
| | | |
| | | extra.put("type", SysNoticeConfigMetadata.TYPE_EXERCISE_CHAPTER); |
| | | androidParam.put("key_exercise_type_name", "章节练习"); |
| | | androidParam.put("key_exercise_type_name", "章节练习"); |
| | | androidParam.put("key_exercise_list_url", "http://www.qxueyou.com/qxueyou/exercise/Exercise/chapterListNew"); |
| | | androidParam.put("key_exercise_type", "6"); |
| | | iOSParam.put("Titlename", "章节练习"); |
| | | iOSParam.put("Titlename", "章节练习"); |
| | | |
| | | } else if (group.getType() == ExerciseGroup.TYPE_EXERCISE_TOPIC) { |
| | | |
| | | extra.put("type", SysNoticeConfigMetadata.TYPE_EXERCISE_CHAPTER); |
| | | androidParam.put("key_exercise_type_name", "专项练习"); |
| | | androidParam.put("key_exercise_type_name", "专项练习"); |
| | | androidParam.put("key_exercise_list_url", "http://www.qxueyou.com/qxueyou/exercise/Exercise/topicListNew"); |
| | | androidParam.put("key_exercise_type", "9"); |
| | | iOSParam.put("Titlename", "专项练习"); |
| | | iOSParam.put("Titlename", "专项练习"); |
| | | |
| | | } else if (group.getType() == ExerciseGroup.TYPE_EXERCISE_FREE) { |
| | | |
| | | extra.put("type", SysNoticeConfigMetadata.TYPE_EXERCISE_FREEDOM); |
| | | androidParam.put("key_exercise_type_name", "自由练习"); |
| | | androidParam.put("key_exercise_type_name", "自由练习"); |
| | | androidParam.put("key_exercise_list_url", "http://www.qxueyou.com/qxueyou/exercise/Exercise/freeListNew"); |
| | | androidParam.put("key_exercise_type", "10"); |
| | | iOSParam.put("Titlename", "自由练习"); |
| | | iOSParam.put("Titlename", "自由练习"); |
| | | |
| | | } |
| | | |
| | | extra.put("androidParams", androidParam.toString()); |
| | | extra.put("iosParams", iOSParam.toString()); |
| | | if (StringUtils.isNotEmpty(content)) { |
| | | // 对消息接收人按每批最多20人分批发送 |
| | | // 对消息接收人按每批最多20人分批发送 |
| | | String[] receivers; |
| | | int loop = (userIdList.size() + 19) / 20; |
| | | for (int i = 0; i < loop; i ++) { |