Browse Source

Merge branch 'feature/1113-vipCourse' of http://git.dayaedu.com/yonge/cooleshow into develop-new

zouxuan 11 months ago
parent
commit
ba10c920fd

+ 9 - 20
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherAuthEntryRecordServiceImpl.java

@@ -15,17 +15,8 @@ import com.yonge.cooleshow.biz.dal.entity.ImGroup;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.entity.Teacher;
 import com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord;
 import com.yonge.cooleshow.biz.dal.entity.TeacherAuthEntryRecord;
 import com.yonge.cooleshow.biz.dal.entity.TeacherStyleVideo;
 import com.yonge.cooleshow.biz.dal.entity.TeacherStyleVideo;
-import com.yonge.cooleshow.biz.dal.enums.AuthStatusEnum;
-import com.yonge.cooleshow.biz.dal.enums.AuthTypeEnum;
-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.service.ImGroupService;
-import com.yonge.cooleshow.biz.dal.service.SysMessageService;
-import com.yonge.cooleshow.biz.dal.service.TeacherAuthEntryRecordService;
-import com.yonge.cooleshow.biz.dal.service.TeacherService;
-import com.yonge.cooleshow.biz.dal.service.TeacherStyleVideoService;
-import com.yonge.cooleshow.biz.dal.service.UserFirstTimeService;
+import com.yonge.cooleshow.biz.dal.enums.*;
+import com.yonge.cooleshow.biz.dal.service.*;
 import com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo;
 import com.yonge.cooleshow.biz.dal.vo.TeacherAuthEntryRecordVo;
 import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
 import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
 import com.yonge.cooleshow.biz.dal.wrapper.im.ImGroupWrapper;
 import com.yonge.cooleshow.biz.dal.wrapper.im.ImGroupWrapper;
@@ -47,11 +38,7 @@ import org.springframework.util.CollectionUtils;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.text.MessageFormat;
 import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 
 @Service
 @Service
 public class TeacherAuthEntryRecordServiceImpl extends ServiceImpl<TeacherAuthEntryRecordDao, TeacherAuthEntryRecord> implements TeacherAuthEntryRecordService {
 public class TeacherAuthEntryRecordServiceImpl extends ServiceImpl<TeacherAuthEntryRecordDao, TeacherAuthEntryRecord> implements TeacherAuthEntryRecordService {
@@ -115,10 +102,12 @@ public class TeacherAuthEntryRecordServiceImpl extends ServiceImpl<TeacherAuthEn
                 continue;
                 continue;
             }*/
             }*/
             if (authOperaReq.getPass()) {
             if (authOperaReq.getPass()) {
-                teacher.setSubjectId(build.getSubjectId());
-                teacher.setIntroduction(StringUtil.isEmpty(teacher.getIntroduction()) ? build.getIntroduction() : teacher.getIntroduction());
-                teacher.setGraduateSchool(StringUtil.isEmpty(teacher.getGraduateSchool()) ? build.getGraduateSchool() : teacher.getGraduateSchool());
-                teacher.setSubject(StringUtil.isEmpty(teacher.getSubject()) ? build.getSubject() : teacher.getSubject());
+                if(build.getTeacherAuthType() == AuthTypeEnum.ADD){
+                    teacher.setSubjectId(build.getSubjectId());
+                    teacher.setIntroduction(build.getIntroduction());
+                }
+                teacher.setSubject(build.getSubject());
+                teacher.setGraduateSchool(build.getGraduateSchool());
                 teacher.setGradCertificate( StringUtil.isEmpty(build.getGradCertificate())?"":build.getGradCertificate());
                 teacher.setGradCertificate( StringUtil.isEmpty(build.getGradCertificate())?"":build.getGradCertificate());
                 teacher.setDegreeCertificate(StringUtil.isEmpty( build.getDegreeCertificate())?"":build.getDegreeCertificate());
                 teacher.setDegreeCertificate(StringUtil.isEmpty( build.getDegreeCertificate())?"":build.getDegreeCertificate());
                 teacher.setTeacherCertificate( StringUtil.isEmpty(build.getTeacherCertificate())?"":build.getTeacherCertificate());
                 teacher.setTeacherCertificate( StringUtil.isEmpty(build.getTeacherCertificate())?"":build.getTeacherCertificate());

+ 2 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -60,7 +60,7 @@
                 sum(if(a.end_time_ &lt;= now(),1,0)) as expTime,
                 sum(if(a.end_time_ &lt;= now(),1,0)) as expTime,
                 sum(if(a.end_time_ &gt; now(),1,0)) as unExpTime
                 sum(if(a.end_time_ &gt; now(),1,0)) as unExpTime
             from course_schedule a
             from course_schedule a
-            where a.lock_ = 0 and a.type_ in ('PRACTICE','PIANO_ROOM_CLASS')
+            where a.lock_ = 0 and a.type_ in ('PRACTICE','PIANO_ROOM_CLASS','VIP','LIVE')
             <if test="userId != null and userId != ''">
             <if test="userId != null and userId != ''">
                 and a.teacher_id_ = #{userId}
                 and a.teacher_id_ = #{userId}
             </if>
             </if>
@@ -73,7 +73,7 @@
                 avg (b.score_) as starGrade
                 avg (b.score_) as starGrade
             from course_schedule a
             from course_schedule a
             join course_schedule_replied b on a.id_ = b.course_schedule_id_
             join course_schedule_replied b on a.id_ = b.course_schedule_id_
-            where a.lock_ = 0 and a.type_ in ('PRACTICE','PIANO_ROOM_CLASS') and b.score_ is not null
+            where a.lock_ = 0 and a.type_ in ('PRACTICE','PIANO_ROOM_CLASS','VIP','LIVE') and b.score_ is not null
             <if test="userId != null and userId != ''">
             <if test="userId != null and userId != ''">
                 and a.teacher_id_ = #{userId}
                 and a.teacher_id_ = #{userId}
             </if>
             </if>

+ 2 - 2
cooleshow-user/user-biz/src/main/resources/config/mybatis/UserAccountRecordMapper.xml

@@ -81,7 +81,7 @@
             a.end_time_ as endTime
             a.end_time_ as endTime
         from user_cash_account_record t
         from user_cash_account_record t
         left join sys_user u on t.account_id_ = u.id_
         left join sys_user u on t.account_id_ = u.id_
-        left join course_schedule a on t.biz_id_ = a.id_ and t.biz_type_ in ('PRACTICE','LIVE','LIVE_SHARE')
+        left join course_schedule a on t.biz_id_ = a.id_ and t.biz_type_ in ('PRACTICE','LIVE','LIVE_SHARE','VIP_COURSE')
         <where>
         <where>
             <if test="null != param.search and '' != param.search">
             <if test="null != param.search and '' != param.search">
                 AND (
                 AND (
@@ -259,7 +259,7 @@
             where t.biz_type_ != 'LIVE'
             where t.biz_type_ != 'LIVE'
             <include refid="selectCondition"/>
             <include refid="selectCondition"/>
         ) t
         ) t
-        left join course_schedule a on t.biz_id_ = a.id_ and t.biz_type_ in ('PRACTICE','LIVE')
+        left join course_schedule a on t.biz_id_ = a.id_ and t.biz_type_ in ('PRACTICE','LIVE','VIP_COURSE')
         order by t.update_time_ desc,t.id_ desc
         order by t.update_time_ desc,t.id_ desc
     </select>
     </select>