|
@@ -45,6 +45,7 @@ import com.yonge.cooleshow.biz.dal.entity.TeacherTotal;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.UserAccount;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.ClientEnum;
|
|
|
+import com.yonge.cooleshow.biz.dal.enums.MessageTypeEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.TeacherTagEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.enums.TeacherTypeEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.service.StudentService;
|
|
@@ -498,10 +499,12 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
if(styleVideo == null){
|
|
|
styleVideo = new ArrayList<TeacherStyleVideo>();
|
|
|
}
|
|
|
+ //修改老师信息
|
|
|
+
|
|
|
+ List<TeacherStyleVideo> teacherStyleVideoList = teacherStyleVideoService.list(Wrappers.<TeacherStyleVideo>lambdaQuery()
|
|
|
+ .eq(TeacherStyleVideo::getUserId, userId));
|
|
|
|
|
|
- Map<Long, TeacherStyleVideo> oldMap = teacherStyleVideoService.list(Wrappers.<TeacherStyleVideo>lambdaQuery()
|
|
|
- .eq(TeacherStyleVideo::getUserId, userId))
|
|
|
- .stream().collect(Collectors.toMap(TeacherStyleVideo::getId, o -> o));
|
|
|
+ Map<Long, TeacherStyleVideo> oldMap = teacherStyleVideoList.stream().collect(Collectors.toMap(TeacherStyleVideo::getId, o -> o));
|
|
|
|
|
|
List<TeacherStyleVideo> createList = styleVideo.stream().filter(o -> o.getId() == null)
|
|
|
.collect(Collectors.toList());
|
|
@@ -514,6 +517,12 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
|
|
|
List<Long> oldIds = styleVideo.stream().filter(o -> o.getId() != null)
|
|
|
.map(TeacherStyleVideo::getId).collect(Collectors.toList());
|
|
|
+
|
|
|
+ for(TeacherStyleVideo tv : teacherStyleVideoList){
|
|
|
+ if(tv.getAuthStatus() == AuthStatusEnum.DOING){
|
|
|
+ oldIds.add(tv.getId());
|
|
|
+ }
|
|
|
+ }
|
|
|
//删除旧视频
|
|
|
teacherStyleVideoService.removeByUserIdAndOldIds(userId, oldIds);
|
|
|
//保存新视频
|
|
@@ -540,8 +549,8 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
Map<Long, String> receivers = new HashMap<>();
|
|
|
receivers.put(userId, user.getPhone());
|
|
|
|
|
|
- sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, "系统消息", message, receivers, null,
|
|
|
- 0, null, ClientEnum.TEACHER.getCode());
|
|
|
+ sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.CUSTOME_MESSAGE_PUSH, receivers, null, 0,
|
|
|
+ null, ClientEnum.TEACHER.getCode(), message);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
log.error("[老师风采修改]发送消息失败--> {}", e.fillInStackTrace());
|