ソースを参照

fix:官网老师曲目数量

liujunchi 3 年 前
コミット
3de9358bc2

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

@@ -517,13 +517,13 @@
 
     <select id="selectTeacherCount" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherAuditMusicSheetVo">
         select
-            count(if(t.audit_status_ = 'DOING',1,0)) as doing,
-            count(if(t.audit_status_ = 'PASS' and t.state_ = 1,1,0)) as pass,
-            count(if(t.audit_status_ = 'UNPASS',1,0)) as upPass
-
-        from music_sheet t
-        left join sys_user su on t.create_by_ = su.id_
-        where su.id_ = #{userId}
+            sum(if(t.audit_status_ = 'DOING',1,0)) as doing,
+            sum(if(t.audit_status_ = 'PASS'
+                       and t.state_ = 1,1,0)) as pass,
+            sum(if(t.audit_status_ = 'UNPASS',1,0)) as upPass
+        from
+            music_sheet t
+        where t.user_id_ = #{userId}
 
     </select>
 </mapper>