|
@@ -338,11 +338,11 @@ namespace GxPress.Repository.Implement
|
|
OR a.CreatedDate LIKE '%{request.Keyword}%' or a.MiddleId in (SELECT
|
|
OR a.CreatedDate LIKE '%{request.Keyword}%' or a.MiddleId in (SELECT
|
|
g.NoticeId
|
|
g.NoticeId
|
|
FROM
|
|
FROM
|
|
- tede_notice_addressee g
|
|
|
|
|
|
+ tede_addressee g
|
|
INNER JOIN
|
|
INNER JOIN
|
|
tede_user h ON g.UserId = h.Id
|
|
tede_user h ON g.UserId = h.Id
|
|
WHERE
|
|
WHERE
|
|
- g.NoticeId =a.MiddleId AND h.Name LIKE '%{request.Keyword}%'))";
|
|
|
|
|
|
+ g.SourceId =a.MiddleId AND h.Name LIKE '%{request.Keyword}%'))";
|
|
else
|
|
else
|
|
sb += $@" AND a.AttributeValue != 2 AND (b.Title LIKE '%{request.Keyword}%'
|
|
sb += $@" AND a.AttributeValue != 2 AND (b.Title LIKE '%{request.Keyword}%'
|
|
OR b.Content LIKE '%{request.Keyword}%'
|
|
OR b.Content LIKE '%{request.Keyword}%'
|
|
@@ -351,11 +351,11 @@ namespace GxPress.Repository.Implement
|
|
OR a.CreatedDate LIKE '%{request.Keyword}%' or a.MiddleId in (SELECT
|
|
OR a.CreatedDate LIKE '%{request.Keyword}%' or a.MiddleId in (SELECT
|
|
g.NoticeId
|
|
g.NoticeId
|
|
FROM
|
|
FROM
|
|
- tede_notice_addressee g
|
|
|
|
|
|
+ tede_addressee g
|
|
INNER JOIN
|
|
INNER JOIN
|
|
tede_user h ON g.UserId = h.Id
|
|
tede_user h ON g.UserId = h.Id
|
|
WHERE
|
|
WHERE
|
|
- g.NoticeId =a.MiddleId AND h.Name LIKE '%{request.Keyword}%'))";
|
|
|
|
|
|
+ g.SourceId =a.MiddleId AND h.Name LIKE '%{request.Keyword}%'))";
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
@@ -429,19 +429,19 @@ namespace GxPress.Repository.Implement
|
|
ParentId = a.Id and IsDelete=0 and NoticeAddresseeType<>2) as FileCount,(SELECT
|
|
ParentId = a.Id and IsDelete=0 and NoticeAddresseeType<>2) as FileCount,(SELECT
|
|
COUNT(1)
|
|
COUNT(1)
|
|
FROM
|
|
FROM
|
|
- tede_notice_addressee
|
|
|
|
|
|
+ tede_addressee
|
|
WHERE
|
|
WHERE
|
|
- NoticeId = a.MiddleId AND IsRead = 1) as ReadCount,(SELECT
|
|
|
|
|
|
+ SourceId = a.MiddleId AND IsRead = 1) as ReadCount,(SELECT
|
|
COUNT(1)
|
|
COUNT(1)
|
|
FROM
|
|
FROM
|
|
- tede_notice_addressee
|
|
|
|
|
|
+ tede_addressee
|
|
WHERE
|
|
WHERE
|
|
- NoticeId = a.MiddleId ) as AllCount,(SELECT
|
|
|
|
|
|
+ SourceId = a.MiddleId ) as AllCount,(SELECT
|
|
COUNT(1)
|
|
COUNT(1)
|
|
FROM
|
|
FROM
|
|
- tede_notice_addressee
|
|
|
|
|
|
+ tede_addressee
|
|
WHERE
|
|
WHERE
|
|
- NoticeId = a.MiddleId AND IsRead = 1 and UserId={request.UserId} limit 0,1) as IsRead, b.*, c.Name, c.AvatarUrl, d.*
|
|
|
|
|
|
+ SourceId = a.MiddleId AND IsRead = 1 and UserId={request.UserId} limit 0,1) as IsRead, b.*, c.Name, c.AvatarUrl, d.*
|
|
FROM
|
|
FROM
|
|
tede_middle a
|
|
tede_middle a
|
|
left JOIN
|
|
left JOIN
|
|
@@ -449,7 +449,7 @@ namespace GxPress.Repository.Implement
|
|
left JOIN
|
|
left JOIN
|
|
tede_user c ON b.UserId = c.Id
|
|
tede_user c ON b.UserId = c.Id
|
|
left JOIN
|
|
left JOIN
|
|
- tede_notice_addressee d ON d.Id = a.MiddleSonId
|
|
|
|
|
|
+ tede_addressee d ON d.Id = a.MiddleSonId
|
|
WHERE
|
|
WHERE
|
|
a.UserId = {request.UserId} and a.FolderType=1
|
|
a.UserId = {request.UserId} and a.FolderType=1
|
|
{sb}
|
|
{sb}
|
|
@@ -464,7 +464,7 @@ namespace GxPress.Repository.Implement
|
|
left JOIN
|
|
left JOIN
|
|
tede_user c ON b.UserId = c.Id
|
|
tede_user c ON b.UserId = c.Id
|
|
left JOIN
|
|
left JOIN
|
|
- tede_notice_addressee d ON d.Id = a.MiddleSonId
|
|
|
|
|
|
+ tede_addressee d ON d.Id = a.MiddleSonId
|
|
WHERE
|
|
WHERE
|
|
a.UserId = {1} and a.FolderType=1
|
|
a.UserId = {1} and a.FolderType=1
|
|
{0}", sb, request.UserId);
|
|
{0}", sb, request.UserId);
|