Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李伟
cust-api
Commits
b576d2ba
Commit
b576d2ba
authored
Feb 26, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了互换微信任务未读数量
parent
51060b06
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
4 deletions
+36
-4
MemInfoRepository.java
...a/org/rcisoft/business/memInfo/dao/MemInfoRepository.java
+10
-0
MemLeaveMessageServiceImpl.java
...LeaveMessage/service/impl/MemLeaveMessageServiceImpl.java
+8
-4
MemInfoMapper.xml
...esources/mapper/business/memInfo/mapper/MemInfoMapper.xml
+18
-0
No files found.
src/main/java/org/rcisoft/business/memInfo/dao/MemInfoRepository.java
View file @
b576d2ba
...
@@ -206,5 +206,15 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> {
...
@@ -206,5 +206,15 @@ public interface MemInfoRepository extends CyBaseMapper<MemInfo> {
* 查询当前用户的总被点赞数
* 查询当前用户的总被点赞数
*/
*/
Integer
selectUserFollowedCount
(
Integer
userId
);
Integer
selectUserFollowedCount
(
Integer
userId
);
/**
* 查询当前对话的未回复的微信任务数量
*/
int
queryTalkWeChatTaskNoReplyCount
(
@Param
(
"createBy"
)
Integer
createBy
,
@Param
(
"targetId"
)
Integer
targetId
,
@Param
(
"loginUserId"
)
Integer
loginUserId
);
/**
* 查询未回复的微信任务数量
*/
int
queryWeChatTaskNoReplyCount
(
String
userId
);
}
}
src/main/java/org/rcisoft/business/memLeaveMessage/service/impl/MemLeaveMessageServiceImpl.java
View file @
b576d2ba
...
@@ -287,8 +287,10 @@ public class MemLeaveMessageServiceImpl extends ServiceImpl<MemLeaveMessageRepos
...
@@ -287,8 +287,10 @@ public class MemLeaveMessageServiceImpl extends ServiceImpl<MemLeaveMessageRepos
talks
.
forEach
(
item
->{
talks
.
forEach
(
item
->{
//查询每一个对话的我的未读留言数量
//查询每一个对话的我的未读留言数量
//1.查询该对话的所有留言 并且计算出当前用户对该留言的未读信息数量 对话的createBy和targetId会随时变 所以当前人id要手动获取
//1.查询该对话的所有留言 并且计算出当前用户对该留言的未读信息数量 对话的createBy和targetId会随时变 所以当前人id要手动获取
int
count
=
memLeaveMessageRepository
.
queryTalkNoReadCount
(
item
.
getCreateBy
(),
item
.
getTargetId
(),
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
int
count1
=
memLeaveMessageRepository
.
queryTalkNoReadCount
(
item
.
getCreateBy
(),
item
.
getTargetId
(),
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
item
.
setNoReadCount
(
count
);
//查询互换微信未回应数量
int
count2
=
memInfoRepository
.
queryTalkWeChatTaskNoReplyCount
(
item
.
getCreateBy
(),
item
.
getTargetId
(),
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
()));
item
.
setNoReadCount
(
count1
+
count2
);
});
});
return
userLeaveMessageIPage
;
return
userLeaveMessageIPage
;
}
}
...
@@ -338,8 +340,10 @@ public class MemLeaveMessageServiceImpl extends ServiceImpl<MemLeaveMessageRepos
...
@@ -338,8 +340,10 @@ public class MemLeaveMessageServiceImpl extends ServiceImpl<MemLeaveMessageRepos
//获取当前登录人
//获取当前登录人
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
String
userId
=
CyUserUtil
.
getAuthenBusinessId
();
//查询未读的留言数
//查询未读的留言数
int
count
=
memLeaveMessageRepository
.
leaveMessageNoReadAllCount
(
Integer
.
valueOf
(
userId
));
int
count1
=
memLeaveMessageRepository
.
leaveMessageNoReadAllCount
(
Integer
.
valueOf
(
userId
));
//查询互换微信未回应数量
int
count2
=
memInfoRepository
.
queryWeChatTaskNoReplyCount
(
userId
);
//查询未读的要微信请求数
//查询未读的要微信请求数
return
count
;
return
count
1
+
count2
;
}
}
}
}
src/main/resources/mapper/business/memInfo/mapper/MemInfoMapper.xml
View file @
b576d2ba
...
@@ -806,4 +806,22 @@
...
@@ -806,4 +806,22 @@
where 1=1
where 1=1
and target_id = #{userId}
and target_id = #{userId}
</select>
</select>
<select
id=
"queryTalkWeChatTaskNoReplyCount"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM (
select *
from mem_user_task
where 1=1
and (create_by = #{createBy} and target_id = #{targetId}) OR (create_by = #{targetId} and target_id = #{createBy})
and status = '0'
) table1
where table1.target_id = #{loginUserId}
</select>
<select
id=
"queryWeChatTaskNoReplyCount"
resultType=
"java.lang.Integer"
>
select count(*)
from mem_user_task
where 1=1
and target_id = #{userId}
and status = '0'
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment