|
@@ -1,6 +1,7 @@
|
|
|
package com.yonge.cooleshow.biz.dal.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
|
|
|
import com.yonge.cooleshow.auth.api.dto.RealnameAuthReq;
|
|
@@ -108,9 +109,9 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
teacherHomeVo.setPhone(ValueUtil.fuzzyMobile(teacherHomeVo.getPhone()));
|
|
|
teacherHomeVo.setHeardUrl(user.getAvatar());
|
|
|
|
|
|
- if(YesOrNoEnum.YES.equals(teacher.getEntryFlag())){
|
|
|
+ if (YesOrNoEnum.YES.equals(teacher.getEntryFlag())) {
|
|
|
teacherHomeVo.setEntryStatus(AuthStatusEnum.PASS);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
TeacherAuthEntryRecordVo entryRecord = entryRecordService.getLastRecordByUserId(user.getId());
|
|
|
if (null == entryRecord) {
|
|
|
teacherHomeVo.setEntryStatus(AuthStatusEnum.UNPAALY);
|
|
@@ -119,9 +120,9 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(YesOrNoEnum.YES.equals(teacher.getMusicianFlag())){
|
|
|
+ if (YesOrNoEnum.YES.equals(teacher.getMusicianFlag())) {
|
|
|
teacherHomeVo.setMusicianAuthStatus(AuthStatusEnum.PASS);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
TeacherAuthMusicianRecord musicianRecord = musicianRecordService.getLastRecordByUserId(user.getId());
|
|
|
if (null == musicianRecord) {
|
|
|
teacherHomeVo.setMusicianAuthStatus(AuthStatusEnum.UNPAALY);
|
|
@@ -211,6 +212,13 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
teacher = getTeacherDetil(teacher, teacherSubmitReq);
|
|
|
teacher.setUpdateTime(new Date());
|
|
|
baseMapper.updateById(teacher);
|
|
|
+ if (null == teacher.getEntryAuthDate() || null == teacher.getMusicianDate()) {
|
|
|
+ baseMapper.update(teacher, Wrappers.<Teacher>lambdaUpdate()
|
|
|
+ .set(Teacher::getEntryAuthDate, teacher.getEntryAuthDate())
|
|
|
+ .set(Teacher::getMusicianDate, teacher.getMusicianDate())
|
|
|
+ .eq(Teacher::getUserId, teacher.getUserId())
|
|
|
+ );
|
|
|
+ }
|
|
|
|
|
|
sysUser.setUpdateTime(new Date());
|
|
|
employeeDao.updateSysUser(sysUser);
|
|
@@ -288,10 +296,10 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
public HttpResponseResult<TeacherVo> queryTeacherStyle(Long id) {
|
|
|
TeacherVo detail = detail(id);
|
|
|
LiveRoom liveRoom = liveRoomService.getliveingRoomBySpeakerId(id);
|
|
|
- if(null != liveRoom){
|
|
|
+ if (null != liveRoom) {
|
|
|
detail.setRoomUid(liveRoom.getRoomUid());
|
|
|
detail.setLiveing(YesOrNoEnum.YES);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
detail.setLiveing(YesOrNoEnum.NO);
|
|
|
}
|
|
|
return HttpResponseResult.succeed(detail);
|