liujc 2 months ago
parent
commit
f3df187ff6

+ 4 - 4
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/MusicSheetAuthRecordServiceImpl.java

@@ -104,10 +104,10 @@ public class MusicSheetAuthRecordServiceImpl extends ServiceImpl<MusicSheetAuthR
             throw new BizException("曲目信息不存在");
         }
         if (param.getAuthStatus().equals(AuthStatusEnum.PASS)) {
-            MusicSheet update = new MusicSheet();
-            update.setId(musicSheet.getId());
-            update.setFirstPassAuditTime(new Date());
-            musicSheetService.updateById(musicSheet);
+//            MusicSheet update = new MusicSheet();
+//            update.setId(musicSheet.getId());
+//            update.setFirstPassAuditTime(new Date());
+//            musicSheetService.updateById(musicSheet);
             // 修改老师标签
             teacherService.setTeacherTag(musicSheet.getUserId(), TeacherTagEnum.MUSIC);
             //同步到内容平台

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

@@ -934,7 +934,8 @@
                 ms.can_evaluate_ = #{item.musicSheetUpdate.canEvaluate},
                 ms.is_all_subject_ = #{item.musicSheetUpdate.isAllSubject},
                 ms.source_type_ = CASE WHEN #{item.musicSheetUpdate.sourceType} = 'PLATFORM' THEN 'PLATFORM'
-                WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER' ELSE 'TENANT' END
+                WHEN #{item.musicSheetUpdate.sourceType} = 'PERSON' THEN 'TEACHER' ELSE 'TENANT' END,
+                ms.first_pass_audit_time_ = IF(#{item.musicSheetUpdate.sourceType} = 'PERSON' and ms.first_pass_audit_time_ is null, now(), ms.first_pass_audit_time_)
             </if>
             where ms.cbs_music_sheet_id_ = #{item.musicSheetId}
         </foreach>