liujc 7 months ago
parent
commit
2833154c4d

+ 5 - 3
cooleshow-user/user-biz/src/main/resources/config/mybatis/MusicSheetMapper.xml

@@ -1210,7 +1210,8 @@
             ms.show_fingering_ = #{item.musicSheetUpdate.showFingering},
             ms.can_evaluate_ = #{item.musicSheetUpdate.canEvaluate},
             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}
     </update>
@@ -1250,7 +1251,7 @@
         (cbs_music_sheet_id_,music_tag_,payment_type_,charge_type_,top_flag_,exquisite_flag_,sort_number_,state_,audit_status_
         ,music_sheet_name_,music_subject_,music_svg_,composer_,accompaniment_type_,play_speed_,
         music_price_,notation_,music_sheet_type_,source_type_,provider_type_,audio_type_,show_fingering_,
-        can_evaluate_,create_by_,user_id_,score_type_,platform_state_,client_state_
+        can_evaluate_,create_by_,user_id_,score_type_,platform_state_,client_state_,first_pass_audit_time_
         )
         values
         (#{item.musicSheetId},
@@ -1276,7 +1277,8 @@
         #{item.musicSheetUpdate.userId},#{item.musicSheetUpdate.userId},
         #{item.scoreType},
         #{item.musicSheetUpdate.platformStatus},
-        #{item.clientStatus}
+        #{item.clientStatus},
+        now()
         )
     </insert>
     <!--单曲专辑数量统计-->