|
@@ -19,7 +19,9 @@ import com.ym.mec.common.page.QueryInfo;
|
|
|
import com.ym.mec.common.service.IdGeneratorService;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.im.ImFeignService;
|
|
|
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
+import com.ym.mec.util.date.DateUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -80,6 +82,8 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
|
|
|
private SysTenantAccountService sysTenantAccountService;
|
|
|
@Autowired
|
|
|
private StudentDao studentDao;
|
|
|
+ @Autowired
|
|
|
+ private SysMessageService sysMessageService;
|
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory
|
|
|
.getLogger(PracticeGroupService.class);
|
|
@@ -589,4 +593,19 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
|
|
|
// 创建群组
|
|
|
imFeignService.groupCreate(new ImGroupModel(classGroup.getId().toString(), imGroupMembers, classGroup.getName()));
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void noStudentsCourseGroupRemind() {
|
|
|
+ Date startDate = DateUtil.addDays(new Date(), -1);
|
|
|
+ List<CoursesGroup> noStudentsGroups = coursesGroupDao.findNoStudentsGroups(startDate);
|
|
|
+ if(CollectionUtils.isEmpty(noStudentsGroups)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<Integer, String> userMap = new HashMap<>();
|
|
|
+ for (CoursesGroup noStudentsGroup : noStudentsGroups) {
|
|
|
+ userMap.put(noStudentsGroup.getTeacherId(), noStudentsGroup.getTeacherId().toString());
|
|
|
+ }
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.COMM_NO_STUDENTS_PUSH,
|
|
|
+ userMap, null, 0, null, "TEACHER");
|
|
|
+ }
|
|
|
}
|