|
@@ -8,6 +8,7 @@ using GxPress.Common.AppOptions;
|
|
|
using GxPress.Common.Page;
|
|
|
using GxPress.Common.Tools;
|
|
|
using GxPress.Entity;
|
|
|
+using GxPress.EnumConst;
|
|
|
using GxPress.Repository.Interface.Missive;
|
|
|
using GxPress.Request.App.Missive;
|
|
|
using GxPress.Result.App.Missive;
|
|
@@ -92,9 +93,9 @@ namespace GxPress.Repository.Implement.Missive
|
|
|
Id IN (SELECT
|
|
|
UserId
|
|
|
FROM
|
|
|
- tede_missive_addressee
|
|
|
- WHERE
|
|
|
- MissiveId = a.MiddleId)
|
|
|
+ tede_addressee
|
|
|
+ WHERE SourceType={AllTypeConst.Missive.GetHashCode()} and
|
|
|
+ SourceId = a.MiddleId)
|
|
|
AND Name LIKE '%{request.Key}%')
|
|
|
OR a.CreatedDate LIKE '%{request.Key}%')";
|
|
|
if (request.FolderId > 0)
|
|
@@ -122,21 +123,23 @@ namespace GxPress.Repository.Implement.Missive
|
|
|
(SELECT
|
|
|
COUNT(1)
|
|
|
FROM
|
|
|
- tede_missive_addressee
|
|
|
+ tede_addressee
|
|
|
WHERE
|
|
|
- MissiveId = a.MiddleId AND IsRead = 1) AS ReadCount,
|
|
|
+ SourceType={AllTypeConst.Missive.GetHashCode()} and
|
|
|
+ SourceId = a.MiddleId AND IsRead = 1) AS ReadCount,
|
|
|
(SELECT
|
|
|
COUNT(1)
|
|
|
FROM
|
|
|
- tede_missive_addressee
|
|
|
- WHERE
|
|
|
- MissiveId = a.MiddleId) AS AllCount,
|
|
|
+ tede_addressee
|
|
|
+ WHERE SourceType={AllTypeConst.Missive.GetHashCode()} and
|
|
|
+ SourceId = a.MiddleId ) AS AllCount,
|
|
|
(SELECT
|
|
|
COUNT(1)
|
|
|
FROM
|
|
|
- tede_missive_addressee
|
|
|
+ tede_addressee
|
|
|
WHERE
|
|
|
- MissiveId = a.MiddleId AND IsRead = 1
|
|
|
+ SourceType={AllTypeConst.Missive.GetHashCode()} and
|
|
|
+ SourceId = a.MiddleId AND IsRead = 1
|
|
|
AND UserId = {request.UserId}
|
|
|
LIMIT 0 , 1) AS IsRead, b.Title, b.UserName, b.MissiveType,b.SendUserId,b.Content,b.SourceId
|
|
|
FROM
|