dingxin 6 yıl önce
ebeveyn
işleme
e1a17e89b3

+ 3
- 3
CODE/smart-community/app-api/src/main/resources/mapper/TpMessageMapper.xml Dosyayı Görüntüle

@@ -293,13 +293,13 @@
293 293
   <select id="getMessageTotal" resultType="map">
294 294
     SELECT
295 295
         count( CASE WHEN model_type = 1 AND read_status = 0 THEN 1 ELSE NULL END ) AS messageTotal,
296
-        count( CASE WHEN model_type = 2 THEN 1 ELSE NULL END ) AS toDoTotal
296
+        count( CASE WHEN model_type = 2 AND status = 1 THEN 1 ELSE NULL END ) AS toDoTotal
297 297
     FROM
298 298
         tp_message
299 299
     WHERE
300 300
         uuid_type = 1
301 301
         AND community_id = #{communityId,jdbcType=INTEGER}
302
-        AND (uuid = #{userId,jdbcType=INTEGER} or uuid = -1)
302
+        AND uuid = #{userId,jdbcType=INTEGER}
303 303
         AND STATUS = 1
304 304
         AND advice_type = 1
305 305
   </select>
@@ -343,7 +343,7 @@
343 343
     WHERE
344 344
         t.uuid_type = 1
345 345
         AND t.community_id = #{communityId,jdbcType=INTEGER}
346
-        AND (t.uuid = #{userId,jdbcType=INTEGER} or t.uuid= -1)
346
+        AND t.uuid = #{userId,jdbcType=INTEGER}
347 347
         AND t.STATUS = 1
348 348
         AND t.advice_type = 1
349 349
         AND t.uuid_type = 1