Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
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
haoban3.0
haoban-manage3.0
Commits
6d23ca18
Commit
6d23ca18
authored
Dec 20, 2024
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
通知画布
parent
3f6ad1ec
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
0 deletions
+88
-0
GroupChatPlanApiService.java
...oban/manage/api/service/chat/GroupChatPlanApiService.java
+7
-0
GroupChatPlanOwnerLogMapper.java
.../service/dao/mapper/chat/GroupChatPlanOwnerLogMapper.java
+7
-0
GroupChatPlanService.java
...ban/manage/service/service/chat/GroupChatPlanService.java
+3
-0
GroupChatPlanServiceImpl.java
...e/service/service/chat/impl/GroupChatPlanServiceImpl.java
+41
-0
GroupChatPlanApiServiceImpl.java
...ce/service/out/impl/chat/GroupChatPlanApiServiceImpl.java
+5
-0
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+2
-0
GroupChatPlanOwnerLogMapper.xml
...ain/resources/mapper/chat/GroupChatPlanOwnerLogMapper.xml
+23
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/chat/GroupChatPlanApiService.java
View file @
6d23ca18
...
@@ -85,4 +85,11 @@ public interface GroupChatPlanApiService {
...
@@ -85,4 +85,11 @@ public interface GroupChatPlanApiService {
* @return
* @return
*/
*/
String
getQwMsgId
(
String
staffId
,
Date
sendTime
)
;
String
getQwMsgId
(
String
staffId
,
Date
sendTime
)
;
/**
*
* @param params
*/
void
noticeTimer
(
String
params
)
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/chat/GroupChatPlanOwnerLogMapper.java
View file @
6d23ca18
...
@@ -69,4 +69,10 @@ public interface GroupChatPlanOwnerLogMapper {
...
@@ -69,4 +69,10 @@ public interface GroupChatPlanOwnerLogMapper {
void
updateMsgid
(
@Param
(
"planId"
)
Long
id
,
@Param
(
"msgid"
)
String
msgid
)
;
void
updateMsgid
(
@Param
(
"planId"
)
Long
id
,
@Param
(
"msgid"
)
String
msgid
)
;
void
staffSendResult
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"planId"
)
Long
planId
,
@Param
(
"sendTime"
)
Date
sendTime
,
@Param
(
"failRemark"
)
String
failRemark
);
void
staffSendResult
(
@Param
(
"staffId"
)
String
staffId
,
@Param
(
"planId"
)
Long
planId
,
@Param
(
"sendTime"
)
Date
sendTime
,
@Param
(
"failRemark"
)
String
failRemark
);
int
getTotalTask
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"time"
)
Date
time
)
;
int
getInvalidTask
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"time"
)
Date
time
)
;
int
getOverdueTask
(
@Param
(
"enterpriseId"
)
String
enterpriseId
,
@Param
(
"clerkId"
)
String
clerkId
,
@Param
(
"time"
)
Date
time
)
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/GroupChatPlanService.java
View file @
6d23ca18
...
@@ -42,4 +42,6 @@ public interface GroupChatPlanService {
...
@@ -42,4 +42,6 @@ public interface GroupChatPlanService {
void
stopByMsgid
(
Long
planId
);
void
stopByMsgid
(
Long
planId
);
String
getQwMsgId
(
String
staffId
,
Date
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
groupMsgChatType
)
;
String
getQwMsgId
(
String
staffId
,
Date
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
groupMsgChatType
)
;
void
noticeTimer
(
String
params
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/chat/impl/GroupChatPlanServiceImpl.java
View file @
6d23ca18
...
@@ -18,11 +18,15 @@ import com.gic.haoban.manage.api.dto.qdto.chat.OwnerSearchQDTO;
...
@@ -18,11 +18,15 @@ import com.gic.haoban.manage.api.dto.qdto.chat.OwnerSearchQDTO;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum
;
import
com.gic.haoban.manage.api.qdto.StaffSendResultQDTO
;
import
com.gic.haoban.manage.api.qdto.StaffSendResultQDTO
;
import
com.gic.haoban.manage.api.service.HaobanCommonMQApiService
;
import
com.gic.haoban.manage.api.service.HaobanCommonMQApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.api.util.notify.NoticeMessageUtil
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.chat.*
;
import
com.gic.haoban.manage.service.dao.mapper.chat.*
;
import
com.gic.haoban.manage.service.service.StaffClerkRelationService
;
import
com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl
;
import
com.gic.haoban.manage.service.service.content.impl.GroupMessageServiceImpl
;
import
com.gic.haoban.manage.service.util.StreamUtils
;
import
com.gic.haoban.manage.service.util.StreamUtils
;
import
com.gic.haoban.task.manage.api.service.QywxGroupSendCanvasApiService
;
import
com.gic.thirdparty.cloudfile.CloudFileUtil
;
import
com.gic.thirdparty.cloudfile.CloudFileUtil
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileBusinessOptEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum
;
import
com.gic.thirdparty.cloudfile.enums.CloudFileTypeEnum
;
...
@@ -125,6 +129,12 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
...
@@ -125,6 +129,12 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
private
GroupChatMapper
groupChatMapper
;
private
GroupChatMapper
groupChatMapper
;
@Autowired
@Autowired
private
HaobanCommonMQApiService
haobanCommonMQApiService
;
private
HaobanCommonMQApiService
haobanCommonMQApiService
;
@Autowired
private
QywxGroupSendCanvasApiService
qywxGroupSendCanvasApiService
;
@Autowired
private
WxEnterpriseRelatedMapper
wxEnterpriseRelatedMapper
;
@Autowired
private
StaffClerkRelationService
staffClerkRelationService
;
private
static
GicMQClient
mqClient
=
GICMQClientUtil
.
getClientInstance
();
private
static
GicMQClient
mqClient
=
GICMQClientUtil
.
getClientInstance
();
...
@@ -878,4 +888,34 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
...
@@ -878,4 +888,34 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
}
}
return
resp
.
getResult
().
getGroupMessageInfos
();
return
resp
.
getResult
().
getGroupMessageInfos
();
}
}
@Override
public
void
noticeTimer
(
String
params
)
{
// 生成数据
//获取所有的企业
List
<
String
>
enterpriseIdList
=
this
.
wxEnterpriseRelatedMapper
.
findAllEnterpriseId
();
if
(
CollectionUtils
.
isEmpty
(
enterpriseIdList
))
{
logger
.
info
(
"任务自动刷新定时器触发, 企业id列表为空"
);
return
;
}
for
(
String
enterpriseId
:
enterpriseIdList
)
{
this
.
massTaskData
(
enterpriseId
);
}
}
private
void
massTaskData
(
String
enterpriseId
)
{
logger
.
info
(
"生成社群数据={}"
,
enterpriseId
);
Date
date
=
DateUtil
.
getEndTimeOfDay
()
;
List
<
String
>
clerkIdList
=
this
.
staffClerkRelationService
.
listAllClerkIdsByEnterpriseId
(
enterpriseId
)
;
if
(
CollectionUtils
.
isNotEmpty
(
clerkIdList
))
{
for
(
String
clerkId
:
clerkIdList
)
{
int
total
=
this
.
groupChatPlanOwnerLogMapper
.
getTotalTask
(
enterpriseId
,
clerkId
,
date
)
;
if
(
total
>
0
)
{
int
invalid
=
this
.
groupChatPlanOwnerLogMapper
.
getInvalidTask
(
enterpriseId
,
clerkId
,
date
)
;
int
overdue
=
this
.
groupChatPlanOwnerLogMapper
.
getOverdueTask
(
enterpriseId
,
clerkId
,
date
)
;
this
.
qywxGroupSendCanvasApiService
.
saveNoticeLog
(
enterpriseId
,
clerkId
,
total
,
overdue
,
invalid
,
"chat"
)
;
}
}
}
}
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/chat/GroupChatPlanApiServiceImpl.java
View file @
6d23ca18
...
@@ -181,4 +181,9 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
...
@@ -181,4 +181,9 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
public
String
getQwMsgId
(
String
staffId
,
Date
sendTime
)
{
public
String
getQwMsgId
(
String
staffId
,
Date
sendTime
)
{
return
this
.
groupChatPlanService
.
getQwMsgId
(
staffId
,
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
.
single
);
return
this
.
groupChatPlanService
.
getQwMsgId
(
staffId
,
sendTime
,
GroupMessageServiceImpl
.
GroupMsgChatType
.
single
);
}
}
@Override
public
void
noticeTimer
(
String
params
)
{
this
.
groupChatPlanService
.
noticeTimer
(
params
)
;
}
}
}
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
6d23ca18
...
@@ -252,5 +252,6 @@
...
@@ -252,5 +252,6 @@
<dubbo:reference
id=
"memberCrowdApiService"
interface=
"com.gic.member.ext.api.service.MemberCrowdApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"memberCrowdApiService"
interface=
"com.gic.member.ext.api.service.MemberCrowdApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"coupCardDistributionService"
interface=
"com.gic.marketing.api.service.CoupCardDistributionService"
timeout=
"30000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"coupCardDistributionService"
interface=
"com.gic.marketing.api.service.CoupCardDistributionService"
timeout=
"30000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"enterpriseWxaLinkService"
interface=
"com.gic.enterprise.api.service.EnterpriseWxaLinkService"
timeout=
"30000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"enterpriseWxaLinkService"
interface=
"com.gic.enterprise.api.service.EnterpriseWxaLinkService"
timeout=
"30000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
id=
"qywxGroupSendCanvasApiService"
interface=
"com.gic.haoban.task.manage.api.service.QywxGroupSendCanvasApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
</beans>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/chat/GroupChatPlanOwnerLogMapper.xml
View file @
6d23ca18
...
@@ -299,4 +299,26 @@
...
@@ -299,4 +299,26 @@
</select>
</select>
<!-- 查询所有任务数-->
<select
id=
"getTotalTask"
resultType=
"int"
>
select count(1) from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId} and b.end_time
<![CDATA[<=]]>
now()
AND a.clerk_id = #{clerkId} AND a.send_status = 1 and a.delete_flag = 0
</select>
<!-- 查询逾期任务数-->
<select
id=
"getInvalidTask"
resultType=
"int"
>
select count(1) from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId} and b.end_time = #{time}
AND a.clerk_id = #{clerkId} AND a.send_status = 1 and a.delete_flag = 0
</select>
<!-- 查询失效任务数-->
<select
id=
"getOverdueTask"
resultType=
"int"
>
select count(1) from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId} and b.end_time = now()
AND a.clerk_id = #{clerkId} AND a.send_status = 1 and a.delete_flag = 0
</select>
</mapper>
</mapper>
\ No newline at end of file
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