|
@@ -10,10 +10,7 @@ import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.auth.api.entity.SysUser;
|
|
import com.yonge.cooleshow.biz.dal.dao.LiveRoomDao;
|
|
import com.yonge.cooleshow.biz.dal.dao.LiveRoomDao;
|
|
import com.yonge.cooleshow.biz.dal.entity.*;
|
|
import com.yonge.cooleshow.biz.dal.entity.*;
|
|
-import com.yonge.cooleshow.biz.dal.enums.CourseScheduleEnum;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.enums.OrderStatusEnum;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.enums.RoomTypeEnum;
|
|
|
|
-import com.yonge.cooleshow.biz.dal.enums.TeacherSalaryEnum;
|
|
|
|
|
|
+import com.yonge.cooleshow.biz.dal.enums.*;
|
|
import com.yonge.cooleshow.biz.dal.service.*;
|
|
import com.yonge.cooleshow.biz.dal.service.*;
|
|
import com.yonge.cooleshow.biz.dal.support.IMHelper;
|
|
import com.yonge.cooleshow.biz.dal.support.IMHelper;
|
|
import com.yonge.cooleshow.biz.dal.support.WrapperUtil;
|
|
import com.yonge.cooleshow.biz.dal.support.WrapperUtil;
|
|
@@ -21,6 +18,7 @@ import com.yonge.cooleshow.biz.dal.vo.UserOrderVo;
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
import com.yonge.toolset.base.exception.BizException;
|
|
import com.yonge.toolset.base.page.PageInfo;
|
|
import com.yonge.toolset.base.page.PageInfo;
|
|
import com.yonge.toolset.mybatis.support.PageUtil;
|
|
import com.yonge.toolset.mybatis.support.PageUtil;
|
|
|
|
+import com.yonge.toolset.thirdparty.message.MessageSenderPluginContext;
|
|
import com.yonge.toolset.utils.date.DateUtil;
|
|
import com.yonge.toolset.utils.date.DateUtil;
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -76,6 +74,8 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
|
|
private StudentAttendanceService studentAttendanceService;
|
|
private StudentAttendanceService studentAttendanceService;
|
|
@Autowired
|
|
@Autowired
|
|
private TeacherAttendanceService teacherAttendanceService;
|
|
private TeacherAttendanceService teacherAttendanceService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private SysMessageService sysMessageService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 生成房间UID
|
|
* 生成房间UID
|
|
@@ -169,7 +169,7 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
|
|
//查询房间提前创建的时间
|
|
//查询房间提前创建的时间
|
|
String preCreateRoomMinute = sysConfigService.findConfigValue(PRE_CREATE_LIVE_ROOM_MINUTE);
|
|
String preCreateRoomMinute = sysConfigService.findConfigValue(PRE_CREATE_LIVE_ROOM_MINUTE);
|
|
if (StringUtils.isEmpty(preCreateRoomMinute)) {
|
|
if (StringUtils.isEmpty(preCreateRoomMinute)) {
|
|
- log.info("roomDestroy>>>> 未查询到配置:{}", PRE_CREATE_LIVE_ROOM_MINUTE);
|
|
|
|
|
|
+ log.info("createCourseLiveRoom>>>> 未查询到配置:{}", PRE_CREATE_LIVE_ROOM_MINUTE);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
//查询课时表生成直播间
|
|
//查询课时表生成直播间
|
|
@@ -225,10 +225,32 @@ public class LiveRoomServiceImpl extends ServiceImpl<LiveRoomDao, LiveRoom> impl
|
|
this.save(room);
|
|
this.save(room);
|
|
//去融云创建房间及创建房间缓存信息
|
|
//去融云创建房间及创建房间缓存信息
|
|
createLiveRoomInfo(room);
|
|
createLiveRoomInfo(room);
|
|
|
|
+ //开课提醒
|
|
|
|
+ pushLiveCreateRoom(room);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 开课提醒
|
|
|
|
+ */
|
|
|
|
+ private void pushLiveCreateRoom(LiveRoom room) {
|
|
|
|
+ try {
|
|
|
|
+ //查询老师信息
|
|
|
|
+ SysUser teacherInfo = getSysUser(room.getSpeakerId());
|
|
|
|
+ //极光-消息推送
|
|
|
|
+ Map<Long, String> teacherMap = new HashMap<>();
|
|
|
|
+ teacherMap.put(teacherInfo.getId(), teacherInfo.getPhone());
|
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.LIVE_REMINDER,
|
|
|
|
+ teacherMap, null, 0, null, ClientEnum.TEACHER.getCode(),
|
|
|
|
+ teacherInfo.getUsername(), room.getRoomTitle());
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("pushLiveCreateRoom JIGUANG error param : {}", JSONObject.toJSONString(room));
|
|
|
|
+ log.error("pushLiveCreateRoom JIGUANG error", e.getCause());
|
|
|
|
+ }
|
|
|
|
+ log.info("pushLiveCreateRoom JIGUANG ok param : {}", JSONObject.toJSONString(room));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
* 创建临时房间-直播间
|
|
* 创建临时房间-直播间
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|